([]);
@@ -326,8 +326,39 @@ export function AppShell({ canLogout }: AppShellProps) {
});
}
- function toggleAllSessions(selected: boolean) {
- setSelectedSessionIds(selected ? new Set(sessions.map((session) => session.id)) : new Set());
+ function sessionSelectionControls(list: SessionSummary[]) {
+ if (list.length === 0) return null;
+ const selected = list.filter((session) => selectedSessionIds.has(session.id));
+ return (
+
+
+ {selected.length > 0 && (
+
+ )}
+
+ );
}
function handleSessionScopeTabKeyDown(
@@ -1124,42 +1155,11 @@ export function AppShell({ canLogout }: AppShellProps) {
className="flex min-h-0 flex-1 flex-col"
>
{canReadAllSessions && showingAllSessions && (
-
+
{t("Administrator view: all sessions")}
)}
- {/* L1 — rail title */}
-
-
- {t("Sessions")}
-
-
-
-
-
- {selectedSessions.length > 0 && (
-
- )}
-
{ setActiveOpen(value.includes("active")); setArchiveOpen(value.includes("archive")); }}
@@ -1172,6 +1172,7 @@ export function AppShell({ canLogout }: AppShellProps) {
+ {sessionSelectionControls(activeList)}
{groups.map((g) => (
@@ -1233,6 +1234,7 @@ export function AppShell({ canLogout }: AppShellProps) {
+ {sessionSelectionControls(archivedList)}
);
await userEvent.click(await screen.findByRole("tab", { name: "All sessions" }));
+ await userEvent.click(screen.getByRole("button", { name: "Active sessions" }));
await userEvent.click(await screen.findByText("Another analyst's work"));
expect(await screen.findByRole("button", { name: "Resume" })).toBeInTheDocument();
expect(readRememberedSession(admin)).toBe("foreign");