Skip to content

fix(web): stop vertical stacking on narrow chat error cards - #6295

Merged
lefarcen merged 1 commit into
feat/workspace-teamfrom
fix/user-action-card-narrow-layout
Jul 31, 2026
Merged

fix(web): stop vertical stacking on narrow chat error cards#6295
lefarcen merged 1 commit into
feat/workspace-teamfrom
fix/user-action-card-narrow-layout

Conversation

@lefarcen

Copy link
Copy Markdown
Contributor

Why

In a narrow ChatPane, the AMR “模型调用失败,当前任务已暂停” recovery card rendered its title as a vertical one-character stack. Head layout is a 3-column grid (icon | title | actions); a long CTA in actions took auto width and left the title track ~1 CJK character wide, and overflow-wrap: anywhere broke every character onto its own line.

What users will see

  • Model-call-failure recovery card keeps the title on normal horizontal lines.
  • Primary CTA (“切换到 Open Design Cloud 并重试”) sits in the footer row next to “查看详情”, matching the run-recovery card pattern.
  • Other head-action cards reflow under a narrow card via container query (not viewport-only media).

Surface area

  • UI
  • Keyboard shortcut
  • CLI / env var
  • API / contract
  • Extension point
  • i18n keys
  • New top-level dependency
  • Default behavior change — recovery CTA placement for the hosted-agent suggestion card
  • None

Screenshots

Before: title characters stacked vertically when chat is narrow.
After: title wraps horizontally; CTA in footer.

Validation

  • pnpm exec vitest run -c vitest.config.ts tests/components/AmrGuidance.test.tsx tests/components/UserActionCard.test.tsx (5 passed)

Move the long Open Design Cloud switch CTA into UserActionCard footer
actions (same shell as run-recovery), add a card-width container query so
head actions reflow when ChatPane is narrow, and soften title wrapping so
CJK copy no longer renders one character per line.
@lefarcen
lefarcen requested a review from mrcfps July 31, 2026 03:23
@lefarcen lefarcen added size/S PR changes 20-100 lines risk/medium Medium risk: regular code changes type/bugfix Bug fix labels Jul 31, 2026

@mrcfps mrcfps left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

@lefarcen I reviewed all four changed files and verified the narrow-layout fix end to end: the long hosted-agent CTA now uses the established footer action row, the card-scoped container query reflows remaining head actions without depending on viewport width, and the regression test covers the CTA placement. The live Static gate and Web workspace tests are passing; local guard/typecheck/test reruns were unavailable only because this prepared reviewer worktree has no installed dependencies. Thanks for the focused, well-explained fix—this is a thoughtful improvement for localized narrow chat layouts. 🙌

🔁 Powered by Looper · runner=reviewer · agent=codex · An autonomous AI dev team for your GitHub repos.

@lefarcen

Copy link
Copy Markdown
Contributor Author

The narrow-layout write-up is clear, and the validation section already covers the targeted test run. One body item is still missing for this type/bugfix PR: could you add a short ## Bug fix verification note that states the red->green seam explicitly (for example, the narrow ChatPane title-stacking repro and the footer-CTA placement check that now passes)?

Related: #3083 and #5308 (prior AMR guidance work). FYI for context.

@github-actions

Copy link
Copy Markdown
Contributor

Visual regression review

Head: d99c0dd · Base: a5715da

Baseline unavailable; PR screenshots are new visual cases and need baseline review.

0 changed · 0 unchanged · 47 new without baseline · 0 failed

New cases without baselines

PR PR PR
visual-avatar-local-agent-list
pr
visual-avatar-local-agent-list-panel
pr
visual-avatar-menu
pr
visual-avatar-menu-panel
pr
visual-avatar-open-design-model-picker
pr
visual-critical-settings
pr
visual-critical-workspace
pr
visual-critical-workspace-preview
pr
visual-design-system-detail
pr
visual-design-systems
pr
visual-home
pr
visual-home-catalog
pr
visual-home-context-picker
pr
visual-home-context-picker-popover
pr
visual-home-plugin-filter
pr
visual-home-plugin-use-staged
pr
visual-home-plugin-use-with-query
pr
visual-home-staged-attachment
pr
visual-integrations-use-everywhere
pr
visual-new-project-modal
pr

27 additional new case(s) omitted from this comment.

Visual diff is advisory only and does not block merging.

@lefarcen
lefarcen merged commit e316efa into feat/workspace-team Jul 31, 2026
21 of 26 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

risk/medium Medium risk: regular code changes size/S PR changes 20-100 lines type/bugfix Bug fix

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants