fix(lineage): distinguish modified and impacted with brown/yellow color pair#1312
fix(lineage): distinguish modified and impacted with brown/yellow color pair#1312
Conversation
… color pair Make "impacted" a peer status to added/removed/modified in CLL lineage visualization. Modified now uses brown (#D4850B) and impacted uses yellow (amber[300]) so they read as related but distinct. - Centralize change-status colors in styles.tsx as the single source of truth (changeStatusColors, changeStatusBackgroundsLight/Dark) - getStyleForImpacted returns a full ChangeStatusStyle (was just a barColor) - LineageColumnNode and LineageNode use impacted style when not otherwise changed - LineageLegend adds Impacted as a 4th entry - Schema sidebar (style.css) updates --schema-color-changed-accent to brown to match; impacted shades there were already yellow - Schema rows and column name cell get an impacted treatment + ! badge - Ancestry edge stroke colors now read from the centralized constants Signed-off-by: Danyel Fisher <danyel@gmail.com>
Align the lineage column node and schema sidebar on a single muted palette so the whole change-status system reads as one visual language: brown for changed, yellow for impacted, plus the existing green/red for added/removed — all in the softer sidebar shades. - styles.tsx: switch changeStatusColors and both light/dark background maps to the rgb() values used by --schema-color-* in schema/style.css (paired-file comment on both sides flags the hand-sync requirement). - LineageColumnNode: tint background + left accent for added/removed/ modified (previously only impacted had the treatment); add dark-mode paper fallback and force white text so dark-mode columns no longer fall through to the MUI light theme. - CllExperience story: add stacked columns to each model in the comparison demo and a Schema Sidebar demo (light + dark) so all three surfaces can be eyeballed together while tuning. - styles.test: update literal expected values to the new rgb() palette; drop the stale "TODO: unify CSS and JS" note now that they are aligned. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> Signed-off-by: Danyel Fisher <danyel@gmail.com>
The previous commits repurposed the shared changeStatusColors map and schema sidebar CSS variables to the muted brown/yellow palette, which silently changed colors for OSS lineage, schema diff checks, summary, minimap, and the schema sidebar — all outside the new-CLL flag. Restore the originals and add parallel cll* exports + a .cll-experience CSS scope. CLL consumers (LineageColumnNode, LineageEdge, LineageCanvas, LineageLegend, lineage.ts ancestry stroke) read from the cll* set. LineageNode picks the palette by flag. SchemaView adds the cll-experience class only when the flag is on. LineageLegend gains a newCllExperience prop that toggles palette and shows/hides the Impacted entry. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> Signed-off-by: Danyel Fisher <danyel@gmail.com>
…ence Previous commits made added/removed/modified column rows always render with a tinted background, 3px left accent, and dark hex fallbacks regardless of flag. LineageColumnNode reaches OSS via GraphColumnNodeOss, so OSS users would see the new visual treatment. Mirror the LineageNode pattern: accept newCllExperience as a prop with data.newCllExperience fallback, and gate the tinted bg, accent border, dark hex fallbacks, and muted ChangeStatusIndicator color on the flag. When off, behavior reverts to main: only isImpacted triggers a tint; MUI tokens for everything else; sharp changeStatusColors for +/-/~. GraphColumnNodeOss pulls newCllExperience from LineageViewContext and passes it through. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> Signed-off-by: Danyel Fisher <danyel@gmail.com>
Three near-identical helpers (getIconForChangeStatus, getCllIconForChangeStatus,
getStyleForImpacted) collapse into a single parametrized getIconForChangeStatus
that takes a palette key ("default" | "cll"). getStyleForImpacted becomes a
one-line wrapper that calls it with palette="cll" and status="impacted".
Constant exports (changeStatusColors, cllChangeStatusColors, etc.) are kept
as-is — they're imported directly by LineageEdge, LineageCanvas, LineageLegend,
LineageColumnNode, and lineage.ts.
Net: -16 LOC across helpers + tests, single source of truth for the lookup
logic.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Signed-off-by: Danyel Fisher <danyel@gmail.com>
Code Review — PR #1312SummaryScopes the muted brown/yellow CLL palette behind Findings[Nit]
|
Code Review: PR #1312Files reviewed: 17 Validation ResultsPass A: Correctness & Logic — PASS
Pass B: Security — PASSNo auth, secrets, injection, or PII changes. Pure presentation code. Pass C: Cross-Reference Consistency — PASS
Pass D: Error Handling & Edge Cases — PASS
Pass E: Test Coverage & Quality — PASS
Pass F: Diff-Specific Checks — PASS
Pass G: Performance — PASSNo N+1 queries, unbounded results, or sync-in-async patterns. Color lookups are O(1) record access. Pass H: Async/Concurrency — PASSNo async code changes in this PR. Verification Results
Verdict: GOAll validation passes clean. No critical issues found. Notes
|
even-wei
left a comment
There was a problem hiding this comment.
Claude Code Review: No critical issues found. Clean implementation with well-scoped feature flag gating.
Summary
Inside the new CLL experience, make "impacted" a peer status to added/removed/modified — modified uses muted brown, impacted uses muted yellow.
The new palette is scoped behind
--new-cll-experienceso OSS lineage, schema diff checks, summary, minimap, and the schema sidebar's existing.row-changedstyling are unchanged for users without the flag.How it's scoped
lineage/styles.tsxexports two parallel sets:changeStatusColors/changeStatusBackgroundsLight/Dark— original Tailwind palette, used by OSS consumers.cllChangeStatusColors/cllChangeStatusBackgroundsLight/Dark— muted brown/yellow palette +impacted, used by CLL consumers.getCllIconForChangeStatusmirrorsgetIconForChangeStatusbut reads the cll set;getStyleForImpactedreads the cll set.LineageColumnNode,LineageEdge,LineageCanvasminimap,lineage.tsancestry stroke.LineageNodepicks the palette based onnewCllExperience.LineageLegendgains anewCllExperienceprop. When false (default), it shows the original Tailwind legend without the Impacted entry — matching what OSS users have always seen. When true, it renders the muted CLL palette including Impacted.schema/style.csskeeps the original pale-yellow/orange--schema-color-changed*and--schema-color-impacted*in:root/.dark. A scoped.cll-experience { ... }block (and.cll-experience.dark/.dark .cll-experience) overrides them with the muted palette and adds the new--schema-color-impacted-accent+ impacted badge vars.SchemaViewaddscll-experienceto the grid wrapper className only whenserverFlags?.new_cll_experienceis true.ColumnNameCellget the impacted treatment +!badge — gated byrow.isImpacted, which is only populated when the flag is on.Storybook
LineageLegend.stories.tsxnow has bothChangeStatus(default Tailwind, no impacted) andChangeStatusCll(muted palette, with impacted) variants.Test plan
pnpm vitest run packages/ui/src/components/lineage— 403/403 passpnpm test(full UI suite) — 3674/3674 passpnpm type:check— cleanpnpm lint:fix— clean:8002(no flag) shows Tailwind palette + no Impacted entry;:8001(--new-cll-experience) shows muted brown/yellow + Impacted.Lineage/LineageLegendChangeStatus vs ChangeStatusCll in light + dark.🤖 Generated with Claude Code