Skip to content

fix(web): cap the Usage environment menu width - #33750

Open
ethan-br wants to merge 1 commit into
pingdotgg:mainfrom
ethan-br:fix/usage-environment-menu-width
Open

ethan-br wants to merge 1 commit into
pingdotgg:mainfrom
ethan-br:fix/usage-environment-menu-width

Conversation

@ethan-br

@ethan-br ethan-br commented Nov 10, 2026 •

Copy link
Copy Markdown

Problem

The environment filter menu on the Usage page sizes itself to its content. When environments share a transcript directory, the coverage notice lists every full source fingerprint (cursor-account:<64-char-hash>), so the popup stretches almost the full viewport: 1248 px wide in a 1280 px window instead of a normal menu.

Reproduce on a machine with several environments whose usage summary reports duplicateSources (a shared transcript directory), then open Usage and the "All environments" filter.

Change

  • Cap the environment filter MenuPopup at min(24rem, 100vw - 2rem) so long content cannot widen it past a normal menu size or off a small viewport.
  • Let the coverage notice break long unbreakable source paths with wrap-anywhere.

This is a purely visual layout fix, so per AGENTS.md the evidence is the before/after captures below and no test is added.

Scope and approval

Small, focused fix of an obvious bug, so no prior issue is needed. I searched existing issues and PRs; the nearest is #7858 / #24319, which is about deduplicating shared Windows/WSL transcripts, not the popup width. This changes only the menu layout, not what is counted or displayed.

Verification

  • vp run check:changed passes: format, lint, knip, typecheck, and react compiler.
  • Captured in Chromium at a 1280x800 viewport with the same three-environment fixture. The notice now wraps inside a 384 px menu.

Before / after:

Before: the menu stretches to 1248 px

After: the menu stays 384 px wide and the notice wraps

Models: DeepSeek V4.1 Flash Free, through T3 Code with the OpenCode harness.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 10, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

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

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-10T07:57:53.834605Z f1974e0 PR opened
ℹ️ 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.

@github-actions github-actions Bot added vouch:unvouched PR author is not yet trusted in the VOUCHED list. size:XS 0-9 changed lines (additions + deletions). labels Nov 10, 2026
@macroscopeapp

macroscopeapp Bot commented Nov 10, 2026

Copy link
Copy Markdown
Contributor

Approvability

Verdict: Approved at f1974e0

Macroscope's review found this PR approvable — This limits the Usage environment menu width and wraps long coverage notices without changing filtering or usage calculations. The changes are confined to presentation and carry no obvious material risk.

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

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: f1974e07f5

ℹ️ 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".

A shared-transcript notice lists full source fingerprints, so the content-sized menu stretched across the viewport. Cap the popup at 24rem and let the notice break long paths.
@ethan-br
ethan-br force-pushed the fix/usage-environment-menu-width branch from f1974e0 to 88004df Compare November 10, 2026 08:00
@coderabbitai

coderabbitai Bot commented Nov 10, 2026 •

Copy link
Copy Markdown
Contributor

Explain Change →

No actionable comments were generated in the recent review.

Walkthrough

The usage coverage notice now permits arbitrary text wrapping. The environment filter is exported, and its popup has a viewport-aware maximum width. A browser test opens the menu with long duplicate-source notices and checks visibility, width, and horizontal overflow.

Changes: Usage filter layout

Layer / File(s) Summary
Constrain and validate usage filter layout
apps/web/src/components/usage/UsagePage.tsx, apps/web/src/components/usage/UsageEnvironmentFilter.browser.test.tsx
The coverage notice allows arbitrary text wrapping, and the environment filter popup has a maximum width of min(24rem, calc(100vw - 2rem)). The filter is exported. The browser test checks menu visibility, a maximum width of 384 pixels, and no horizontal overflow with long duplicate-source notices.

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

Change: Bug fix

Suggested labels: bugfix

Suggested reviewers: yash-singh1, macroscopeapp

Merge Risk: Minimal · up to f1974

No actionable merge-blocking risk is established for the menu layout change.

Pre-merge checks: Passed 4

Check name Status Explanation
Title check Passed The title clearly and concisely describes the main change: limiting the Usage environment menu width.
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.
Description check Passed The description covers the problem and reproduction steps, explains the layout change, justifies the scope, and reports verification with before-and-after screenshots.
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

Commits

Reviewing files that changed from the base of the PR and between 25da7eb and f1974e0.

Files selected for processing: 2

  • apps/web/src/components/usage/UsageEnvironmentFilter.browser.test.tsx
  • apps/web/src/components/usage/UsagePage.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.

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

size:XS 0-9 changed lines (additions + deletions). vouch:unvouched PR author is not yet trusted in the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant