Skip to content

🤖 fix: show the selected sidebar tab whole on a narrow pane under the window-controls inset - #7174

Merged
ThomasK33 merged 2 commits into
mainfrom
fixnext-tab-fit
Oct 22, 2026
Merged

ThomasK33 merged 2 commits into
mainfrom
fixnext-tab-fit

Conversation

@ThomasK33

@ThomasK33 ThomasK33 commented Oct 22, 2026 •

Copy link
Copy Markdown
Member

Summary

On a narrow right sidebar under the Windows/Linux window-controls inset, the selected tab now shows whole. The selected tab is capped at the tab row's width, so its label truncates and its close X stays in view. Before, the selected tab was cut off at the row's end, and its badge and X were hidden.

Fixes #7103

Stack 4 of 4 (top), on #7173. The coordinator chose this option (cap the tab) over hiding "+" on narrow panes, which alone did not free enough room.

Background

.titlebar-safe-right-capped leaves 10rem for the strip's content. At the 300 px minimum sidebar width with the 138 px fallback inset, the row gets 73 px. The selected Stats tab with its cost badge is 111 px wide. Raising the cap is not an option: at 300 px it puts strip controls under the window controls.

Implementation

max-w-full on the selected tab's wrapper. The tab keeps its fixed max-w-[240px]. Only the selected tab gets the cap: a capped terminal tab is mostly its pop-out and close buttons, so a click at the center of an unselected one hit "Open terminal in new window" (the first CI run failed sidebarDragDrop.spec.ts and terminal.spec.ts that way). I first put a percentage cap on the tab itself. That broke the wide layout: during intrinsic sizing the browser ignores a percentage max-width, so the row was sized for the uncapped tab and kept 71 px of empty space after the last tab (the Wide play caught it). The wrapper's cap resolves against the row, which has a definite width.

Validation

  • TabsReachableUnderWideTitlebarInset is now one of two stories from titlebarInsetStory(insetPx, sidebarWidthPx). It has the restored expectSelectedTabVisible check, and the cost badge on Stats. The new SelectedTabFitsUnderTitlebarInset covers the 138 px inset at 300 px. Both fail on main ("selected tab 9-123 is outside its strip 9-82") and pass here.
  • The Stable tab controls plays (Narrow, Wide, Cramped, ArrowKeys) and App.seededWorkspaceA11y / App.titlebarDrag pass.

300 px sidebar, 138 px inset (red hatch: window-controls area). Before:

Before: the selected Stats tab is cut off at the row's end

After:

After: the selected tab shows whole with a truncated label and its X

375 px window (no inset on phones; the strip is unchanged there):

Tab strip at a 375 px window

Risks

Low. The cap only changes a selected tab wider than the row. Wider rows keep the 240 px cap.


Generated with xum • Model: anthropic:claude-opus-5-5 • Thinking: high • Cost: $47.52

