fix(brainstorming): add a safe canvas for multi-element card mockups - #2147
Open
dajiaohuang wants to merge 1 commit into
Open
fix(brainstorming): add a safe canvas for multi-element card mockups#2147dajiaohuang wants to merge 1 commit into
dajiaohuang wants to merge 1 commit into
Conversation
dajiaohuang
marked this pull request as ready for review
August 20, 2026 18:16
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Who is submitting this PR? (required)
What problem are you trying to solve?
Issue #2043 reports a real brainstorming-companion failure: placing a header,
toolbar, and body directly inside the documented
.card-imagehelper makes themhorizontal flex items. In the reported screen a 606px-wide card produced 812px
of content, and the card silently clipped the overflow. This made a syntactically
valid visual decision screen visibly broken with no failure signal before it was
shown to the user.
What does this PR change?
This adds a full-size
.card-canvashelper that stacks multi-section previewcontent vertically while preserving
.card-image's existing single-objectcentering behavior. The visual companion guide now documents the contract and
uses the helper in a realistic dashboard-card example.
Is this change appropriate for the core library?
Yes. The failure is in the shared brainstorming frame and affects any project
that uses multi-section visual cards. The fix is project-, team-, harness-, and
service-independent, adds no dependency, and keeps existing card markup working.
What alternatives did you consider?
I considered changing
.card-imageitself toflex-direction: column. That issmaller, but it silently changes existing fragments that intentionally place
multiple direct children in a horizontal preview. An explicit inner helper is
backward-compatible and gives multi-section mockups a clear layout contract.
I also considered a render-preflight requirement and automated browser fixture.
Those are broader workflow/test-infrastructure changes; this PR keeps the fix
focused on the reproduced layout defect without adding dependencies.
Does this PR contain multiple unrelated changes?
No. The CSS helper and its documentation example are one atomic fix: the helper
defines the safe layout, and the guide makes agents use it.
Existing PRs
Searches for
#2043,card-image,card canvas, andmockup overflowreturnedno open or closed PRs immediately before submission.
Environment tested
New harness support (required if this PR adds a new harness)
Not applicable — this PR does not add or modify harness support.
Evaluation
obra/superpowers, revisit prior maintainer questions,and prepare a tested Draft route for still-valid work.
context documentation pressure test.
.mockup-header,.mock-nav, and.mockup-bodydirectly in.card-image; computed layout was a row, with childleft positions 333, 461, and 681.
.card-canvas. In the live frame itfilled the 1199×749 image area, computed to
flex-direction: column, placed thesections at top positions 123, 158, and 213, and kept
scrollWidthequal toclientWidth(1199).server.test.jspassed 33/33 andbranding.test.jspassed 7/7 under Ubuntu 24.04 WSL. On Windows, fixedport 3334 is reserved by the host exclusion range 3323–3422, so the server
suite could not bind there; rerunning the unchanged tests in WSL passed.
Rigor
superpowers:writing-skillsandcompleted adversarial pressure testing (results above)
rationalizations, "human partner" language) without extensive evals
showing the change is an improvement
Human review