Skip to content

fix(desktop): prevent horizontal clipping in Prompt Context modal - #5324

Merged
wpfleger96 merged 1 commit into
mainfrom
duncan/prompt-context-clipping
Aug 8, 2026
Merged

fix(desktop): prevent horizontal clipping in Prompt Context modal#5324
wpfleger96 merged 1 commit into
mainfrom
duncan/prompt-context-clipping

Conversation

@wpfleger96

Copy link
Copy Markdown
Member

The Prompt Context modal (observer feed → check icon under sent messages) was clipping all content and card right-padding at the dialog edge.

Root cause: PromptContextDialog renders inside DialogContent, which is a CSS grid. The child flex wrapper had default min-width: auto, so the widest unbreakable token in the content (64-char hex event IDs, Tags: [[...]] JSON) set the grid track width, blowing it past max-w-xl. overflow-hidden then clipped everything at the dialog edge — including the section cards' right padding.

Fix:

  • AgentSessionTranscriptList.tsx: add min-w-0 to the flex max-h-[85vh] flex-col wrapper so the grid item can shrink below its max-content width.
  • PromptSectionAccordion.tsx: replace wrap-break-word with wrap-anywhere on the body text (open and collapsed states) and the title. overflow-wrap: anywhere reduces min-content width, which break-word does not, letting long tokens wrap inside the cards rather than inflating the track.

The line-clamp-2 collapsed preview is preserved unchanged.

The PromptContextDialog renders inside DialogContent (a CSS grid item).
With default min-width: auto, the widest unbreakable token in the content
sets the grid track width, blowing past max-w-xl and causing overflow-hidden
to clip all content and card right-padding at the dialog edge.

Two-part fix:
- Add min-w-0 to the flex wrapper in PromptContextDialog so the grid item
  can shrink below its max-content width.
- Change wrap-break-word to wrap-anywhere in PromptSectionAccordion body
  and title classes; overflow-wrap: anywhere reduces min-content width
  (break-word does not), letting long hex IDs and Tags JSON wrap within cards.

Co-authored-by: Will Pfleger <pfleger.will@gmail.com>
Signed-off-by: Will Pfleger <pfleger.will@gmail.com>
@wpfleger96
wpfleger96 requested a review from a team as a code owner August 8, 2026 15:43

@wesbillman wesbillman left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Reviewed on Wes's behalf. The min-width and overflow-wrap changes correctly address long unbroken Prompt Context content without expanding scope. No blocking findings. Tests are unchanged; given the narrow CSS-only fix, I don't consider the lack of a new visual regression test blocking.

@wpfleger96

Copy link
Copy Markdown
Member Author

Before — horizontal clipping on origin/main

Content and card right-padding clipped at dialog edge. Long hex IDs and Tags JSON overflow the grid track; overflow-hidden on DialogContent chops everything at the right margin.

01-before

After — fixed on duncan/prompt-context-clipping

All sections fit within the dialog. Right padding is intact. Long hex IDs and Tags JSON wrap inside the cards.

02-after

wpfleger96 pushed a commit that referenced this pull request Aug 8, 2026
@wpfleger96
wpfleger96 merged commit fbf89e3 into main Aug 8, 2026
26 checks passed
@wpfleger96
wpfleger96 deleted the duncan/prompt-context-clipping branch August 8, 2026 16:59
wpfleger96 added a commit that referenced this pull request Aug 8, 2026
* origin/main:
  fix(desktop): welcome banner overlap and missing dismiss control (#5330)
  fix(desktop): prevent horizontal clipping in Prompt Context modal (#5324)
  chore(release): release Buzz Relay version 0.2.1 (#2856)
  chore(release): release Buzz Desktop version 0.5.8 (#5326)
  fix(buzz-agent): recover from 400-shaped image rejections; unbound benchmark agent rounds (#5318)
  Revert "fix(acp): reject unattended permission requests" (#5323)
  feat(desktop): unify add agent flows (#5015)
  fix(buzz-agent): budget summarizer reasoning separately so it cannot starve the handoff summary (#5248)
  infra: bind development services to loopback (#4871)
  chore(release): release Buzz Desktop version 0.5.7 (#5252)
  fix(desktop): isolate relay admission tests (#5221)
  fix(desktop): externalize boot <style> to prevent Tauri CSP nonce override (#5242)
  fix(desktop): let imported and recovered identities finish onboarding (#5228)

Co-authored-by: Will Pfleger <pfleger.will@gmail.com>
Signed-off-by: Will Pfleger <pfleger.will@gmail.com>
tlongwell-block pushed a commit that referenced this pull request Aug 9, 2026
…ounting-and-solo

* origin/main:
  fix(agent): retry LLM completion on malformed 2xx JSON body (#5351)
  fix(desktop): welcome banner overlap and missing dismiss control (#5330)
  fix(desktop): prevent horizontal clipping in Prompt Context modal (#5324)
  chore(release): release Buzz Relay version 0.2.1 (#2856)

Signed-off-by: Eva <011987e296fd5006292d2f930b574be47c7801048d1983c46c425d3c95f0cffd@buzz.block.builderlab.xyz>
Co-authored-by: Eva <011987e296fd5006292d2f930b574be47c7801048d1983c46c425d3c95f0cffd@buzz.block.builderlab.xyz>
cea-block added a commit that referenced this pull request Aug 9, 2026
…cted-foundation-local-only

* origin/main:
  fix(agent): retry LLM completion on malformed 2xx JSON body (#5351)
  fix(desktop): welcome banner overlap and missing dismiss control (#5330)
  fix(desktop): prevent horizontal clipping in Prompt Context modal (#5324)
  chore(release): release Buzz Relay version 0.2.1 (#2856)
  chore(release): release Buzz Desktop version 0.5.8 (#5326)
  fix(buzz-agent): recover from 400-shaped image rejections; unbound benchmark agent rounds (#5318)
  Revert "fix(acp): reject unattended permission requests" (#5323)

Signed-off-by: Cea Stapleton Cordasco <261786559+cea-block@users.noreply.github.com>
41fred pushed a commit to 41fred/buzz that referenced this pull request Aug 9, 2026
…ock#5324)

The Prompt Context modal (observer feed → check icon under sent
messages) was clipping all content and card right-padding at the dialog
edge.

**Root cause**: `PromptContextDialog` renders inside `DialogContent`,
which is a CSS grid. The child flex wrapper had default `min-width:
auto`, so the widest unbreakable token in the content (64-char hex event
IDs, `Tags: [[...]]` JSON) set the grid track width, blowing it past
`max-w-xl`. `overflow-hidden` then clipped everything at the dialog edge
— including the section cards' right padding.

**Fix**:
- `AgentSessionTranscriptList.tsx`: add `min-w-0` to the `flex
max-h-[85vh] flex-col` wrapper so the grid item can shrink below its
max-content width.
- `PromptSectionAccordion.tsx`: replace `wrap-break-word` with
`wrap-anywhere` on the body text (open and collapsed states) and the
title. `overflow-wrap: anywhere` reduces min-content width, which
`break-word` does not, letting long tokens wrap inside the cards rather
than inflating the track.

The `line-clamp-2` collapsed preview is preserved unchanged.

Signed-off-by: Will Pfleger <pfleger.will@gmail.com>
Co-authored-by: Duncan <dcfd242e557282d7a1e2cf2e6877522682f1e5c6156dc92ca7d90eaedd3b0f95@buzz.block.builderlab.xyz>
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.

2 participants