test(lineage): hygiene cleanup from PR #1381 review (DRC-3525)#1452
Open
danyelf wants to merge 1 commit into
Open
test(lineage): hygiene cleanup from PR #1381 review (DRC-3525)#1452danyelf wants to merge 1 commit into
danyelf wants to merge 1 commit into
Conversation
- Add wholeModelTreatment.test.ts locking the CLL palette tokens produced by tokensForKind across all 5 kinds x light/dark. - Add computeWholeModelImpact tests for disconnected components and a changed node absent from the lineage graph. - LineageNode.tsx: replace hardcoded #1e1e1e/#ffffff/#000000 surface + text literals with shared `colors` design tokens (dark card -> neutral[800], matching the sibling LineageColumnNode); de-duplicate the repeated primary/inverted text computation. - Consolidate the CLL palette source of truth: add cllPaletteSync.test.ts, a guard test that parses schema/style.css and asserts the TS cll* consts match the --schema-* CSS vars (the missing "build-time check"); update the "keep in sync by hand" comments to point at it. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Signed-off-by: Danyel Fisher <danyel@gmail.com>
gcko
approved these changes
Jul 2, 2026
gcko
left a comment
Contributor
There was a problem hiding this comment.
- LOW: DRC-3525 item 2 remains intentionally unimplemented. The ticket asked for a CLI env-var test for
RECCE_WHOLE_MODEL_IMPACT=true, while the PR body says that name was never adopted and defers the item pending a product decision. I did not see any changed file add equivalent CLI flag/env coverage, so this is acceptable only if the verdict keeps that decision tracked instead of treating the ticket as fully done. - LOW: DRC-3525 item 5 says to consolidate the duplicated CLL palette, but this PR leaves the duplication in place and adds a drift guard instead. The new test documents that the colors are still declared twice in
js/packages/ui/src/components/lineage/__tests__/cllPaletteSync.test.tsline 21 and that the fuller consolidation is deferred around lines 26-30. The guard substantially lowers drift risk, but it is still a scope tradeoff rather than the requested single-source fix.
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.
What this PR does
Clears the leftover hygiene items from the PR #1381 review (Linear DRC-3525). These are low-risk, self-contained chores — two new tests, one color-hardcoding cleanup, and a guard against a palette that was being kept in sync by hand. No product behavior changes.
The items
1. Test the whole-model badge colors. The helper that picks the palette tokens for the lineage badges (
tokensForKind) had no tests at all. Added one that locks its output for every badge kind in both light and dark mode, so a future color tweak can't silently break them.2. (Deferred) The
RECCE_WHOLE_MODEL_IMPACTCLI test. Skipped on purpose. That environment variable was never actually adopted — the real feature flag isRECCE_NEW_CLL_EXPERIENCE/--new-cll-experience. Writing a test for a name that doesn't exist would just bake in confusion. This needs a small product decision (point the test at the real flag, or drop the item), not a mechanical test, so it's left out for now.3. Two missing edge-case tests for impact propagation.
computeWholeModelImpactwas covered for the common cases but not for (a) a lineage graph with disconnected pieces — impact shouldn't leak across them — or (b) a changed node that isn't in the graph at all, which shouldn't crash. Both added.4. Remove hardcoded colors from the lineage node.
LineageNode.tsxhad raw hex values (#1e1e1e,#ffffff,#000000) repeated inline for the card background and text. Replaced them with the shared design tokens the rest of the lineage UI already uses, selected by the existing dark-mode flag. One small, deliberate normalization: the dark card moves from#1e1e1eto the shared neutral#262626, which matches the sibling node and MUI's dark surface — the old value was the odd one out. Visually imperceptible.5. Stop the CLL palette from silently drifting. The palette is currently written twice — once as TypeScript constants for the React canvas, once as CSS variables for the schema grid — with a comment admitting the two are kept in sync by hand. Rather than the bigger refactor (generating one side from the other), this adds a test that parses the CSS and asserts the two match, so any future drift fails CI. The proper single-source fix (emit the CSS variables from the TS constants) touches the schema view, so it's left as a follow-up; the guard makes the duplication safe in the meantime.
Tests
All green: 554 lineage tests pass (including the three new/updated files),
pnpm type:checkclean, Biome lint clean.User-facing changes
None — tests and internal color sourcing only. The dark lineage-node card shifts
#1e1e1e→#262626, which is negligible and now consistent with its sibling nodes.🤖 Generated with Claude Code