Skip to content

fix(topbar): keep the generation-speed pill's width so it shows again - #501

Open
Broglah1 wants to merge 1 commit into
ompweb-dev:mainfrom
Broglah1:fix/topbar-speed-pill
Open

Broglah1 wants to merge 1 commit into
ompweb-dev:mainfrom
Broglah1:fix/topbar-speed-pill

Conversation

@Broglah1

@Broglah1 Broglah1 commented Nov 15, 2026 •

Copy link
Copy Markdown
Contributor

The generation-speed pill in the top bar never shows. The rate is computed and rendered (98.0 t/s, tooltip current: 98.0 t/s), but the pill is display: none at every window width.

Cause

.shell-topbar-metrics has containerType: "inline-size". Inline-size containment makes the box report no content width. The right top-bar group is content-sized, so it reserves only the bell and panel buttons (68px), and the metrics box gets 0px even with a flex basis. The @container topbar-speed (width < calc(10ch + 33px)) rule then hides the pill unconditionally.

Regressed in cace683, which replaced the explicit width: hasGenerationSpeed ? 200 : 0 with a flex basis only.

Fix

Give the box an explicit width: calc(10ch + 33px), matching its flex basis and the pill's own width. minWidth: 0 and the flex shrink are unchanged.

Verification

Built this branch (bun run build, bun server/main.ts on a second port linked to the local daemon) and opened a live streaming session in headless Chromium and WebKit:

metrics box pill
v0.7.1, 1600px 0px hidden (display: none, value 98.0 t/s present)
this branch, 1600 / 900 / 641px 99px visible, ⚡ 113.4 t/s live
this branch, 640px display: none (existing mobile rule) hidden

Same results in Chromium and WebKit (dark theme); the light theme was checked in Chromium at 1600px. The ~ session average also shows between runs (checked on v0.7.1 with the same width applied to the page). The top bar did not overflow at any tested width; the container-query hide was never reached, because the left tools fold into the overflow menu first.

bun run typecheck passes.

Summary by CodeRabbit

  • Bug Fixes
    • Restored the generation-speed indicator to the top bar on wider screens. It retains its intended width, while remaining hidden on phone-width screens. This keeps the indicator visible in the top bar where space allows without changing its compact-screen behavior.

Inline-size containment zeroes the metrics box's content width; with only a flex-basis the right group sized it to 0 and the topbar-speed container query hid the pill on every screen. Regressed in cace683.
@coderabbitai

coderabbitai Bot commented Nov 15, 2026 •

Copy link
Copy Markdown

Explain Change →

No actionable comments were generated in the recent review.

Walkthrough

The metrics container now has an explicit width so its inline-size container query can measure the available width. The Unreleased changelog documents the generation-speed pill’s width and its hiding on phone-width screens.

Changes: Generation-speed pill sizing

Layer / File(s) Summary
Set metrics container width
components/AppShell.tsx, CHANGELOG.md
The metrics container gains a calc(10ch + 33px) width. The changelog notes that the generation-speed pill retains its width and is hidden on phone-width screens.

Estimated code review effort: 1 (Trivial) | ~5 minutes

Change: Bug fix

Suggested reviewers: andrebrait

Merge Risk: Minimal · up to 02605

This restores the generation-speed pill in the top bar by giving its container a fixed width. It still hides on phone-width screens. The risk is low and it looks ready to merge.

Security architecture risk: Minimal · up to 02605

The fix restores the width of an existing generation-speed indicator without changing access controls, data handling, or service behavior. No introduced or worsened architecture-level security risk was identified.

Pre-merge checks: Passed 4

Check name Status Explanation
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check Passed The title names the fix (keeping the generation-speed pill's width so it shows again) in the top bar, which matches the changeset: the .shell-topbar-metrics container gets an explicit width of calc(10…
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.
Full details: Title check

Explanation

The title names the fix (keeping the generation-speed pill's width so it shows again) in the top bar, which matches the changeset: the .shell-topbar-metrics container gets an explicit width of calc(10ch + 33px) so the speed pill's inline-size container query no longer hides it. The title is specific and concise, and it omits no main point. The changelog entry and the AppShell.tsx change both support this.

Finishing Touches

Generate unit tests (beta)

  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Recent review info

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: dae1d776-96ef-4343-b30c-09fdf0952259
Commits

Reviewing files that changed from the base of the PR and between 349295a and 026053f.

Files selected for processing: 2

  • CHANGELOG.md
  • components/AppShell.tsx

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

@Broglah1
Broglah1 marked this pull request as ready for review November 15, 2026 15:18

This branch has not been deployed

No deployments
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