Repository navigation
#242 — extract design-system layer: tokens/base partials + shared appearance.js - #264
Conversation
…e engine Re-layer templates/report.css into shared askama partials: - partials/tokens.css — the design-system ROOT: semantic token layer + all eight [data-theme] blocks, extracted VERBATIM (exact current values, zero value changes; verified byte-identical to the source range and rule-stream-identical in the emitted report CSS). - partials/base.css — the minimal cross-family page chassis ([hidden], html/body token skin, links, form controls), moved only where cascade-order-safe; the report body GEOMETRY stays in report.css (it must keep beating the 720px responsive body rule on order). - report.css keeps the report-specific remainder (style packs, chrome, components, density, reconciliation + coverage layers). Split theme.js: the load/apply/persist core (cute-dbt.appearance.v1, prefers-color-scheme default, html-attribute application) moves to the new shared templates/appearance.js (window.CuteAppearance), embedded by BOTH page families; theme.js keeps the report-only settings UI and drives the shared engine. Explore pages adopt the design system: both pages include the tokens + base partials and the appearance engine, and their inline styles re-express on the semantic tokens (values mapped, not redesigned). Canvas-paired legend/status chips keep the fixed canvas palette (the report's fixed-DAG-palette posture) so the legend can never desync from what the Cytoscape engines draw. asset_embed: APPEARANCE_JS constant + banner/sentinel/key-pin tests; comment-balance + [hidden] + eight-theme-block integrity gates extended over the partials via test-only include_str. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Four new real-Chromium guards (TDD: RED on the pre-extraction explore
pages, GREEN after):
- explore_pages_boot_applies_the_appearance_attributes — both pages set
html[data-theme] per the saved->scheme->light contract + html.dark
family sync (storage-free).
- explore_pages_honor_the_saved_appearance_key — a saved
cute-dbt.appearance.v1 theme/density hydrates at boot on both pages
(storage-gated like the report's persist guard).
- explore_{dag,tests}_page_themes_correctly_on_every_theme — UNIVERSAL
sweep: all 8 themes x both pages; asserts the body paints the theme's
resolved --bg token AND key text surfaces clear WCAG AA 4.5:1 against
the EFFECTIVE composited backdrop. Hygiene: transitions/animations
killed before measuring (the 120ms body transition corrupts reads);
visibility via checkVisibility(), never rect>0.
insta snapshots regenerated for the re-layered <style>/<script> shape
(structural slice only — strip-bodies keeps the tags).
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…stem All five goldens regenerated via the exact CI example-report-check matrix commands (jaffle-shop, playground, diff-showcase, explore dag+tests) and re-verified byte-identical against fresh renderer output. Report-page hunks are exclusively the re-layering (token/base partial banners + moved rules + the theme.js/appearance.js split); the CSS rule stream is identical apart from the body rule splitting into token-skin + geometry halves with unchanged combined declarations — zero computed-style deltas, all 67 pre-existing headless guards pass unmodified. Explore hunks add the shared tokens/base partials, the appearance engine and the tokenized page styles. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
The tokens partial is now the design-system root for design sessions; the explore-gaps list shrinks to the remaining items (.lineage-tooltip contract retrofit -> #241, explore settings affordance -> #219, style-pack/density rules report-only). templates/README.md file table updated in the feature commit. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
The pre-push hook's clippy (rust 1.95) flagged the sweep helper's doc list continuation; the earlier in-session clippy pass had its exit code masked by the output pipeline. Blank doc line + escaped brackets; no behavior change. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
|
Warning Review limit reached
More reviews will be available in 53 minutes and 19 seconds. Learn how PR review limits work. Your organization has run out of usage credits. Purchase more credits in the billing tab to continue. ⌛ How to resolve this issue?After more reviews become available, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans include higher PR review limits than trial, open-source, and free plans. In all cases, reviews become available again over time. During sustained high-volume PR review activity, CodeRabbit may temporarily slow when the next review becomes available. Please see our Fair Usage Limits Policy for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: ⛔ Files ignored due to path filters (2)
📒 Files selected for processing (19)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
Ready to review this PR? Stage has broken it down into 7 individual chapters for you: Chapters generated by Stage for commit 7953e79 on Jun 12, 2026 1:30am UTC. |
📄 Rendered report previewAll golden examples regenerated cleanly. 🟡 Golden examplesCommitted to
🐶 Live dogfood previewThis PR doesn't touch ▶ Open ↗ opens the report in your browser in one click — The Pages preview may take ~1 min to update after this comment Alternative: GitHub CLI# gh CLI >= 2.63 extracts into ./report-preview-playground/.
gh run download 27388564100 -R breezy-bays-labs/cute-dbt -n report-preview-playground
open report-preview-playground/playground-report.htmlPosted by |
There was a problem hiding this comment.
Code Review
This pull request refactors the design system and appearance engine of cute-dbt by extracting core tokens and base styles into shared CSS partials, and moving the core theme-handling logic into a new shared templates/appearance.js script. This enables both the report and explore pages to consistently consume the same design system and honor saved user preferences. Headless integration tests have also been added to verify theme application and WCAG contrast compliance. The review feedback suggests improving compatibility with older ES5 engines by avoiding the two-argument classList.toggle() in the shared appearance script, and adding a defensive guard in templates/theme.js to gracefully handle cases where the shared appearance engine fails to load.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
|
Adversarial verification report (orchestrator; 5 serial refutation agents, real Chromium over localhost, main b2315c3 vs PR 7953e79).
Merge posture: the extraction itself is verified clean (C1/C2/C4/C5). C3 is pre-existing token debt that #242's own AC (exact current values; #251 out of scope) correctly excluded — fixing values here would break the zero-visual-diff review contract. Known consequence of merging: explore pages carry the sub-AA combos on 5 themes until #251 lands. Founder's call; held unmerged. |
…273) Repair every (theme x token) pair the #264 adversarial verification measured sub-AA, at TOKEN level in templates/partials/tokens.css (the #206 deepening pattern; since #264 the tokens live in one place so the report and explore pages repair simultaneously): - --text-muted deepened on solarized/latte/rosepine/gruvbox, lightened on tokyo (worst-of bg/bg-alt/surface/surface-2/code-header-bg/code-bg now 4.58-5.31); latte/rosepine adopt the established #198/#227 scoped stand-ins (Catppuccin subtext1 #5c5f77, rosepine #5d5780) - --accent / --accent-hover deepened on solarized/latte/rosepine (worst-of bg/bg-alt/surface now 4.55-4.77) - --code-add/rem-sigil per-theme repairs (solarized 2.81 -> 4.61) and .diff-sigil opacity dimming removed (the #227 composited-opacity rule: tokens carry the full painted ratio) - --code-add/rem-word: dark themes' tint alphas lowered, light themes' rem-word hexes lightened (body text on composited word now >= 4.56) - split-view .ds-num cells gain aria-hidden parity with the unified .diff-gutter (decorative positional metadata, the #178 idiom) Guards (tests/headless_toggle.rs): a universal 8-theme AA matrix sweep on the report (9 surfaces x 8 themes, effective alpha-composited backdrops, transitions killed, checkVisibility-asserted, opacity-dimming pin, injected accent-link probe) + the explore dag/tests sweeps extended with the C3 combos (muted-on-bg, accent-nav-on-bg, muted-on-surface-2). RED-proven: with tokens.css reverted the guards fail on exactly the measured C3 matrix pairs; with the repair they pass at >= 4.55. Goldens regenerated via the example-report-check recipes (jaffle-shop, playground, diff-showcase, explore) — only token-value CSS + the sigil/ aria-hidden changes appear, zero structural HTML drift, no path leaks. Closes #251 Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
Summary
Implements the #241 design decision's mechanical slice: re-layers
templates/report.cssinto shared askama partials and shares the appearance engine, so the report and explore page families consume ONE design system structurally.templates/partials/tokens.css— the design-system ROOT: the semantic token layer + ALL 8[data-theme]blocks, extracted verbatim (exact current values, zero value changes; the extracted range verified byte-identical to its report.css source before deletion).templates/partials/base.css— the minimal cross-family page chassis ([hidden], html/body token skin, link colors, select/input/textarea skin), moved only where cascade-order-safe. The report body geometry deliberately stays inreport.css— it must keep winning the equal-specificity contest against the 720px responsive body rule (order-sensitive; documented in both files' banners and pinned by an asset_embed gate).templates/report.css— keeps the report-specific remainder (style packs, settings chrome, tokenized components, density overrides, reconciliation + coverage layers, incl. every per-theme surface-scoped AA override family).templates/appearance.js(window.CuteAppearance) — the minimal shared appearance engine: readscute-dbt.appearance.v1, resolves the prefers-color-scheme default, applies[data-theme]+html.dark,[data-style],[data-density],[data-difflayout],[data-coverage]and the accent custom properties. Embedded by both page families.templates/theme.js— now the report-only settings UI (control wiring/sync, DataTables reflow, DAG-engine dispatch) driving the shared engine; the storage-key literal lives in exactly one file (asset_embed-pinned).--dag-*tokens.Acceptance criteria → evidence
@media 720pxbody rule still precedes the body-geometry rule (index 289 < 291). All 67 pre-existing headless guards pass UNMODIFIED (every contrast pin, tooltip, interaction and layout guard intests/headless_toggle.rs):cargo test --test headless_toggle --locked -- --ignored→ 71 passed (67 existing + 4 new).cute-dbt.appearance.v1and render correctly on all 8 themes — four new headless guards pin it (inventory below), RED on the pre-extraction pages, GREEN after.[data-theme]block per theme in tokens.css and zero bare theme blocks in report.css. The design: shared block-diff palette + muted-text surfaces sub-AA on latte/rosepine/solarized (measured) #251 sub-AA muted-token debt is untouched (out of scope by design).git diff --text -U0audited — see below; all five re-verified byte-identical against fresh renderer output after commit.partials/tokens.css; the "Planned change (task: extract the design-system layer — tokens/base askama partials + shared appearance.js consumed by both page families #242)" paragraph replaced with the landed state; the explore-gaps list shrunk to the remaining items (.lineage-tooltipcontract retrofit → design: explore pages never adopted the design system — token/theme/appearance sync mechanism needed #241 design pass, explore settings affordance → feature: settings toggle to enable/disable coverage-intelligence display (report + explorer) #219, style packs/density report-only).Goldens-diff explanation (
git diff --text -U0 -- examples/)All three report goldens (jaffle-shop, playground, diff-showcase) carry the identical 26-hunk shape, fully explained by the re-layering:
[hidden],html, body token-skin/geometry split,a/a:hover, select/input/textarea family) — the rule moves verified order-safe above.<script>block became two; same THEMES/ACCENTS tables, same apply functions, same persistence shape — the existing appearance persist guard passes unmodified).No hunk touches markup, payload, or any computed-style-affecting declaration beyond the verified moves. The two explore goldens are additive: the tokens + base partials, the appearance engine
<script>, and the tokenized page styles.New explore guard inventory (
tests/headless_toggle.rs, all-- --ignored)explore_pages_boot_applies_the_appearance_attributeshtml[data-theme]follows the saved→prefers-color-scheme→light contract;html.darktracks the theme family (storage-free, never platform-pinned)explore_pages_honor_the_saved_appearance_keycute-dbt.appearance.v1theme + density hydrates at boot (reload + poll; storage-gated exactly like the report's persist guard)explore_dag_page_themes_correctly_on_every_theme--bgtoken AND page-title / legend-chip / legend-code clear WCAG AA 4.5:1 against the effective composited backdropexplore_tests_page_themes_correctly_on_every_themeMeasurement hygiene baked in:
* { transition: none !important; animation: none !important }injected before measuring (the 120ms body transition), visibility asserted viacheckVisibility()(never rect>0, never first-match sampling) with fail-loud absentee naming.Gates (run directly — lefthook skips in fresh worktrees; the pre-push hook then re-ran the battery on push)
cargo fmt --checkcargo clippy --all-targets --locked -- -D warnings(by exit code)cargo nextest runcargo test --test bddcargo test --test headless_toggle --locked -- --ignoredcargo test --test headless_zero_egress --locked -- --ignoredRUSTDOCFLAGS="-D warnings" cargo doc --no-deps --lockedcargo deny checkScope discipline held: no token value changed (#251 untouched), no
.lineage-tooltipcontract retrofit (#241's design pass), no explore settings/coverage toggle (#219 stays blocked-by this and lands later), no explore visual redesign beyond token adoption.Closes #242
🤖 Generated with Claude Code