Skip to content

Add a Recently opened sort to the agent list - #518

Merged
powerfooI merged 5 commits into
powerfooI:mainfrom
martiGIT:feat/agent-recent-sort
Oct 30, 2026
Merged

powerfooI merged 5 commits into
powerfooI:mainfrom
martiGIT:feat/agent-recent-sort

Conversation

@martiGIT

@martiGIT martiGIT commented Oct 29, 2026 •

Copy link
Copy Markdown
Contributor

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

  • 30 related tests pass across agentOrder, agentRecency, App.history, workspaceTabChips, WorkspaceTree, and useAllServerAgentSessions.
  • App routing tests cover actual agent switches, unrelated renders, plain terminal panes, and storage failure. Attention first retains its existing order without reading browser history.
  • bun run format:check and pre-commit lint/native type checks pass (one existing TerminalView cleanup warning).
  • bun run build:web passes with both features: initial JS 824,297 / 824,320 bytes; gzip 248.4 / 256 KiB. No budget increase.
  • macOS in-app browser with an isolated Bun bridge and real Herdr 0.9.5: the Recently opened selection survives reload; tab-chip keyboard navigation and narrow-row overflow work.
  • Full local bun run test:quick: 3942 pass, 4 skip, 1 fail. The IME assertion in useMobileControlsDrag.keyboard.test.ts:709 also 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.

@github-actions github-actions Bot added the enhancement New feature or request label Oct 29, 2026
@powerfooI
powerfooI marked this pull request as ready for review October 30, 2026 02:25

@powerfooI powerfooI left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@powerfooI
powerfooI merged commit 10546ef into powerfooI:main Oct 30, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Agent list: "Recently opened" sort

2 participants