Skip to content

fix(showcase): stretch Command Center's flex-column children to full width#2631

Merged
os-zhuang merged 1 commit into
mainfrom
claude/fix-command-center-stretch
Jul 5, 2026
Merged

fix(showcase): stretch Command Center's flex-column children to full width#2631
os-zhuang merged 1 commit into
mainfrom
claude/fix-command-center-stretch

Conversation

@os-zhuang

Copy link
Copy Markdown
Contributor

Summary

Fixes the last piece of the "D" (Command Center chart width) finding from #2616/#2620 — confirmed via live browser testing that objectstack-ai/objectui#2254 did not actually fix this despite touching the same styling area (see objectstack-ai/objectui#2268).

Root cause: showcase_command_center's outer container (cc_root, a type:'flex' node with responsiveStyles setting display:'flex', flexDirection:'column') never set alignItems. The flex component's own default (align:'start' → Tailwind items-start) therefore applied. In a flex-direction:column container, align-items:flex-start means children size to their own intrinsic content width instead of stretching to fill the container — so each chart band (cc_rowA/cc_rowB, both display:grid with 3 equal-width tracks) collapsed to whatever width its charts naturally wanted (~100-130px per column) instead of filling the ~1100px available.

One-line fix: add alignItems: 'stretch' to cc_root's responsiveStyles.

Verification

Live-tested with Playwright against a real --fresh --seed-admin backend + the objectui console dev server (HMR against objectui main + my in-flight fix branch, to isolate this from the console-rebuild pipeline):

  • Before: row-A chart <svg> bounding boxes measured 100px wide each (getBoundingClientRect(), not eyeballed)
  • After: same charts measured 350px wide each — screenshot-confirmed all three charts (task status, project health, priority) now render at full readable width with correct axis/legend labels

Test plan

  • pnpm build (showcase) — clean
  • Live Playwright verification (DOM bounding-box measurement before/after, screenshot)
  • pnpm test (showcase) — 52/53 passing; the 1 failure (coverage.test.ts, new registry kinds trigger/router/function/service not yet in KIND_COVERAGE) is confirmed pre-existing on main (reproduced with this change stashed out) and unrelated to this fix

Refs #2616, #2620, objectui#2254, objectui#2268.


Generated by Claude Code

…width

The 3-up chart band (cc_rowA/cc_rowB) rendered at a collapsed ~100px width
per column, wide enough to render but far too narrow to be readable — the
"D" chart-width finding from #2616/#2620, not actually fixed by
objectui#2254 despite that PR touching this exact area.

Root cause: cc_root (the page's outer `type:'flex'` container) never set
`alignItems`, so the `flex` component's own default (`align: 'start'` →
Tailwind `items-start`) applied. In a `flex-direction:column` container,
`align-items:flex-start` means children size to their own content instead
of stretching to the container's width — so each grid-based chart band
(cc_rowA/cc_rowB) shrank to whatever intrinsic width its charts naturally
wanted (~100-130px each) rather than filling the ~1100px available.

Verified live (Playwright + a real backend): row-A chart SVGs measured
100px wide before this fix, 350px after — filling the actual available
width. Screenshot-confirmed all three charts now render full width with
readable axes/legends.

The unrelated `coverage.test.ts` failure on this branch (new registry
kinds `trigger`/`router`/`function`/`service` not yet in KIND_COVERAGE)
pre-exists on main and is untouched by this change.
@vercel

vercel Bot commented Jul 5, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
spec Ready Ready Preview, Comment Jul 5, 2026 9:08am

Request Review

@os-zhuang
os-zhuang marked this pull request as ready for review July 5, 2026 09:14
@os-zhuang
os-zhuang merged commit a68a3ae into main Jul 5, 2026
15 checks passed
@os-zhuang
os-zhuang deleted the claude/fix-command-center-stretch branch July 5, 2026 09:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants