Skip to content

fix(heart): give the worded copy chips the theme's text modifier - #192

Merged
Jammy2211 merged 1 commit into
mainfrom
feature/board-worded-copy-chip
Aug 28, 2026
Merged

fix(heart): give the worded copy chips the theme's text modifier#192
Jammy2211 merged 1 commit into
mainfrom
feature/board-worded-copy-chip

Conversation

@Jammy2211

Copy link
Copy Markdown
Contributor

Reported from a laptop: under the Evidence gaps heading, clear them all renders as a thin column of text.

The cause

The plan line's two buttons carry words — 📋 clear them all and ⌨ command chain — but the family's button.copy is a fixed 2.6rem square drawn for a bare glyph. At 42px wide the label wraps to one word per line and spills out of the box. This is not new: the plan line has shipped this way since the actionable board landed; it took a laptop to notice.

The fix

_copy_btn adds the theme's text modifier when the face carries words:

cls = "copy text" if len(face.split()) > 1 else "copy"

Whitespace in the face is the test, because that is what makes a face a phrase rather than a glyph. The per-row 📋 and buttons keep their square. The text rule itself belongs to the family and lands in PyAutoLabs/PyAutoBrain#314 — this PR only opts in, so either order is safe.

The regression test

test_a_worded_copy_face_is_a_chip_and_a_glyph_stays_a_square asserts per button — this face has words, so this button is a chip — rather than by position, so it survives the board reordering its tiers.

Verified as a control: with the modifier removed the test goes red (AssertionError), and green again with it restored. My first draft compared positions of the two class strings and failed for the wrong reason (the plan chips render above the per-row list, so there is no bare class='copy' before them) — replaced rather than patched.

Verification

  • pytest tests → 657 passed (656 + the new one).
  • Tenant firewall clean.

🤖 Generated with Claude Code

https://claude.ai/code/session_018q6ZrgG6u8o8ENYZ7cq3Lr

The plan line's "clear them all" and "command chain" buttons carry words, but
`button.copy` is a fixed 2.6rem square drawn for a bare glyph. The labels
wrapped inside 42px into a one-word-per-line column and spilled out of the
box — reported from a laptop as a thin column of text under the gaps heading.

Whitespace in the face is the test, because that is what makes a face a
phrase rather than a glyph; the per-row glyph buttons keep their square. The
`text` rule itself belongs to the family and lives in the shared theme.

The regression test asserts per button — this face has words, so this button
is a chip — rather than by position, so it survives the board reordering its
tiers. Verified red with the modifier removed.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_018q6ZrgG6u8o8ENYZ7cq3Lr
@Jammy2211
Jammy2211 merged commit 4e1af95 into main Aug 28, 2026
2 checks passed
@Jammy2211
Jammy2211 deleted the feature/board-worded-copy-chip branch August 28, 2026 14:55
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.

1 participant