Skip to content

feat(app): group sessions and vertical tabs by server - #58155

Closed
rspadim wants to merge 5 commits into
anomalyco:devfrom
rspadim:group-sessions-by-server
Closed

rspadim wants to merge 5 commits into
anomalyco:devfrom
rspadim:group-sessions-by-server

Conversation

@rspadim

@rspadim rspadim commented Oct 22, 2026 •

Copy link
Copy Markdown

Issue for this PR

Related to #51344.

Type of change

  • New feature

What does this PR do?

With more than one server configured, Home and the vertical tab strip mix sessions from every server into one flat list. Titles do not say which server a session runs on, and two servers with the same project name are indistinguishable.

This groups them by server instead of labelling each row.

  • Home: a "Group sessions" control next to New session switches between grouping by date (existing behaviour: Today / Yesterday / Older) and by server. Server grouping queries every visible server in parallel and applies each server's own project filter and session cap, so one busy server cannot hide the others. Each row carries its server, so open, rename, export and delete act on the right one.
  • Vertical tab strip: section headers per server when several are connected. A stable sort keeps each server's own tab order, so dragging inside a group still persists.
  • Setting: Appearance → "Group tabs by server" with Automatic / Always / Never. Automatic groups only when more than one server is connected; Never keeps the flat strip.

Home and the tab strip stay independent: Home keeps date grouping as its default because it is useful with a single server, while the tab strip has no such grouping worth preserving.

#51345 labels each tab; this groups them. The two are compatible.

How did you verify your code works?

  • bun typecheck in packages/app
  • oxlint clean on the changed files
  • Playwright e2e: tabs.spec.ts + home.spec.ts, 34/34 passing, plus settings.spec.ts + settings-search.spec.ts (76/76 in the combined run). New cases cover grouping by server, the setting switching Never → Always through the settings UI, and tab order staying stable inside a group.
  • Ran the web app against a local server with two connections to check the real layout.

Screenshots / recordings

Home, grouped by date (unchanged) and by server, the new setting, and the vertical tab strip with server sections.

Checklist

  • I have tested my changes locally
  • I have not included unrelated changes in this PR

Added by the opencode bot (AI-generated).

Related: #51344

@rspadim
rspadim marked this pull request as draft October 22, 2026 15:32

@opencode-agent opencode-agent Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I couldn't check this in a browser: Playwright's headless browser won't start here, and the tests that already existed fail the same way. I reviewed the code instead. bun run typecheck in packages/app passes. The unit tests in src/home/sessions and src/settings/model.test.ts pass (47/47). Before/after screenshots or a short recording of Home and the vertical strip with two servers would help.

Public API is unchanged. The new appearance.tabServerGroups setting and the home.sessions preference are local app storage only. Both fall back to defaults, so existing stored settings still load.

Concerns, most important first (details inline):

  • The tab strip recreates every tab element whenever the tab list changes. This also affects the horizontal layout and single-server users, not only grouping.
  • Once Home is set to "By server", the choice stays after the user goes back to one server. The control is then hidden and the project filter stays ignored, with no way back.
  • Home search used to cover every session kept in memory. It now only covers the 64 shown per server.
  • The new stable-order tab test seeds tabs already in server order, so it doesn't test what it describes.

Related: #51344

@rspadim

rspadim commented Oct 22, 2026

Copy link
Copy Markdown
Author

some print screen

pr-home-date pr-home-server pr-settings pr-tabs

@rspadim

rspadim commented Oct 22, 2026

Copy link
Copy Markdown
Author

uhm, let me check your points

@rspadim

rspadim commented Oct 22, 2026

Copy link
Copy Markdown
Author

Superseded by #51345 — closing in favour of the smaller, existing approach.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant