Repository navigation
Conversation
There was a problem hiding this comment.
I read the full diff but couldn't run the feature: this is a desktop/web UI change, and I had no Playwright browsers to run the new e2e tests. In packages/app, the tab-groups and settings model unit tests pass (25/25) and typecheck:tsc is clean. Before/after screenshots or a short video would help, especially of the horizontal strip and the flat Side tabs.
Public API: none. The change adds two app settings, appearance.tabGroupByServer (default false) and appearance.tabServerOrder (default []). Settings saved before this change still load, because missing keys are filled from the defaults.
Concerns:
- Drag regression when grouping is off. The shared
TabSlotnow only accepts drops from tabs on the same server, in every layout, not only when tabs are grouped. That means the horizontal strip, the flat Side tabs and the mobile drawer can no longer drag a tab past another server's tab, though the description says those stay as they were. (inline) - Drag positions in every layout. Each tab's drag position now counts tabs that aren't shown, where it used to count only visible ones. This also affects the horizontal strip, so please check that dragging in a strip with hidden tabs still lands where it should. (inline)
- Recent-project side effect. Starting a session from a group header also bumps that folder to the server's most recently used project, which affects project pickers and defaults elsewhere. (inline)
- Size of the e2e tests. About 470 lines across 11 tests is a lot for one opt-in feature. Please cut them down to the core cases, for example: grouping on/off, a new session landing in the clicked group, show more/collapse, and reordering by dragging a header.
When open tabs span more than one server, the Side tabs strip now separates them under server headers. The sort is stable, so each server's own tab order and drag reordering are preserved. Horizontal tabs and single-server strips stay flat.
Each server header in the grouped Side tabs strip now has a small add button. It starts a draft on that server in the directory its open tabs already use.
Server headers now reveal a drag handle to reorder groups and persist that order. A caret collapses the group, and groups show three tabs by default with Show more and Show less controls.
The whole group header is draggable now, with a hover surface and an accent ring while dragging. Group drags carry a private data type so the composer does not mistake them for file drops.
Show more, Show less, and the group caret now shrink and fade their tabs. The transitions disable from the existing data-motion reduce setting.
A Side tabs header toggle switches between the original flat list and server-grouped tabs. It defaults off, and the icon changes from a list to a file tree when grouping is on.
Use the 16px outline list and filetree icons for the Side tabs grouping toggle instead of the 20px additional icon set.
Windowed macOS keeps Home below the sidebar header, so the header and Home row both rendered the toggle. The Home-row copy now exists only on Windows, where the header row is absent.
The drop target now fills the group header, the dragging ring is inset so it is not clipped, and the native drag image is a clone with the dragging treatment.
Dragging a group now reorders it on dragover, like session tabs, instead of showing a thin insertion target. The native drag path and the live order update are covered by the reorder test.
setDrag({}) does not remove a store key, so the dragged header kept its ring after drop. Clear the key explicitly and listen on the window for the end of a drag when the moved header no longer owns it.
Show the toggle only when a server is registered, use the server icon in both states, and dim it while grouping is off. Remove the now-unused outline list icon.
Keep the grouping toggle out of a narrow Home row and show it only when another server is registered. Allow grouping with a single tab-bearing server so the toggle always has an effect. Concealed tabs now keep valid sortable indices, cannot be dragged, and only accept same-server drops. Collapsing a group keeps the active tab visible, adding a session expands the group, and Show more stays available for an active fourth tab. Share the tab slot and group header rendering, reuse the existing Show more string, and scope the reduced-motion and mobile clipping rules.
Use the same server glyph and size as the experimental inbox tag for the Side tabs toggle. Only enable grouping for the vertical Side tabs strip, so horizontal tabs, the inbox layout, and the mobile drawer stay flat.
Show an error toast and log the reason when the group's server is gone or no working directory is known. Add e2e coverage for drafts landing in the clicked group and for the missing-directory feedback.
Place the existing server health indicator beside each group label and disable its add-session button until the server is healthy.
There was a problem hiding this comment.
The new commit addresses all three earlier points. Tabs are limited to their own server only when grouping is on, so the other layouts can drag across servers again. Drag positions count only visible tabs again, and starting a session from a group header no longer changes the server's last-used project. The e2e tests are also down to 5 core cases.
I couldn't run the grouped strip here because there are no Playwright browsers. In packages/app, the tab-groups and settings model unit tests pass (28/28) and typecheck:tsc is clean. The public API is unchanged: the only additions are the app settings appearance.tabGroupByServer and appearance.tabServerOrder, both with defaults.
No new concerns.
- Restrict tab drops to the same server only while grouping is on - Count drag positions from visible tabs and unregister concealed rows - Stop marking a project recent when adding a session from a group - Move group directory edge cases to unit tests and trim e2e coverage
c530a63 to
60d22b0
Compare
There was a problem hiding this comment.
This push rebases the branch onto a newer dev. The only changes are where the code was fitted around newer spacing and sidebar-width changes on dev; the grouping logic is the same as at my last review. The earlier points stay addressed. In packages/app, the tab-groups and settings model unit tests pass (28/28) and typecheck:tsc is clean. I couldn't run the grouped Side tabs here because there are no Playwright browsers. The public API is unchanged: the only additions are the app settings appearance.tabGroupByServer and appearance.tabServerOrder, both with defaults.
No new concerns.
Issue for this PR
Refs #51344, #51345, #58155
Type of change
What does this PR do?
Side tabs mixed tabs from every server into one flat list. This adds an optional server-grouped mode for the vertical strip: tabs sit under the server label, and each server keeps its existing tab order. Grouping is off by default, toggled from the Side tabs header, and leaves horizontal tabs, the Inbox, and the mobile drawer flat.
Group headers can start a draft on their server and show its health. Add is disabled while the server is unhealthy, and missing servers or directories show a focused error toast. Groups show three sessions by default with Show more / Show less, collapse while keeping the active tab visible, respect reduce motion, and can be dragged to reorder servers. The order updates live and persists in
appearance.tabServerOrder.The grouping is a stable sort by server order, with headers mapped to the first visible tab of each server. The add path resolves the draft directory from the group's draft, session, or last/used project before creating it.
How did you verify your code works?
bun run typecheck:tscinpackages/app; pre-push typecheck passed.tab-groupsunit tests: 3 passed.tabs.spec.ts+settings-wsl.spec.tson macOS: 53 passed; 6 known macOS shortcut/keybind failures unrelated to the grouping work.Visual
animated svg src
Screenshots / recordings
Demo video attached (
server-groups-demo.mp4).sidebar-server-groups.mp4
Checklist
Added by the opencode bot (AI-generated).
Related: #51344, #56749