diff --git a/.changeset/uncropped-workspace-menu.md b/.changeset/uncropped-workspace-menu.md new file mode 100644 index 0000000..725f7b7 --- /dev/null +++ b/.changeset/uncropped-workspace-menu.md @@ -0,0 +1,5 @@ +--- +"@jmfederico/pi-web": patch +--- + +Allow sidebar action/detail menus to expand beyond their list section when only a few rows are shown. diff --git a/src/client/src/components/MachineList.ts b/src/client/src/components/MachineList.ts index b9aaec1..e2dc81c 100644 --- a/src/client/src/components/MachineList.ts +++ b/src/client/src/components/MachineList.ts @@ -124,7 +124,7 @@ export class MachineList extends LitElement implements KeyboardNavigableSection this.openMenuMachineId = undefined; return; } - this.menuStyle = actionMenuPanelStyle(target); + this.menuStyle = actionMenuPanelStyle(target, { constrainTo: "viewport" }); this.openMenuMachineId = machineId; } diff --git a/src/client/src/components/ProjectList.ts b/src/client/src/components/ProjectList.ts index 80b492d..d7f7408 100644 --- a/src/client/src/components/ProjectList.ts +++ b/src/client/src/components/ProjectList.ts @@ -109,7 +109,7 @@ export class ProjectList extends LitElement implements KeyboardNavigableSection this.openMenuProjectId = undefined; return; } - this.menuStyle = actionMenuPanelStyle(target); + this.menuStyle = actionMenuPanelStyle(target, { constrainTo: "viewport" }); this.openMenuProjectId = projectId; } diff --git a/src/client/src/components/SessionList.ts b/src/client/src/components/SessionList.ts index fa3adf4..04132fb 100644 --- a/src/client/src/components/SessionList.ts +++ b/src/client/src/components/SessionList.ts @@ -336,7 +336,7 @@ export class SessionList extends LitElement implements KeyboardNavigableSection this.openMenuSessionId = undefined; return; } - this.menuStyle = actionMenuPanelStyle(target); + this.menuStyle = actionMenuPanelStyle(target, { constrainTo: "viewport" }); this.openMenuSessionId = sessionId; } diff --git a/src/client/src/components/WorkspaceList.ts b/src/client/src/components/WorkspaceList.ts index 6844c4d..2565873 100644 --- a/src/client/src/components/WorkspaceList.ts +++ b/src/client/src/components/WorkspaceList.ts @@ -180,7 +180,7 @@ export class WorkspaceList extends LitElement implements KeyboardNavigableSectio this.openMenuWorkspaceId = undefined; return; } - this.menuStyle = actionMenuPanelStyle(target); + this.menuStyle = actionMenuPanelStyle(target, { constrainTo: "viewport" }); this.openMenuWorkspaceId = workspaceId; } diff --git a/src/server/sessions/piSessionService.test.ts b/src/server/sessions/piSessionService.test.ts index a6c600f..a73c808 100644 --- a/src/server/sessions/piSessionService.test.ts +++ b/src/server/sessions/piSessionService.test.ts @@ -632,7 +632,7 @@ describe("PiSessionService", () => { it("refreshes auth state and dedupes warnings when logout removes the current model's credentials", async () => { const hub = new CapturingSessionEventHub(); const authStorage = AuthStorage.inMemory({ anthropic: { type: "api_key", key: "sk-test" } }); - const modelRegistry = ModelRegistry.create(authStorage); + const modelRegistry = ModelRegistry.inMemory(authStorage); const model = modelRegistry.find("anthropic", "claude-3-5-sonnet-20241022"); if (model === undefined) throw new Error("Expected Anthropic model fixture"); const fake = fakeRuntime("auth-session", { model, modelRegistry });