Repository navigation
Add a Recently opened sort to the agent list - #518
Conversation
powerfooI
left a comment
There was a problem hiding this comment.
Reviewed active-pane recording, storage validation/failure handling, connection/pane/terminal identity, current/all-server sorting, and preservation of Attention first behavior. Added App routing assertions and a comparator regression check. Consolidated sort logic and labels and simplified tab-chip construction/folding so the combined build stays below the unchanged 805 KiB startup budget. All 30 related local tests, formatting, lint/native types, build:web, GitHub CI, and CodeQL pass. Browser checks confirm the sort choice survives reload. The local macOS IME test failure is reproduced at the same assertion on clean main and is recorded in the PR; native iOS/Android were not checked. No remaining blocking findings.
Closes #516.
Adds Recently opened to the Separate agent list on the current server and across all servers. Attention groups stay first; idle agents use this browser's last-open time, then server activity. Open times are recorded when an agent becomes active through any navigation route, keyed by connection, pane, and terminal, and kept in one localStorage key capped at 200 entries. Failed storage writes leave navigation and the previous order intact.
Shares the existing sort comparisons and labels, and builds tab-chip summaries in one pass over tabs and panes. These changes keep both #517 and this feature within the existing startup asset budget; the budget is unchanged. The stale comment claiming that the browser tracks no history is corrected.
Verification
agentOrder,agentRecency,App.history,workspaceTabChips,WorkspaceTree, anduseAllServerAgentSessions.bun run format:checkand pre-commit lint/native type checks pass (one existing TerminalView cleanup warning).bun run build:webpasses with both features: initial JS 824,297 / 824,320 bytes; gzip 248.4 / 256 KiB. No budget increase.bun run test:quick: 3942 pass, 4 skip, 1 fail. The IME assertion inuseMobileControlsDrag.keyboard.test.ts:709also fails in a clean snapshot of current main with the same dependencies; it is unrelated to this PR. GitHub CI must pass before merge.Compatibility
No API or protocol changes. Open history stays in this browser; older builds treat the new saved sort value as Attention first. Native iOS Safari and Android Chrome were not tested in this review.