Skip to content

fix(web): collapsed composer bar stops flipping its labels while you scroll - #13555

Merged
t3dotgg merged 2 commits into
mainfrom
t3code/fix-collapsed-composer-bar-shifting
Sep 25, 2026
Merged

t3dotgg merged 2 commits into
mainfrom
t3code/fix-collapsed-composer-bar-shifting

Conversation

@t3dotgg

@t3dotgg t3dotgg commented Sep 25, 2026 •

Copy link
Copy Markdown
Member

What Changed

When the composer is collapsed, the bar under it kept sliding left and right. Its labels (workspace, branch, model, access) switched on and off at random while you scrolled.

The bar decides between "labels" and "icons only" from each label's full text width. Since branch names got middle truncation (#12805), a branch label is two text spans: a head and a tail. The width read took the largest scrollWidth in the label, so when the label was hidden or squeezed it dropped the tail. On a real thread that made the bar measure 670px as icons but 730px as labels. That gap (~55px) is much bigger than the 16px hysteresis, so each re-measure flipped the bar. Any re-render of the toolbar can cause a re-measure, which is why it looked random.

Now labelTextWidth adds up the laid-out width of every text run in the label. Text keeps its full width when its box clips it, so the result is the same in every state (729px and 729px on the same thread). The result is capped at the label's 240px max width, since a shown label never grows past that.

UI Changes

Same thread, same 724px bar, same six re-measures.

Before: labels → icons → labels → icons → labels → icons → labels

before

📹 screen recording

After: icons → icons → icons → icons → icons → icons → icons

after

📹 screen recording

Also checked in the dev app: labels still come back when the composer expands, and the bar switches to icons right after it collapses.

Checklist

  • This PR is small and focused
  • I explained what changed and why
  • I included before/after screenshots for any UI changes
  • I included a video for animation/interaction changes

Created with Claude Opus 5.5 in Claude Code.

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Bug Fixes
    • Improved how labels are sized when space is limited, helping prevent text from being clipped or taking up more room than needed.

The context strip decides between labels and icons from each label's full
text width. It read the largest scrollWidth in the label, which drops the
tail of a middle-truncated branch name when the label is hidden or
squeezed. The strip then measured about 55px less as icons than as labels,
far more than its 16px hysteresis, so every re-measure flipped it.

Sum the laid-out width of each text run instead, which is the same in
every state.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@github-actions github-actions Bot added vouch:trusted PR author is trusted by repo permissions or the VOUCHED list. size:M 30-99 changed lines (additions + deletions). labels Sep 25, 2026
Comment thread apps/web/src/components/BranchToolbar.tsx Outdated
@github-actions

github-actions Bot commented Sep 25, 2026 •

Copy link
Copy Markdown
Contributor

Thread transfer impact

✅ Thread transfer remains within every enforced ceiling.

Provider Metric Main baseline This PR Impact PR ceiling
Codex Total thread wire 13.5 KiB 13.5 KiB +11 B (+0.1%) 15.1 KiB ✅
Codex Thread snapshot wire 7.1 KiB 7.1 KiB −5 B (−0.1%) 7.3 KiB ✅
Codex Live turn WebSocket wire 6.4 KiB 6.4 KiB +16 B (+0.2%) 7.8 KiB ✅
Codex Live turn WebSocket decoded 56.2 KiB 56.2 KiB 0 B (0.0%) 66.4 KiB ✅
Codex Live turn messages 9 9 0 (0.0%) 21 ✅
Claude Total thread wire 13.5 KiB 13.5 KiB −2 B (−0.0%) 15.1 KiB ✅
Claude Thread snapshot wire 7.1 KiB 7.1 KiB −4 B (−0.1%) 7.3 KiB ✅
Claude Live turn WebSocket wire 6.4 KiB 6.4 KiB +2 B (+0.0%) 7.8 KiB ✅
Claude Live turn WebSocket decoded 57.0 KiB 57.0 KiB 0 B (0.0%) 66.4 KiB ✅
Claude Live turn messages 9 9 0 (0.0%) 21 ✅

Baseline: ebdcda1 · PR result: 831aa4b · Source CI: success

Scenario and decoded snapshot size

10 historical turns, 5 command tools per turn, 878.9 KiB retained MCP result per historical turn, and a 1.05 MiB retained result in the measured turn.

  • Codex decoded thread snapshot: 114.0 KiB
  • Claude decoded thread snapshot: 114.7 KiB

Updated in place by a trusted workflow. PR artifacts are strictly validated and never executed.

@macroscopeapp

macroscopeapp Bot commented Sep 25, 2026 •

Copy link
Copy Markdown
Contributor

Approvability

Verdict: Approved at 831aa4b

Macroscope's review found this PR approvable — This is a focused one-file UI bug fix that makes the existing composer label measurement stable, including a cap matching the labels’ current rendered maximum width. It introduces no new capability, schema, deployment behavior, or sensitive-path changes.

You can add or adjust custom eligibility rules. Learn more.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Sep 25, 2026

