Skip to content

feat: a group box can carry a mark, not just a title (#119) - #120

Merged
lex00 merged 1 commit into
mainfrom
feat/119-group-box-mark
Aug 31, 2026
Merged

feat: a group box can carry a mark, not just a title (#119)#120
lex00 merged 1 commit into
mainfrom
feat/119-group-box-mark

Conversation

@lex00

@lex00 lex00 commented Aug 31, 2026

Copy link
Copy Markdown
Contributor

Closes #119.

GroupBox had a title, a status and an id, but no glyph channel — a box could be titled and never badged. A consumer wanting to mark one box out of many (behold marking the operator's own namespace) had only the title to smuggle it through, and titles are load-bearing: behold's logical lens re-derives namespace <ns> verbatim to re-parent helm releases, so a suffix would silently unparent them.

The field

interface GroupBox {
  // …title, x, y, w, h, depth?, status?, id?
  mark?: string | GlyphSpec;
}

The node mark vocabulary (#95) applied to a box, not a parallel one: a GENERIC_GLYPHS key or a pack's own GlyphSpec ({ body, colored?, viewBox? }). It resolves as an override in resolveGlyph's chain — a box has no lexicon or kind to consult a pack with — so an unknown key degrades to "generic" exactly as it does on a card, and a colored mark paints as authored. No ground is offered: the box fill is painted at fill-opacity 0.6, so pinhole cannot honestly name what the glyph sits over (the same reason the containment views pass none).

Where it paints

The box's top-right gutter: an 18px square inset 18px from the right edge — the mirror of the title's 18px left inset — vertically centred on the title row. Monochrome geometry is stroked in the title's colour, so it follows the theme and picks up the status tint the way the title does. groupMarkMarkup is the single emitter, the way glyphMarkup is for node glyphs.

The morph takes the same GroupBox[], so the mark rides it too, baked relative to the box's right edge (the box resizes between views, so the runtime slides it by the current width). Its panel CSS is narrowed to direct children — .pin-mbox > rect — or the box's own fill would reach into an authored mark's shapes.

Absent = unchanged

Pinned two ways: the exact emitted markup for an unmarked box, and marked.replace(theMark, "") === unmarked — the mark is purely additive.

Checks

npm run tsc, npm test (211 -> 227), npm run build all clean locally.

🤖 Generated with Claude Code

https://claude.ai/code/session_01Rfs1mLVWmwginHnDTg75sG

GroupBox had a title, a status and an id, but no glyph channel — a box could
be titled and never badged. A consumer wanting to mark one box out of many
(behold marking the operator's own namespace) had only the title to smuggle it
through, and titles are load-bearing: behold's logical lens re-derives
`namespace <ns>` verbatim to re-parent helm releases, so a suffix would
silently unparent them.

`GroupBox.mark` is that channel, in the node mark vocabulary (#95) rather than
a parallel one: a GENERIC_GLYPHS key or a pack's own GlyphSpec, `colored` if it
carries its own paint. It resolves as an override in resolveGlyph's chain — a
box has no lexicon or kind to consult a pack with — so an unknown key degrades
to "generic" exactly as it does on a card. No `ground` is offered: the box fill
is painted at fill-opacity 0.6, so pinhole cannot honestly name what the glyph
sits over.

It paints in the box's top-right gutter, an 18px square inset 18px from the
right edge — the mirror of the title's left inset — centred on the title row,
and monochrome geometry is stroked in the title's own colour, so it follows the
theme and the status tint the way the title does.

The morph takes the same GroupBox[], so the mark rides it too, baked relative
to the box's right edge because the box resizes between views. Its panel CSS is
narrowed to direct children, or the box's own fill would reach into an authored
mark's shapes.

Absent, a box renders byte-identical to before, pinned two ways: the emitted
markup for an unmarked box, and marked-minus-the-mark == unmarked.

211 -> 227 tests.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Rfs1mLVWmwginHnDTg75sG
@lex00
lex00 merged commit 3639e14 into main Aug 31, 2026
1 check passed
@lex00
lex00 deleted the feat/119-group-box-mark branch August 31, 2026 02:45
lex00 added a commit that referenced this pull request Aug 31, 2026
Version bump only, cutting the release that carries #120.

`GroupBox` gains an optional `mark?: string | GlyphSpec` — the node mark
vocabulary applied to a box — painted in the box's top-right gutter. Purely
additive: a box without it renders byte-identical to 0.3.6.

Merging this tags `v0.3.7` and fires the publish workflow.


Claude-Session: https://claude.ai/code/session_01Rfs1mLVWmwginHnDTg75sG

Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
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.

GroupBox has no mark channel — a box can be titled but never badged, and one consumer re-parses titles

1 participant