feat(desktop): update button in the new shell's title bar

AV
2d ago
+698-131

Summary

  • The redesigned shell gets a real update button in the title bar, replacing the small rail icon that was easy to miss.
  • Fixes two existing title bar bugs seen while the right pane opens or closes: its tabs jumped on every frame, and its tab strip stayed on screen until the close finished.

Why / Context

In the new shell the update control was an icon at the bottom of the navigation rail. It did not look like the rest of the shell and people did not notice it.

The two tab bar bugs are not caused by the button. They showed up while testing it and are on main today.

How It Works

Update button (TitleBar/components/UpdateButton)

  • Sits at the end of the title bar's left control group, 76 x 24px, the same width in every state.
  • Ready: solid accent button with "Update". Downloading and installing: neutral button with a dithered accent fill drawn on a small canvas (DitherFill), with the percent while downloading. Done: a short "Updated" confirmation that fades out. Error: "Retry".
  • The update state machine moves out of UpdatesPill into renderer/hooks/useUpdateControl. The legacy sidebar still uses UpdatesPill, now on the shared hook. PreUpdateConfirmPopover moves up to renderer/components because both controls use it.
  • The rail no longer renders an update control.

Tabs jumping during the slide (packages/panes TabBar)

  • The add button sits inside the tab scroller when the tabs fit and outside it when they overflow. That changed the bar's minimum width by the button's 40px.
  • The title bar holds the right pane's bar at its minimum width while the pane is narrower than that, so the bar flipped between the two layouts on every frame (200px and 240px, tab 72px and 90px).
  • The scroller's minimum width now includes the add button's width while the button is inside it, so the minimum is the same in both layouts.

Tab strip left on screen during a close (TitleBar, TitleBarSlotsProvider, SidebarSlide)

  • SidebarSlide sets data-moving while it animates.
  • useTitleBarSideSlot watches that attribute and reports the pane's resting span as layoutWidth while it is set. Expand moves have no resting width, so they keep the old layout.
  • While layoutWidth is set, TitleBar lays the side slot out at that fixed width, anchored right, and clips it to the visible span. At rest the slot keeps min-w-min, so the high-zoom behavior from #10028 is unchanged.

Manual QA Checklist

Checked in a dev build over CDP, macOS, 100% zoom:

  • Command palette "Simulate update: downloading" runs percent, then "Update"; clicking it shows "Updating…", then "Updated", then the button leaves
  • "Simulate update: error" shows "Retry"
  • Button position does not change while the right pane opens and closes, with the left sidebar open and collapsed
  • Right pane open and close with 1, 2 and 5 tabs: per-frame trace shows no width reversals in the tab strip or the first tab
  • Right pane close: the strip's visible width follows the pane to zero; open: the strip is at its final position from the first frame
  • Light and dark theme, ready state

Not checked:

  • Zoom levels other than 100% (the slide layout multiplies the width by the zoom factor on macOS)
  • Right pane "expand to full width" slide (it keeps the previous layout)
  • Windows and Linux
  • The pre-update notice popover, which now opens below the button
  • Main area tab bar with many tabs (it shares the TabBar change)

Testing

  • bunx tsc --noEmit in apps/desktop and packages/panes
  • biome check on the changed paths
  • bun run check:i18n (3 new strings translated in every locale)
  • bun test for TabBar utils (new minimum-width test), resolvePhase (new), SidebarSlide, WorkspaceSplitLayout

Known Limitations

  • With the left sidebar collapsed, the main tabs start after the left control group, so they move by the button's width when an update appears and when it leaves.
  • Translations longer than the English labels truncate inside the fixed width; the full text is in the tooltip and aria-label.
  • The dev-only "Simulate update" toast still says "↑ update pill".

Summary by cubic

Gives the redesigned shell a real update button in the title bar, replacing the easy-to-miss rail icon, and fixes two bugs where the right pane's tab bar jumped or lingered while sliding.

  • Fixed-width button sits at the end of the title bar's left controls, with a dithered fill and percent while downloading and installing; the pre-update confirmation now opens below it.
  • The update state machine moved into renderer/hooks/useUpdateControl, now shared with the legacy sidebar's UpdatesPill.
  • The navigation rail no longer renders an update control.
  • The tab bar's minimum width no longer changes when the add button moves in or out of the scroller, so tabs stop jumping during the slide.
  • While the pane slides, the tab strip lays out at the pane's resting width and is clipped to the visible span, so it no longer lingers after a close; expand-to-full-width moves keep the previous layout.

Summary by CodeRabbit

  • New Features
    • Added an update button to the title bar with download progress, installation status, error feedback, and a confirmation prompt. Installing an update keeps sessions running.
    • Improved tab bar sizing to better accommodate the add-tab button and overflowing tabs.
    • Added update messages in 20 languages.
  • Bug Fixes
    • Improved update version display and status handling, including installation progress and completion feedback.