Skip to content

fix(desktop): move the ship controls back into the workspace tab bar - #8057

Merged
saddlepaddle merged 2 commits into
mainfrom
saddlepaddle/statuesque-fox-6e78733f
Oct 2, 2026
Merged

saddlepaddle merged 2 commits into
mainfrom
saddlepaddle/statuesque-fox-6e78733f

Conversation

@saddlepaddle

@saddlepaddle saddlepaddle commented Oct 2, 2026 •

Copy link
Copy Markdown
Collaborator

Reverses #7958. The Changes/PR control and the open-in button return to the pane tab bar's trailing slot, before the sidebar toggle, so they stay reachable while the right sidebar is closed. The sidebar's top strip is back to Pages and Run.

Screenshots from the dev app (sidebar open, Changes open, sidebar closed): https://app.superset.sh/page/ship-controls-back-in-the-tab-bar-379gxd

Verified over CDP: pills visible with the sidebar open and closed; one click opens the Changes pane and the sidebar on Changes, a second click closes both. Desktop typecheck, the 362 tests under the route, and Biome pass.

Co-Authored-By: Claude noreply@anthropic.com


Summary by cubic

Moves the Changes/PR control and open-in button back to the workspace tab bar's trailing slot, ahead of the sidebar toggle, so they stay reachable while the right sidebar is closed. The sidebar's top strip is back to Pages and Run, and the 48px strip height from #8023 is kept.

  • Closing Changes closes the sidebar with it again when the sidebar is on the Changes tab, via the new getWorkspaceSidebarTab read.
  • The Changes control is slightly taller to fit the tab bar.
  • Drops the host-service probe that raced two worktree adds against git itself.

Written for commit b61d4d4. Summary will update on new commits.

Review in cubic

Summary by CodeRabbit

  • Interface
    • The Changes control and Open In button now appear in the workspace tab bar instead of the sidebar. The Open In button remains available even when the sidebar is closed.
    • The Changes control has more vertical space, and the sidebar header layout has been adjusted.
  • Bug Fixes
    • Closing the Changes pane no longer closes the sidebar when a different sidebar tab is selected.

Also drops the host-service probe bug-hunt-3: parallel workspace.create calls for different branches can race on the same .git/config. It raced two worktree adds against git itself and failed this PR's first run with failed to read .git/worktrees/a/commondir; its own note said to retire it once it started failing.

Reverses #7958. The Changes/PR control and the open-in button return to
the pane tab bar's trailing slot, before the sidebar toggle, so they stay
reachable while the right sidebar is closed. The sidebar's top strip is
back to Pages and Run.

- Closing Changes takes the sidebar down with it again when the sidebar is
  on the Changes tab; getWorkspaceSidebarTab and its test return.
- The strip keeps its 48px height from #8023 and still sizes the Run
  hotkey hint off the strip width.

Co-Authored-By: Claude <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Oct 2, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

Navigate logical layers of code changes, visualize relationships, and explore their blast radius.

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Advanced

Run ID: f08c7e2e-8b27-4071-8e82-c785d7c2664b

📥 Commits

Reviewing files that changed from the base of the PR and between e139972 and b61d4d4.

📒 Files selected for processing (1)
  • packages/host-service/test/integration/bug-hunt-3.integration.test.ts
💤 Files with no reviewable changes (1)
  • packages/host-service/test/integration/bug-hunt-3.integration.test.ts

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 7 remain after this review.


📝 Walkthrough

Walkthrough

The Changes and open-in controls move from the workspace sidebar to the tab bar. A new utility reads the selected sidebar tab. Closing the Changes pane closes the right sidebar only when the selected tab is “changes.” A host-service integration test for concurrent workspace creation is removed.

Changes

Workspace controls and sidebar behavior