Copy link
Copy Markdown

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: Repository: pingdotgg/t3code/.coderabbit.yaml

Review profile: CHILL

Plan: Advanced

Run ID: 6cdae7f4-b06a-4304-8f28-177897876311

📥 Commits

Reviewing files that changed from the base of the PR and between ebdcda1 and 831aa4b.

📒 Files selected for processing (1)
  • apps/web/src/components/BranchToolbar.tsx

Included review availability: Your plan provides up to 10 included reviews per hour; 1 remains after this review.


📝 Walkthrough

Walkthrough

BranchToolbar now measures hidden label text by summing text-node widths and capping the result at a finite maxWidth. Overflow measurement reserves the difference between this width and the label’s visible width.

Changes

Context label overflow

Layer / File(s) Summary
Measure context-label text
apps/web/src/components/BranchToolbar.tsx
A new helper sums text-node widths and caps the result at a finite motion-element maxWidth. Overflow measurement uses the difference between that result and the visible label width, replacing the largest-subtree-scrollWidth calculation.

Priority: ➖ Normal

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

Change: Bug fix · Severity of issue fixed: Medium

Suggested reviewers: juliusmarminge

Merge Risk: ⚪ Minimal · up to 831aa

The changed label measurement has no identified merge-blocking issue; the PR is mergeable after normal checks.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly identifies the primary fix: preventing the collapsed composer bar from repeatedly switching its labels while scrolling.
Description check ✅ Passed The description explains the problem, technical cause, implemented fix, observed behavior, UI results, and validation. It includes screenshots, videos, and a completed checklist. The template's separa…
Linked Issues check ✅ Passed The PR addresses the coding requirement in [#12891]. useLabelsOverflow now measures every text run with Range.getBoundingClientRect(), sums the runs, and caps the result at the motion label's fini…
Out of Scope Changes check ✅ Passed The changes are limited to apps/web/src/components/BranchToolbar.tsx. The moved constants, labelTextWidth helper, and measurement update directly support the linked composer context-strip fix. No …
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 2 functions across 1 files.
✨ Finishing Touches
📝 Generate docstrings
  • Commit to this branch
  • Create a new PR
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR

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

@t3dotgg
t3dotgg merged commit 29abbf9 into main Sep 25, 2026
25 checks passed
@t3dotgg
t3dotgg deleted the t3code/fix-collapsed-composer-bar-shifting branch September 25, 2026 04:08
github-actions Bot added a commit to omarcresp/t3code-flake that referenced this pull request Sep 25, 2026
## What's Changed
* fix(web): sidebar Back always returns to the main app by @t3dotgg in pingdotgg/t3code#13516
* fix(desktop): desktop updates reconnect in seconds, not minutes by @t3dotgg in pingdotgg/t3code#12006
* fix(connect): remove tunnels after hosts go offline by @t3dotgg in pingdotgg/t3code#9386
* fix(mobile): capture a lit 6.9-inch lock screen in the agent-activity showcase by @juliusmarminge in pingdotgg/t3code#13522
* feat(grok): offer one-click updates through `grok update` by @juliusmarminge in pingdotgg/t3code#13523
* fix(mobile): make Android subscription usage widgets scrollable by @tris203 in pingdotgg/t3code#13474
* fix(web): keep sidebar terminal pulses in sync by @t3dotgg in pingdotgg/t3code#12962
* feat(web): add iPhone Duo 3D controls by @juliusmarminge in pingdotgg/t3code#12813
* fix(relay): export tunnel cleanup counters to Axiom by @juliusmarminge in pingdotgg/t3code#13528
* fix(server): Grok accounts with no usage yet no longer vanish from Limits by @jakeleventhal in pingdotgg/t3code#12799
* fix(server): report the Grok account email so usage limits merge across environments by @jakeleventhal in pingdotgg/t3code#12588
* feat(web): add usage page keybinding by @jakeleventhal in pingdotgg/t3code#9434
* chore: clear Effect language service suggestions by @juliusmarminge in pingdotgg/t3code#13536
* ci(relay): add a forced manual relay deploy by @juliusmarminge in pingdotgg/t3code#13550
* fix(web): selected text stays visible on a revealed file line by @t3dotgg in pingdotgg/t3code#13548
* fix(web): collapsed composer bar stops flipping its labels while you scroll by @t3dotgg in pingdotgg/t3code#13555
* fix(clients): sync status no longer flickers when opening running threads by @t3dotgg in pingdotgg/t3code#13551
* fix(server): newer Codex models get T3 Code's instructions again by @t3dotgg in pingdotgg/t3code#13547


**Full Changelog**: pingdotgg/t3code@v0.0.43-nightly.20260924.2223...v0.0.43-nightly.20260925.2237

Upstream release: https://github.com/pingdotgg/t3code/releases/tag/v0.0.43-nightly.20260925.2237
aorwall added a commit to aorwall/t3code that referenced this pull request Sep 27, 2026
Merges `pingdotgg/t3code` up to `eeea71a88` (55 commits after base
`ebdcda135`). This PR is based on `main`; no other merge PR is open.

## Resolution
- **Files that landed:** 271, against 272 in the upstream range. The one
missing is `apps/server/src/cli/pair.ts`, which stays deleted under
`deletedUpstreamPaths`. The fork delta is 756 files, the same as the
last merge.
- **Conflicts (4):**
  - `apps/server/src/cli/pair.ts` (modify/delete): kept deleted.
- `ProviderSettingsPanel.tsx`, `SettingsSidebarNav.tsx`,
`useAvailableSettingsSearchItems.ts` (converged): kept the fork's gates,
search filters and feature-flag read. Took upstream's `scopeSearch`
argument and `cursorKeychainUsageEnabled` prop.
- **New fork gate:** the `cursor-keychain-usage` search item from pingdotgg#13714
is now `providerConfigurationOnly`, because its row sits inside
`UsageProviderSettings`, which the fork hides. Upstream's test now
asserts against `FEATURES.providerConfiguration` and gained the fork's
`forgejoEnabled` field. That field was the only typecheck failure.
- **Lockfile:** re-derived with `install.mjs`. The install left it
unchanged, and the fork's edges are present.
- **Sweep:** new upstream files matched none of the owned-concern
keywords, and upstream added no workflows.
- **Unsupported methods:** nothing to add or drop.

## Verification
The full `verify.mjs` run passes all 10 checks: duplicate-adds,
tripwires, resolution-check, unsupported-methods, lockfile, fmt, lint,
typecheck, build and test.

## Usable as-is
- Chat width setting (a client setting) (pingdotgg#11594)
- The "agents working" banner links to the Agents panel (pingdotgg#13572)
- Composer fixes: paste lands in the composer after clicking away
(pingdotgg#13553), the collapsed composer bar keeps its labels while scrolling
(pingdotgg#13555), focus returns after saving a citation note (pingdotgg#13450)
- Nested task states stay out of parent bullets (pingdotgg#11477). Compact
provider instance badges are back (pingdotgg#13700), and the OpenAI logo is
updated (pingdotgg#13611)
- Client runtime: sync status no longer flickers (pingdotgg#13551), slow servers
finish loading the thread list once instead of twice (pingdotgg#13683), hidden
terminal drawers release thread history (pingdotgg#13686)
- Mobile fixes: Android control sizing, project icons, Home row
performance, and running threads open at the latest message
- The worktree setup label fix (pingdotgg#13590). It applies to UI that
`FEATURES.worktreeSelection` gates.

## Unsupported in Moatless / needs implementation
- **Cursor, OpenCode and Antigravity usage history** (pingdotgg#10409), and the
Cursor keychain usage toggle `cursorKeychainUsageEnabled` (pingdotgg#13714). They
read usage in `apps/server/src/usage/*UsageReader.ts`, and the toggle is
written through `server.updateSettings`, which the backend does not
dispatch. The toggle stays hidden under
`FEATURES.providerConfiguration`.
- **Android foldable controls in the Device panel** (pingdotgg#13534, pingdotgg#13574).
They sit under `FEATURES.deviceHub`, which is off.
- **Desktop and server only:** `RunningThreadKeepAlive` (pingdotgg#13554), the
desktop compile cache (pingdotgg#13501), the Linux .deb auto-updater (pingdotgg#13575),
OTLP environment variables (pingdotgg#13492, pingdotgg#13641), the heap snapshot on
SIGUSR2 (pingdotgg#13694), event-loop stall tracing (pingdotgg#13697), and the `t3 trace`
CLI (pingdotgg#13698). None of these applies to the Moatless web deployment.

## Backend behavior to consider reproducing in Moatless
Added to `docs/fork/gaps.md`, under *Runtime fixes upstream made to its
own server*:
- Settling a thread closes its idle shells: `terminal/Manager.ts`
(pingdotgg#13673)
- Usage reads Cursor, OpenCode and Antigravity history (pingdotgg#10409)
- Newer Codex models get the runtime instructions again:
`CodexDriver.ts`, `RuntimeInstructions.ts` (pingdotgg#13547)
- Background work no longer scales with every thread or project:
  - no per-minute git reruns (pingdotgg#13689)
- no thread-list rebuilds for per-thread settlement or PR checks
(pingdotgg#13691, pingdotgg#13720, pingdotgg#13693)
  - PR sync reads only threads with a linked PR (pingdotgg#13704)
  - the SQLite WAL shrinks after large writes (pingdotgg#13684)
  - shutdown no longer rewrites every stopped session row (pingdotgg#13688)
- Also: the OpenCode v2 serve ready line (pingdotgg#13651), and retrying failed
SQLite statement preparations (pingdotgg#10584)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

---
Moatless task:
https://moatless.soaplabstest.com/tasks/0af5f959-42c9-4219-b6ff-2f43e9e72a5d
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:M 30-99 changed lines (additions + deletions). vouch:trusted PR author is trusted by repo permissions or the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant