Commit d8efd07
refactor(lineage): tighten impact-mark internals; fix amber contrast
Cleanups to the Lineage tab impact-mark code introduced in this branch:
- Extract effectiveStatus / colorForEffective helpers — single source for
the "unchanged + cllImpacted → impacted" mapping that was duplicated
across StatusDot, getNodeStatusColor, and FocusCard.
- Split the impact chip into ChipButton (interactive) and ChipBadge
(display-only), removing the polymorphic component={x ? "button" :
"span"} pattern and its dangling type="button" attribute.
- Flatten the triple-nested chipTitle ternary into a getChipTitle
helper with early returns.
- Rename DirectRow props for distinct intent: impacted →
decorateAsImpacted (drives the rail/tint/arrow), cllImpacted →
dotImpacted (drives the dot color).
- Add a comment marking the trailing arrow icon as direction-agnostic
(the tooltip carries direction).
Also fix amber legibility on light backgrounds: the canvas amber
rgb(252 211 77) reads fine as a filled shape (dot, rail, chip bg) but
fails contrast as a thin-stroke icon or small text on white. Add an
impactedTextColor() helper (deeper amber rgb(146 64 14) in light mode,
light yellow in dark mode) and apply it to:
- the trailing impact-mark arrow icon in DirectRow
- the FocusCard "Impacted" pill text and border (when status is
impacted)
The other impact visuals — left rail, dot, chip background — keep the
canvas amber since brightness reads correctly on filled shapes.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Signed-off-by: Wei-Chun, Chang <wcchang@infuseai.io>1 parent 1525666 commit d8efd07
1 file changed
Lines changed: 210 additions & 120 deletions
0 commit comments