Layer / File(s) Summary
Sidebar tab lookup and Changes pane closing
apps/desktop/src/renderer/routes/_authenticated/_dashboard/v2-workspace/$workspaceId/utils/setWorkspaceSidebarTab/*, apps/desktop/src/renderer/routes/_authenticated/_dashboard/v2-workspace/$workspaceId/hooks/useWorkspacePaneOpeners/useWorkspacePaneOpeners.ts
Adds getWorkspaceSidebarTab, tests its row and rowless-workspace behavior, and uses it to conditionally close the right sidebar when toggling the Changes pane.
Tab-bar controls and sidebar header
apps/desktop/src/renderer/routes/_authenticated/_dashboard/v2-workspace/$workspaceId/page.tsx, apps/desktop/src/renderer/routes/_authenticated/_dashboard/v2-workspace/$workspaceId/components/WorkspaceSidebar/*, apps/desktop/src/renderer/routes/_authenticated/_dashboard/v2-workspace/$workspaceId/components/ChangesControl/*
Moves the Changes and open-in controls to the tab bar, removes shipControls from the sidebar header props, and updates Changes control sizing and descriptions.

Host-service integration test

Layer / File(s) Summary
Remove workspace concurrency test
packages/host-service/test/integration/bug-hunt-3.integration.test.ts
Removes the integration test that concurrently created workspaces on separate branches and asserted that neither call failed.

Priority: ⬇️ Low

Estimated code review effort: 2 (Simple) | ~10 minutes

Change: Bug fix

Merge Risk: ⚪ Minimal · up to b61d4

The change moves the Changes and open-in controls back into the tab bar and removes a flaky concurrency test. No concrete merge-blocking risk was identified in the supplied context.

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 20.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 5 functions across 10 files. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Title check ✅ Passed The title uses conventional commit format and clearly describes the main change: moving the ship controls back into the workspace tab bar.
Description check ✅ Passed The description explains the change and reason, documents testing and screenshots, and covers the key behavior changes. The repository checklist is not reproduced, but the relevant test and title chec…
  • Fix all pre-merge checks with AI
✨ Finishing Touches 💡 1
📝 Generate docstrings 💡
  • Commit to this branch
  • Create a new PR
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR
  • Autopilot · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Autopilot is currently an internal CodeRabbit preview.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@greptile-apps

greptile-apps Bot commented Oct 2, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerConfidence Score: 4/5

[Medium risk] Moves ship controls from sidebar header to workspace tab bar.

The PR appears safe to merge, with non-blocking tab-bar sizing and interaction-test improvements recommended.

Findings

  1. P2 Unbounded Changes control width ▶
  2. P2 Sidebar interaction remains untested ▶
Fix with agent prompt
### Issue 1
apps/desktop/src/renderer/routes/_authenticated/_dashboard/v2-workspace/$workspaceId/components/ChangesControl/ChangesControl.tsx:76
On a narrow workspace window, large addition and deletion totals can make this button wider than the space available. The tab bar's trailing controls do not shrink, so the wider Changes control leaves less room for pane tabs and can push other controls beyond the bar. Please keep the stats face bounded in its new location.

Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!

### Issue 2
apps/desktop/src/renderer/routes/_authenticated/_dashboard/v2-workspace/$workspaceId/utils/setWorkspaceSidebarTab/setWorkspaceSidebarTab.test.ts:51-60
This test covers reading the active tab, but not the new behavior that closes the Changes pane and conditionally closes the sidebar. Please test that closing Changes also closes a sidebar still on Changes, while a sidebar switched to Files or Review stays open. Otherwise, a regression in that interaction could pass the tests.

---

For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.

Summary

Moves Changes/PR and open-in controls from the right-sidebar strip to the workspace tab bar, and makes closing a visible Changes pane close the sidebar when it remains on Changes.

  • Restores a Pages-and-Run sidebar strip and adds a getter for the workspace’s active sidebar tab.
  • The new trailing controls need bounded width and the pane/sidebar interaction lacks an automated test.

Reviews (1) · Last reviewed commit: "fix(desktop): move the ship controls bac..."

title={label}
className={cn(
"flex min-w-0 items-center gap-1 overflow-hidden px-2 text-xs text-muted-foreground outline-none transition-colors hover:bg-accent/60 hover:text-foreground focus-visible:bg-accent/60 focus-visible:text-foreground",
"flex items-center gap-1 px-2 text-xs text-muted-foreground outline-none transition-colors hover:bg-accent/60 hover:text-foreground focus-visible:bg-accent/60 focus-visible:text-foreground",

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.

P2 Unbounded Changes control width

On a narrow workspace window, large addition and deletion totals can make this button wider than the space available. The tab bar's trailing controls do not shrink, so the wider Changes control leaves less room for pane tabs and can push other controls beyond the bar. Please keep the stats face bounded in its new location.

Prompt To Fix With AI
This is a comment left during a code review.
Path: apps/desktop/src/renderer/routes/_authenticated/_dashboard/v2-workspace/$workspaceId/components/ChangesControl/ChangesControl.tsx
Line: 76

Comment:
**Unbounded Changes control width**

On a narrow workspace window, large addition and deletion totals can make this button wider than the space available. The tab bar's trailing controls do not shrink, so the wider Changes control leaves less room for pane tabs and can push other controls beyond the bar. Please keep the stats face bounded in its new location.

---

For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.

Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!

Comment on lines +51 to +60
it("reads the row's tab, then the rowless fallback, then the default", () => {
const collections = stubCollections({
"ws-1": { sidebarState: { activeTab: "review" } },
});

expect(getWorkspaceSidebarTab(collections, "ws-1")).toBe("review");
expect(getWorkspaceSidebarTab(collections, "main-ws")).toBe("changes");
setWorkspaceSidebarTab(collections, "main-ws", "files");
expect(getWorkspaceSidebarTab(collections, "main-ws")).toBe("files");
});

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.

P2 Sidebar interaction remains untested

This test covers reading the active tab, but not the new behavior that closes the Changes pane and conditionally closes the sidebar. Please test that closing Changes also closes a sidebar still on Changes, while a sidebar switched to Files or Review stays open. Otherwise, a regression in that interaction could pass the tests.

Knowledge Base Used: Restore per-mount v2 pane store synchronization

Prompt To Fix With AI
This is a comment left during a code review.
Path: apps/desktop/src/renderer/routes/_authenticated/_dashboard/v2-workspace/$workspaceId/utils/setWorkspaceSidebarTab/setWorkspaceSidebarTab.test.ts
Line: 51-60

Comment:
**Sidebar interaction remains untested**

This test covers reading the active tab, but not the new behavior that closes the Changes pane and conditionally closes the sidebar. Please test that closing Changes also closes a sidebar still on Changes, while a sidebar switched to Files or Review stays open. Otherwise, a regression in that interaction could pass the tests.

**Knowledge Base Used:** [Restore per-mount v2 pane store synchronization](https://app.greptile.com/personal-org-6810/-/custom-context/knowledge-base/superset-sh/superset/-/reverts/revert_4017-20260503-pane-store-registry-regressions-06bbdb2.md)

---

For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.

@cubic-dev-ai cubic-dev-ai 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.

1 issue found across 10 files

Prompt for AI agents (unresolved issues)

Check if these issues are valid — if so, understand the root cause of each and fix them. When an issue isn't valid or won't be fixed in this PR, reply in its thread with the reason and then resolve the thread. If appropriate, use sub-agents to investigate and fix each issue separately.


<file name="apps/desktop/src/renderer/routes/_authenticated/_dashboard/v2-workspace/$workspaceId/components/ChangesControl/ChangesControl.tsx">

<violation number="1" location="apps/desktop/src/renderer/routes/_authenticated/_dashboard/v2-workspace/$workspaceId/components/ChangesControl/ChangesControl.tsx:76">
P2: Bound the stats face again by restoring `min-w-0 overflow-hidden` so large totals cannot expand this trailing control and crowd the pane tabs.</violation>
</file>
Architecture diagram
sequenceDiagram
    participant User as User
    participant Page as Workspace Page
    participant TabBar as Workspace Tab Bar
    participant Sidebar as Right Sidebar
    participant ChangesCtrl as ChangesControl
    participant Store as Workspace Pane Store
    participant SidebarStore as Sidebar Tab State

    Note over User,Page: Ship controls live in tab bar (reachable with sidebar closed)

    User->>Page: Click ChangesControl in tab bar
    Page->>ChangesCtrl: onToggleChanges()
    ChangesCtrl->>Store: closeVisibleChangesPane(store)
    alt Changes pane was open
        Store-->>ChangesCtrl: closed
        ChangesCtrl->>SidebarStore: getWorkspaceSidebarTab(collections, workspaceId)
        alt Sidebar is on Changes tab
            SidebarStore-->>ChangesCtrl: "changes"
            ChangesCtrl->>Page: setRightSidebarOpen(false)
            Page->>Sidebar: Close sidebar
        else Sidebar on Files/Review
            SidebarStore-->>ChangesCtrl: other tab
            Note over ChangesCtrl,Sidebar: Sidebar stays open (serving other content)
        end
    else Changes pane was closed
        Store-->>ChangesCtrl: was open
        ChangesCtrl->>Page: openChangesPaneInStore() + setRightSidebarOpen(true)
        Page->>Sidebar: Open sidebar on Changes tab
    end

    Note over TabBar,Sidebar: Tab bar composition
    Page->>TabBar: Render ChangesControl (h-7) + OpenInButton + SidebarToggle
    Note over TabBar: OpenInButton no longer depends on sidebar open state
    Page->>Sidebar: Render PRActionHeader (Pages menu + Run button only)
    Note over Sidebar: Top strip back to Pages + Run, 48px height preserved
Loading

Reply with feedback, questions, or to request a fix.

Re-trigger cubic

title={label}
className={cn(
"flex min-w-0 items-center gap-1 overflow-hidden px-2 text-xs text-muted-foreground outline-none transition-colors hover:bg-accent/60 hover:text-foreground focus-visible:bg-accent/60 focus-visible:text-foreground",
"flex items-center gap-1 px-2 text-xs text-muted-foreground outline-none transition-colors hover:bg-accent/60 hover:text-foreground focus-visible:bg-accent/60 focus-visible:text-foreground",

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.

P2: Bound the stats face again by restoring min-w-0 overflow-hidden so large totals cannot expand this trailing control and crowd the pane tabs.

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. When an issue isn't valid or won't be fixed in this PR, reply in its thread with the reason and then resolve the thread. At apps/desktop/src/renderer/routes/_authenticated/_dashboard/v2-workspace/$workspaceId/components/ChangesControl/ChangesControl.tsx, line 76:

<comment>Bound the stats face again by restoring `min-w-0 overflow-hidden` so large totals cannot expand this trailing control and crowd the pane tabs.</comment>

<file context>
@@ -73,11 +73,11 @@ export const ChangesControl = memo(function ChangesControl({
 					title={label}
 					className={cn(
-						"flex min-w-0 items-center gap-1 overflow-hidden px-2 text-xs text-muted-foreground outline-none transition-colors hover:bg-accent/60 hover:text-foreground focus-visible:bg-accent/60 focus-visible:text-foreground",
+						"flex items-center gap-1 px-2 text-xs text-muted-foreground outline-none transition-colors hover:bg-accent/60 hover:text-foreground focus-visible:bg-accent/60 focus-visible:text-foreground",
 						isChangesOpen && "bg-accent/60 text-foreground",
 					)}
</file context>
Suggested change
"flex items-center gap-1 px-2 text-xs text-muted-foreground outline-none transition-colors hover:bg-accent/60 hover:text-foreground focus-visible:bg-accent/60 focus-visible:text-foreground",
"flex min-w-0 items-center gap-1 overflow-hidden px-2 text-xs text-muted-foreground outline-none transition-colors hover:bg-accent/60 hover:text-foreground focus-visible:bg-accent/60 focus-visible:text-foreground",

It raced two worktree adds against git itself and failed on unrelated PRs
with "failed to read .git/worktrees/a/commondir". Its own note said to
retire it once it started failing.

Co-Authored-By: Claude <noreply@anthropic.com>
@github-actions

github-actions Bot commented Oct 2, 2026 •

Copy link
Copy Markdown
Contributor

🧹 Preview Cleanup Complete

The following preview resources have been cleaned up:

  • ✅ Neon database branch

Thank you for your contribution! 🎉

@saddlepaddle
saddlepaddle merged commit e207880 into main Oct 2, 2026
24 checks passed
@saddlepaddle
saddlepaddle deleted the saddlepaddle/statuesque-fox-6e78733f branch October 2, 2026 01:50

This branch was previously deployed

1 inactive deployment
preview — b61d4d4f Deployed Oct 2, 2026 by saddlepaddle via Deploy Web #10809
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