Archived
fix: prevent sidebar action menus from being cropped
Use viewport-constrained positioning for sidebar action menus and keep the auth warning test isolated from local models.json config so pre-commit verification is deterministic.
This commit is contained in:
@@ -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.
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
@@ -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 });
|
||||
|
||||
Reference in New Issue
Block a user