Skip to content

fix(web): improve chat header badge and title flex distribution#1309

Merged
juliusmarminge merged 1 commit intopingdotgg:mainfrom
GuilhermeVieiraDev:fix/header-badge-flex-distribution
Mar 27, 2026
Merged

fix(web): improve chat header badge and title flex distribution#1309
juliusmarminge merged 1 commit intopingdotgg:mainfrom
GuilhermeVieiraDev:fix/header-badge-flex-distribution

Conversation

@GuilhermeVieiraDev
Copy link
Copy Markdown
Contributor

@GuilhermeVieiraDev GuilhermeVieiraDev commented Mar 22, 2026

What Changed

Moved the @container/header-actions query from the action buttons div to the parent header wrapper, and changed the action buttons container from flex-1 to shrink-0 so it sizes to its actual content instead of claiming a fixed 50% of the header.

Also fixed the project badge truncation so it clips from the right with an ellipsis instead of clipping from both sides.

The container query breakpoint was updated from @sm (24rem) to @3xl (48rem) across the four affected files since the container is now the full header width instead of just the right half.

Why

The chat header splits into two sections: title + badge on the left, action buttons on the right. Both had flex-1, which gave them a rigid 50/50 split regardless of content. When action labels collapsed at smaller widths, the right side kept its 50% allocation as empty space while the badge and title were still being truncated. This same rigid split also caused buttons to overlap before the compact layout kicked in.

The badge also used truncate directly on the Badge component (which is inline-flex justify-center), so text-overflow: ellipsis didn't work and the centered text got clipped from both sides.

This is a follow-up to #1039, which addressed the same problem but has gone stale.

Builds on the earlier header overlap reports in #626 and #806.
Fixes #399, fixes #426, and fixes #713.

UI Changes

Before:

Screencast.From.2026-03-22.18-08-14.mp4

After:

Screencast.From.2026-03-22.18-08-58.mp4

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

Note

Fix chat header badge truncation and action label visibility breakpoints

  • Moves the @container/header-actions query scope from the right-side action container to the outer header element in ChatHeader.tsx, so all child components share the same container query context.
  • Changes action label and separator visibility from @sm/header-actions to @3xl/header-actions across GitActionsControl, ProjectScriptsControl, and OpenInPicker, delaying when button labels and separators appear.
  • Fixes project name truncation in the Badge by wrapping text in an inner span with truncate, replacing truncate on the badge itself to prevent layout shifts.

Macroscope summarized 187776d.

@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Mar 22, 2026

Important

Review skipped

Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: f32ed546-e46d-41d3-88a8-d93b24fef0ed

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

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

Tip

CodeRabbit can use Trivy to scan for security misconfigurations and secrets in Infrastructure as Code files.

Add a .trivyignore file to your project to customize which findings Trivy reports.

@github-actions github-actions bot added size:S 10-29 changed lines (additions + deletions). vouch:unvouched PR author is not yet trusted in the VOUCHED list. labels Mar 22, 2026
Copy link
Copy Markdown
Contributor

@binbandit binbandit left a comment

Choose a reason for hiding this comment

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

LGTM nice one

Copy link
Copy Markdown
Member

@juliusmarminge juliusmarminge left a comment

Choose a reason for hiding this comment

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

thanks

@juliusmarminge juliusmarminge merged commit 02989fe into pingdotgg:main Mar 27, 2026
10 checks passed
aaditagrawal pushed a commit to aaditagrawal/t3code that referenced this pull request Mar 27, 2026
frittlechasm added a commit to frittlechasm/t3code that referenced this pull request Mar 28, 2026
Reverts all 10 commits pulled from upstream (add5f34 through 1ae20fa)
including our local classifySqliteError fix. Upstream introduced a
classifySqliteError import that does not exist in [email protected].
Reverting until upstream resolves the version mismatch.

Reverted commits:
- 1ae20fa fix(persistence): revert classifySqliteError to SqlError({ cause, message })
- 23b3f0c Refactor Codex adapter lifecycle helpers (pingdotgg#1478)
- e08cea3 Improve drain semantics via STM in DrainableWorker (pingdotgg#1474)
- 83eb396 fix(threads): Keep active-turn runtime errors from ending sessions (pingdotgg#1261)
- 59a383e Add Effect.fn refactor checklist (pingdotgg#1476)
- fb72607 fix(claude): avoid resetting the Claude model on every turn (pingdotgg#1466)
- d8a485e Support gh pr checkout pull request references (pingdotgg#1457)
- 02989fe fix(web): improve chat header badge and title flex distribution (pingdotgg#1309)
- 648f067 Add VS Code Insiders and VSCodium to Open In editor picker (pingdotgg#1392)
- add5f34 Add Claude context window selection support (pingdotgg#1422)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:S 10-29 changed lines (additions + deletions). vouch:unvouched PR author is not yet trusted in the VOUCHED list.

Projects

None yet

3 participants