Skip to content

fix(tabs): a draft's tab stays in its project's group while the page is another server's - #1258

Merged
Hona merged 1 commit into
devfrom
upstream-g/group-draft-project
Nov 25, 2026
Merged

Hona merged 1 commit into
devfrom
upstream-g/group-draft-project

Conversation

@Hona

@Hona Hona commented Nov 25, 2026 •

Copy link
Copy Markdown
Member

With Settings > Group tabs > By project and more than one server, a draft tab loses its group whenever the page is a tab of another server: it drops below the divider, among the tabs with no project, and comes back when a tab of its own server is shown. A fault of #1215, found by the run of its two-server case on the merged code. Run on this PR's build with two servers: it holds (below). Official paths are under packages/app/src/.

What official does

A draft tab's project is its folder's, asked of the tab's own server whichever server the page is on: shell/titlebar/auto-tab-sections.tsx:39-42 (global.serverCtx(tab.server)?.projects.forDirectory(tab.directory)).

What ours did

apps/desktop/src/shell/tabs/auto_groups.rs project_of gave a draft no project when its server was not the one the window works against. A session's tab did not have this: its project is kept from the last time the window worked against its server (apps/desktop/src/workspace/servers/runtime.rs snap).

The change

  • runtime.rs snap: a draft tab's project (its folder's) is kept with its server's other tabs' when the window leaves that server.
  • auto_groups.rs project_of: a draft on another server takes that kept project, as a session's tab does.
  • 2 files, +10 -2. No manifest, lock, profile or plugin contract change.

Seen in the run of #1215's case 7

Two servers, the same project open on both, a draft tab on the app's own server, the page on the second server's tab. The list read: a header acme-web over the first server's tab; a second acme-web with the second server's tag over its tab; then the divider and the draft. With one server the same draft stood under a Default Project header.

Case to run (needs two servers: the test server)

The same set-up as above on this PR's Windows x64 build, Side tabs, By project.

  1. The page on the second server's tab. See: the draft under a header of its own project (Default Project in that set-up), no divider, nothing below one. Before (the build of dev): the draft below the divider.
  2. Press the first server's tab, then the second server's again. See: the draft does not move.

What has run

Headless, on this PR's Windows x64 CI build (head 71947f458), with the test server and a second server; a fresh profile; Consolidated, Side tabs, By project; the same project open on both servers; a draft tab on the first.

Case Head Result
1 71947f458 holds: three headers: the draft's own project over the draft; the project over the first server's tab; the project with the second server's tag over its tab. No divider; nothing below the last group. The draft's header stands first: its tab is first in the saved order
2 71947f458 holds: with the first server's tab as the page, and the second's again, the draft stays where it was
Before 1170f8b9f: the build of #1215's merged head, which is what dev got the draft below the divider, under no header

Not run (by reading)

  • By server in the same set-up; a draft made on the second server; three servers.
  • macOS, Linux, a real window.- A draft of a server the window has not worked against since it started has no kept project until the window first shows a tab of that server; then it joins its group. A session's tab has the same limit today. Official asks the server's own list, which it holds for every server at once.

…is another server's

Group tabs > By project gave a draft tab no project whenever the window worked against another server than the draft's, so it dropped below the divider and came back when a tab of its own server was shown. Official takes a draft's project from its folder on its own server (packages/app/src/shell/titlebar/auto-tab-sections.tsx:39-42). Its project is now kept with the server's other tabs' when the window leaves that server.
@Hona
Hona marked this pull request as ready for review November 25, 2026 19:32
@Hona
Hona merged commit 93a023b into dev Nov 25, 2026
7 checks passed
@Hona
Hona deleted the upstream-g/group-draft-project branch November 25, 2026 19:33
Hona added a commit that referenced this pull request Nov 25, 2026
…r its server run and #1258 (#1263)

One official commit since a021b09474: opencode#66439 changes the site's header (services/site): no row. UP-235 (Settings > Group tabs): its server run, the draft-tab fault that run found and #1258 fixed, and what is still not run.
Hona added a commit that referenced this pull request Nov 25, 2026
Hona added a commit that referenced this pull request Nov 25, 2026
…breaks

dev now holds #1215 as one commit, #1258's fix and the Rune pin with TabStrip::breaks (rune#2291). The four files this branch rewrote keep this branch's side, with #1258's one line in auto_groups.rs project_of.
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