@ThomasK33
ThomasK33 added this pull request to stack #7175 October 22, 2026 10:17
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 22, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-22T18:09:06.631733Z 9b857bc New commits
🔒 Security Review ✅ Completed 2026-10-22T18:10:00.455394Z 9b857bc New commits
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@ThomasK33 ThomasK33 changed the title 🤖 fix: show the selected sidebar tab whole on a narrow pane under the window-controls inset (#7103) 🤖 fix: show the selected sidebar tab whole on a narrow pane under the window-controls inset Oct 22, 2026
@ThomasK33

Copy link
Copy Markdown
Member Author

@codex review

@ThomasK33

Copy link
Copy Markdown
Member Author

Perf clearance (perf owner 8e18f4aada): CLEARED at head dbf0cb19ce04e8c9b80b1d9ffaa5ebf93fbfec05 (checked with ls-remote), base fixnext-tab-arrows 0249f58642.

  • The numstat matches the request: one class change in RightSidebarTabStrip.tsx, plus stories.
  • React Compiler: 8 compiled, 0 bailouts, unchanged.
  • Re-clear on any push that changes product files.

Generated with xum • Model: anthropic:claude-opus-5-5 • Thinking: high

@chatgpt-codex-connector

Copy link
Copy Markdown

🛡️ Codex Security Review · Automatically triggered

Security review completed. No security issues were found in this pull request.

Reviewed commit: dbf0cb19ce

View security finding report

Only the user who started this review can view the report in Codex.

ℹ️ About Codex security reviews in GitHub

This is an experimental Codex feature. Security reviews are triggered when:

  • You comment "@codex security review"
  • A regular code review gets triggered (for example, "@codex review" or when a PR is opened), and you’re opted in so security review runs alongside code review

Once complete, Codex will leave suggestions, or a comment if no findings are found.

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. 👍

Reviewed commit: dbf0cb19ce

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@github-actions

github-actions Bot commented Oct 22, 2026 •

Copy link
Copy Markdown
Contributor

🟢 e2e stories (Haiku): 14 passed

27 agent steps · 7 replayed from cache · 30 model calls · 207.0k tokens (72% cached)
Spend: $0.09 of the $1.00 cap (proxy ledger)

All 14 tests in 9 files
Test Agent Time
🟢 chatRestart.e2e.ts · 1 passed 2 steps · 4 calls 25.0s
🟢 a chat survives a restart of the server 2 steps · 4 calls 25.0s
🟢 compaction.e2e.ts · 1 passed 3 steps · 7 calls 51.1s
🟢 /compact replaces the old chat with a summary 3 steps · 7 calls 51.1s
🟢 pluginTrustRestart.e2e.ts · 1 passed 4 steps · 2 calls 14.6s
🟢 a trusted plugin hook stays trusted after the server restarts 4 steps · 2 calls 14.6s
🟢 settingsRoundTrip.e2e.ts · 1 passed 3 steps · 4 calls 31.7s
🟢 a chat survives trips through Settings 3 steps · 4 calls 31.7s
🟢 sidebarPerWorkspace.e2e.ts · 1 passed 4 steps · 1 call 5.0s
🟢 a new workspace starts with its right sidebar collapsed while another keeps it open 4 steps · 1 call 5.0s
🟢 smoke.e2e.ts · 1 passed 2 steps · 1 call 4.2s
🟢 the agent opens the playground workspace 2 steps · 1 call 4.2s
🟢 streamErrors.e2e.ts · 1 passed 1 step · 1 call 7.3s
🟢 stream errors show in the chat, and the chat recovers 1 step · 1 call 7.3s
🟢 todoNudge.e2e.ts · 1 passed 2 steps · 4 calls 24.8s
🟢 the agent finishes open TODO items after the turn-end nudge 2 steps · 4 calls 24.8s
🟢 touchAlignment.e2e.ts · 6 passed 6 steps · 6 calls 25.1s
🟢 the Settings close button is level with the title on a touch screen 390px wide 1 step · 1 call 4.0s
🟢 the Settings close button is level with the title on a touch screen 768px wide 1 step · 1 call 5.3s
🟢 Backup settings checkboxes are small and level with their labels on a touch phone 1 step · 1 call 6.3s
🟢 the heartbeat checkbox is small and level with its label on a touch phone 1 step · 1 call 3.4s
🟢 a reply's model and time stay on one line on a touch phone 1 step · 1 call 3.1s
🟢 the workspace actions menu stays on the title row on a touch phone 1 step · 1 call 2.9s

e2e 0.20.0 · 3m 12s · web · run artifacts

🟢 e2e Electron stories (Haiku): 3 passed

3 agent steps · 3 model calls · 8.0k tokens (21% cached)
Spend: $0.02 of the $1.00 cap (proxy ledger)

All 3 tests in 3 files
Test Agent Time
🟢 electron/deepLink.e2e.ts · 1 passed 1 step · 1 call 7.7s
🟢 a deep link of a second launch starts a chat in the running app 1 step · 1 call 7.7s
🟢 electron/menuBar.e2e.ts · 1 passed 1 step · 1 call 7.0s
🟢 the workspace menu bar is the desktop title bar 1 step · 1 call 7.0s
🟢 electron/smoke.e2e.ts · 1 passed 1 step · 1 call 6.5s
🟢 Xum Electron opens the playground workspace 1 step · 1 call 6.5s

e2e 0.20.0 · 23.8s · electron · run artifacts

🟢 e2e agent repros (Haiku): no tests selected

Spend: $0.00 of the $1.00 cap (proxy ledger)

e2e 0.20.0 · 6.6s · 2 targets (web, phone) · run artifacts

@ThomasK33

Copy link
Copy Markdown
Member Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Hooray!

Reviewed commit: c616c1283c

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@chatgpt-codex-connector

Copy link
Copy Markdown

🛡️ Codex Security Review · Automatically triggered

Security review completed. No security issues were found in this pull request.

Reviewed commit: c616c1283c

View security finding report

Only the user who started this review can view the report in Codex.

ℹ️ About Codex security reviews in GitHub

This is an experimental Codex feature. Security reviews are triggered when:

  • You comment "@codex security review"
  • A regular code review gets triggered (for example, "@codex review" or when a PR is opened), and you’re opted in so security review runs alongside code review

Once complete, Codex will leave suggestions, or a comment if no findings are found.

@ThomasK33

Copy link
Copy Markdown
Member Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

🛡️ Codex Security Review · Automatically triggered

Security review completed. No security issues were found in this pull request.

Reviewed commit: 6742cdf13c

View security finding report

Only the user who started this review can view the report in Codex.

ℹ️ About Codex security reviews in GitHub

This is an experimental Codex feature. Security reviews are triggered when:

  • You comment "@codex security review"
  • A regular code review gets triggered (for example, "@codex review" or when a PR is opened), and you’re opted in so security review runs alongside code review

Once complete, Codex will leave suggestions, or a comment if no findings are found.

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Breezy!

Reviewed commit: 6742cdf13c

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@ThomasK33

Copy link
Copy Markdown
Member Author

Perf re-clearance (perf owner 8e18f4aada): CLEARED at head 6742cdf13cf68137941784d5c1e6fc8d39128b5a (checked with ls-remote). A re-clear request for this stack named heads that GitHub does not have (HTTP 422), and it said only #7171 changed. I cleared the real pushed heads instead, from my own read.

  • Delta from dbf0cb1: only the selected tab is capped at the row width (class logic).
  • React Compiler: RightSidebarTabStrip.tsx compiles 9 components, 0 bailouts.
  • Re-clear on any push that changes product files.

Generated with xum • Model: anthropic:claude-opus-5-5 • Thinking: high

@ThomasK33

Copy link
Copy Markdown
Member Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

🛡️ Codex Security Review · Automatically triggered

Security review completed. No security issues were found in this pull request.

Reviewed commit: f5131b6e5e

View security finding report

Only the user who started this review can view the report in Codex.

ℹ️ About Codex security reviews in GitHub

This is an experimental Codex feature. Security reviews are triggered when:

  • You comment "@codex security review"
  • A regular code review gets triggered (for example, "@codex review" or when a PR is opened), and you’re opted in so security review runs alongside code review

Once complete, Codex will leave suggestions, or a comment if no findings are found.

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. 🎉

Reviewed commit: f5131b6e5e

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@ThomasK33

Copy link
Copy Markdown
Member Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

🛡️ Codex Security Review · Automatically triggered

Security review completed. No security issues were found in this pull request.

Reviewed commit: 0e443168c3

View security finding report

Only the user who started this review can view the report in Codex.

ℹ️ About Codex security reviews in GitHub

This is an experimental Codex feature. Security reviews are triggered when:

  • You comment "@codex security review"
  • A regular code review gets triggered (for example, "@codex review" or when a PR is opened), and you’re opted in so security review runs alongside code review

Once complete, Codex will leave suggestions, or a comment if no findings are found.

@ThomasK33

Copy link
Copy Markdown
Member Author

Perf re-clearance (perf owner 8e18f4aada): CLEARED at head 0e443168c3efe658c83f0ec77b82c5b566ca8825 (checked with ls-remote).

  • The numstat matches the request: one class change (max-w-full on the selected tab's wrapper), plus stories.
  • React Compiler: RightSidebarTabStrip.tsx compiles 8 components, 0 bailouts.
  • Re-clear on any push that changes product files.

Generated with xum • Model: anthropic:claude-opus-5-5 • Thinking: high

@ThomasK33

Copy link
Copy Markdown
Member Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. More of your lovely PRs please.

Reviewed commit: 0e443168c3

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@chatgpt-codex-connector

Copy link
Copy Markdown

🛡️ Codex Security Review · Automatically triggered

Security review completed. No security issues were found in this pull request.

Reviewed commit: 0e443168c3

View security finding report

Only the user who started this review can view the report in Codex.

ℹ️ About Codex security reviews in GitHub

This is an experimental Codex feature. Security reviews are triggered when:

  • You comment "@codex security review"
  • A regular code review gets triggered (for example, "@codex review" or when a PR is opened), and you’re opted in so security review runs alongside code review

Once complete, Codex will leave suggestions, or a comment if no findings are found.

@ThomasK33

Copy link
Copy Markdown
Member Author

Perf re-clearance (perf owner 8e18f4aada): CLEARED at head 1875c45029e6994ebb82c1bbb6bcefc0547dd3ac (checked with ls-remote).


Generated with xum • Model: anthropic:claude-opus-5-5 • Thinking: high

@ThomasK33

Copy link
Copy Markdown
Member Author

Perf re-clearance (perf owner 8e18f4aada): CLEARED at head efe0eab0923fed8ac49972b6d66e14ca4f591963 (checked with ls-remote).


Generated with xum • Model: anthropic:claude-opus-5-5 • Thinking: high

@ThomasK33

Copy link
Copy Markdown
Member Author

Perf re-clearance (perf owner 8e18f4aada): CLEARED at head 51c9a01dd57e0981286c267d4509dc40760c0991 (checked with ls-remote). This replaces my clearance at efe0eab.


Generated with xum • Model: anthropic:claude-opus-5-5 • Thinking: high

asm pushed a commit to asm/mux that referenced this pull request Oct 22, 2026
…r under a full-screen panel (coder#7170)

## Summary

The tutorial bubble no longer takes keyboard focus in two cases: when
the user's focus is already in a text field (the composer), and when a
full-screen layer such as the Artifacts or App View panel covers the
bubble. In both cases Escape went to the bubble and skipped a tutorial
the user never chose to act on. The bubble stays clickable.

Fixes coder#7114

Stack 1 of 4 (bottom). The other layers: coder#7171 (dialog Escape, coder#7141),
coder#7173 (tab arrow keys, coder#7102), coder#7174 (selected tab fit, coder#7103).

## Background

`useBubbleFocus` (`TutorialTooltip.tsx`) called `bubble.focus()` as soon
as the bubble was positioned. It checked neither the element that had
focus nor what was drawn over the bubble. The full-screen panels
(z-1500) sit above the tutorial and are not modal, so nothing trapped
focus away from the bubble. The related finding in the issue comments:
the creation tutorial took focus from a composer the user had already
focused.

## Implementation

One guard before `bubble.focus()`:

1. `isEditableElement(document.activeElement)`: leave focus in a text
field.
2. `isBubbleCovered(bubble)`: a hit test at the bubble's center. If the
top element there is not inside the bubble, something covers it. A hit
test needs no list of overlay layers. An unknown result (no layout,
center off screen) counts as uncovered, so the old behavior holds there.

The restore cleanup is registered in every case. A click on Skip or Next
moves focus from the composer into the bubble, and focus must go back to
the composer when the bubble closes (Codex review).

### Contract change for coder#5701

The coder#5701 repro
(`tests/bugbash/repros/tutorialEscapeOverSettings.e2e.ts`) said the
bubble "owns focus while nothing covers it". The app opens on the
creation form with the composer focused, so with this PR the bubble no
longer takes focus there. The new contract: the bubble takes focus only
while nothing covers it and no text field has it. Escape on the bubble
still closes it. Reason: the coder#7114 comment shows the bubble taking focus
from a composer the user had focused, and Escape then skipped the
tutorial. The coordinator chose this over keeping the old contract.

The repro now clicks the bubble's title first, as a keyboard user would
Tab to it. Its other steps, assertions and tags do not change.

## Validation

- Two new tests in `TutorialTooltip.test.tsx` (composer focus kept,
covered bubble). Both fail on `main` and pass here. The covered case
stubs `document.elementFromPoint`, because happy-dom computes no layout.
- A third new test: after focus moves into the bubble (a click on Skip),
closing the bubble returns focus to the composer. It fails without the
always-registered cleanup.
- The existing focus tests now start from a focused header button
instead of the composer, since the composer case changed on purpose.
- `make test-bugbash-repros` with `--grep tutorial` (mock AI): the
updated coder#5701 repro passes on web and phone.

## Follow-up

coder#7198 tracks two Codex findings deferred from review round 5: hand focus
to the bubble when a covering panel closes, and make the bubble the next
Tab destination from a focused composer.

## Risks

Low. Only the first focus move of a bubble changes. Keyboard users who
start from a button still get focus in the bubble (coder#5701 behavior).

---

_Generated with `xum` • Model: `anthropic:claude-opus-5-5` • Thinking:
`high` • Cost: `$47.52`_

<!-- mux-attribution: model=anthropic:claude-opus-5-5 thinking=high
costs=47.52 -->
Base automatically changed from fixnext-tab-arrows to main October 22, 2026 18:07
@ThomasK33

Copy link
Copy Markdown
Member Author

Perf re-clearance (perf owner 8e18f4aada): CLEARED at head 9b857bc6c4d3f096129b856caac94750764ea870 (checked with ls-remote), base main ebec1764ac (#7173 merged).

  • The patch against its merge-base is line for line the same as 118c9d95c5..51c9a01dd5 (0 differing +/- lines), so my clearance of 51c9a01 carries over.
  • Re-clear on any push that changes product files.

Generated with xum • Model: anthropic:claude-opus-5-5 • Thinking: high

@ThomasK33
ThomasK33 added this pull request to the merge queue Oct 22, 2026
Merged via the queue into main with commit 9cecaa7 Oct 22, 2026
37 of 38 checks passed
@ThomasK33
ThomasK33 deleted the fixnext-tab-fit branch October 22, 2026 18:47
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.

🤖 Right sidebar tab strip: selected tab cut off on narrow panes with a window-controls inset

1 participant