Repository navigation
refactor(css): WP1.1 sprint 5 — orphan cleanup (-67.5K lines) + hugo_stats cachebuster - #359
Conversation
…youts.css, _consolidated-components.css + orphaned forms.css All four verified zero loaders: no template resources.Get, no live @import (components.css forms import is commented out; _consolidated-components.css was the only forms.css importer and is itself bundled nowhere). Gate: converged production build — 19 css bundle hashes identical, inline style blocks identical; HTML diffs limited to documented noise (sw.js stamp, taxonomy term-casing race). test:critical 46/46, dtest 46/46. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
fl-{about,careers,clients,contact,homepage,services,use-cases,component,
service-detail}-layout.css, fl-clients{,-alt}-bundle.css,
beaver-grid-layout.css, utilities.css — zero loaders repo-wide; only
remaining references were provenance comments and the dead aggregators
removed in the previous commit. ~157 untokenized #121212 literals from
the sprint-4 count leave with them.
Gate: converged production build — all bundle hashes identical, inline
styles identical, zero non-noise HTML diffs. test:critical 46/46,
dtest 46/46.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
variables/colors.css is bundled nowhere (sprint-4 finding); its --color-dark def duplicated the canonical one in foundations/css-variables.css. Updated the two comments that still pointed at it (css-variables.css, c-navigation.css). Gate: converged production build — bundles and inline styles byte-identical (comments are stripped by cssnano). test:critical 46/46, dtest 46/46. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…ervices+clients, cta-block - page/service-template.html: no content sets its layout; was also the only loader of the already-deleted fl-service-detail-layout.css. - partials/homepage/services.html + clients.html: services.html has zero callers; clients.html's only caller was services.html. - partials/components/cta-block.html: only caller was the draft-only _test layout (content/_test is draft: true, never built) — removed that test section and renumbered. Gate: converged production build — bundles + inline styles byte-identical, zero non-noise HTML diffs; drafts-enabled build still compiles. test:critical 46/46, dtest 46/46. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…ed forms import The __paragraph pair was the sprint-4 documented flicker source in the inline components bundle: the class renders only in dead/draft templates, so hugo_stats.json omits it and PurgeCSS drops it — except when a stale postcss cache resurrected it between builds. Deleting the source rules makes the purged state deterministic. Also dropped the commented-out components/forms import (forms.css itself deleted earlier this sprint). Gate: converged production build — bundles + inline styles byte-identical across 404/home/blog/services, zero non-noise HTML diffs. test:critical 46/46, dtest 46/46. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…che flicker) PurgeCSS reads ./hugo_stats.json but Hugo's asset cache didn't invalidate css targets when the stats file changed — a stale postcss cache could resurrect purged rules between builds (sprint-4 documented flicker; this sprint's baseline reproduced it: cold build differed from warm by 7 inline navigation-bundle rules). Custom cachebusters replace Hugo's defaults, so the defaults are replicated alongside the new rule. Verified: after wiping the project hugo_cache + resources/_gen, cold build now byte-matches the warm build (previously they diverged). Converged output identical to sprint baseline. test:critical 46/46, dtest 46/46. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…ader race documented Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
📝 WalkthroughWalkthroughThe PR adds Hugo cachebuster rules, records CSS migration cleanup, removes legacy CSS bundles, utilities, templates, and homepage partials, updates token documentation, and adjusts the layout test ordering. ChangesCSS migration cleanup
Possibly related PRs
Suggested reviewers: 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ 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 |
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@docs/projects/2509-css-migration/TASK-TRACKER.md`:
- Around line 557-608: Replace every em dash in the newly added TASK-TRACKER.md
content with a hyphen, including the sprint heading, commit descriptions,
finding label, and any other affected prose; preserve the surrounding wording
and Markdown structure.
- Around line 560-561: Update the dead-aggregators entry in TASK-TRACKER.md by
wrapping _consolidated-layouts.css and _consolidated-components.css in
backticks, preserving the surrounding text and formatting.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: 65c853c3-29c3-4a18-8165-ae3557644bd3
📒 Files selected for processing (29)
config/_default/hugo.tomldocs/projects/2509-css-migration/TASK-TRACKER.mdthemes/beaver/assets/css/_consolidated-layouts.cssthemes/beaver/assets/css/beaver-grid-layout.cssthemes/beaver/assets/css/components.cssthemes/beaver/assets/css/components/_consolidated-components.cssthemes/beaver/assets/css/components/c-navigation.cssthemes/beaver/assets/css/components/content-block.cssthemes/beaver/assets/css/components/forms.cssthemes/beaver/assets/css/critical.cssthemes/beaver/assets/css/fl-about-layout.cssthemes/beaver/assets/css/fl-careers-layout.cssthemes/beaver/assets/css/fl-clients-alt-bundle.cssthemes/beaver/assets/css/fl-clients-bundle.cssthemes/beaver/assets/css/fl-clients-layout.cssthemes/beaver/assets/css/fl-component-layout.cssthemes/beaver/assets/css/fl-contact-layout.cssthemes/beaver/assets/css/fl-homepage-layout.cssthemes/beaver/assets/css/fl-service-detail-layout.cssthemes/beaver/assets/css/fl-services-layout.cssthemes/beaver/assets/css/fl-use-cases-layout.cssthemes/beaver/assets/css/foundations/css-variables.cssthemes/beaver/assets/css/utilities.cssthemes/beaver/assets/css/variables/colors.cssthemes/beaver/layouts/_test/single.htmlthemes/beaver/layouts/page/service-template.htmlthemes/beaver/layouts/partials/components/cta-block.htmlthemes/beaver/layouts/partials/homepage/clients.htmlthemes/beaver/layouts/partials/homepage/services.html
💤 Files with no reviewable changes (14)
- themes/beaver/assets/css/components/_consolidated-components.css
- themes/beaver/layouts/partials/homepage/clients.html
- themes/beaver/assets/css/fl-contact-layout.css
- themes/beaver/assets/css/_consolidated-layouts.css
- themes/beaver/assets/css/critical.css
- themes/beaver/layouts/partials/components/cta-block.html
- themes/beaver/assets/css/utilities.css
- themes/beaver/layouts/partials/homepage/services.html
- themes/beaver/assets/css/components.css
- themes/beaver/layouts/page/service-template.html
- themes/beaver/assets/css/variables/colors.css
- themes/beaver/assets/css/components/forms.css
- themes/beaver/assets/css/fl-clients-bundle.css
- themes/beaver/assets/css/components/content-block.css
| ### 2026-07-12 (sprint 5 — orphan cleanup) | ||
| - **Landed** (branch css-migration/wp1.1-sprint-5, one bundled PR, 6 commits, | ||
| 28 files, +24/-67,517): | ||
| 1. 08b0c6e3 — dead aggregators deleted: critical.css, | ||
| _consolidated-layouts.css, _consolidated-components.css (zero loaders; | ||
| the last was NOT on the sprint-4 list but is the same class — flagged), | ||
| plus forms.css (its only importer was _consolidated-components.css). | ||
| 2. 6a92e204 — all 13 orphan CSS files deleted (66,459 lines): the 9 | ||
| fl-*-layout files, fl-clients{,-alt}-bundle, beaver-grid-layout, | ||
| utilities.css. Only remaining refs were provenance comments. The ~157 | ||
| untokenized #121212 literals from the sprint-4 count leave with them. | ||
| 3. 23eda403 — dead variables/colors.css deleted; stale comments pointing | ||
| at it fixed (foundations/css-variables.css, c-navigation.css). | ||
| 4. c458213b — dead templates deleted: page/service-template.html (no | ||
| content uses the layout; only loader of fl-service-detail-layout.css), | ||
| partials/homepage/services.html + clients.html (zero callers / only | ||
| called by each other), partials/components/cta-block.html (only caller | ||
| was the draft-only _test layout; test section removed there too). | ||
| 5. 31e0e9a6 — dead .c-content-block__paragraph rule pair deleted from | ||
| content-block.css (the sprint-4 flicker source) + commented-out | ||
| components/forms import removed. | ||
| 6. 21ca3789 — [[build.cachebusters]] hugo_stats.json → css added to | ||
| hugo.toml (Hugo defaults replicated alongside, since custom entries | ||
| replace them). Verified: cold-cache build now byte-matches warm build; | ||
| before the fix this sprint's own baseline reproduced the flicker (cold | ||
| differed from warm by 7 inline navigation-bundle rules). | ||
| - **Gate method**: per commit — converged production build to scratch | ||
| (build twice, take the second) diffed against a converged pre-sprint | ||
| baseline: all 19 css bundle hashes + inline style blocks byte-identical, | ||
| whole-tree HTML diff empty modulo documented noise (sw.js?v= stamp, | ||
| taxonomy term-casing races). test:critical 46/46 + dtest 46/46 per | ||
| commit. Zero rollbacks. | ||
| - **NEW FINDING — header partialCached race (pre-existing, NOT fixed)**: | ||
| partials/page/header.html caches header-content.html via partialCached | ||
| with NO variant key, so the whole header (incl. navigation -active | ||
| state) is computed once from whichever page renders first and reused on | ||
| ALL pages. One build during this sprint marked "Blog" -active on all | ||
| 1300 pages; the steady state is NO item ever -active. Menu active-state | ||
| is effectively dead/nondeterministic site-wide. Fix (own change, visual | ||
| impact): key the cache by section/menu-state or drop active-state from | ||
| the cached fragment. | ||
| - **New follow-ups**: | ||
| - hero-section.html, testimonial.html, use-case-card.html + the _test | ||
| layout/content are only reachable via the draft-only test page — | ||
| delete-or-keep decision (they'd take the remaining | ||
| .c-content-block__text/.u-text-center dead classes with them). | ||
| - header partialCached -active race (above). | ||
| - **Carried follow-ups**: inline components tree tokenization (~19 | ||
| literals) if components.css gets the foundation; --jt-text-color / | ||
| --cta-button-bg repoint decision (deliberate value change — Paul); | ||
| fl-common-modules.css Bootstrap reboot purge (own sprint); WP1.2. | ||
|
|
There was a problem hiding this comment.
📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win
Replace em dashes with hyphens per coding guidelines.
The new content uses em dashes (—) in several places (e.g., line 557 "sprint 5 — orphan cleanup", line 560 "08b0c6e3 — dead aggregators", line 589 "NEW FINDING — header partialCached race"). As per coding guidelines, **/*.md files should use -, not an em dash, in content.
📝 Proposed fix
-### 2026-07-12 (sprint 5 — orphan cleanup)
+### 2026-07-12 (sprint 5 - orphan cleanup)- 1. 08b0c6e3 — dead aggregators deleted: critical.css,
+ 1. 08b0c6e3 - dead aggregators deleted: critical.css,-- **NEW FINDING — header partialCached race (pre-existing, NOT fixed)**:
+- **NEW FINDING - header partialCached race (pre-existing, NOT fixed)**:🧰 Tools
🪛 markdownlint-cli2 (0.22.1)
[warning] 561-561: Spaces inside emphasis markers
(MD037, no-space-in-emphasis)
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@docs/projects/2509-css-migration/TASK-TRACKER.md` around lines 557 - 608,
Replace every em dash in the newly added TASK-TRACKER.md content with a hyphen,
including the sprint heading, commit descriptions, finding label, and any other
affected prose; preserve the surrounding wording and Markdown structure.
Source: Coding guidelines
| 1. 08b0c6e3 — dead aggregators deleted: critical.css, | ||
| _consolidated-layouts.css, _consolidated-components.css (zero loaders; |
There was a problem hiding this comment.
📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win
Wrap filenames with underscores in backticks to fix markdownlint MD037.
markdownlint flags line 561 because _consolidated-layouts.css and _consolidated-components.css are interpreted as emphasis markers with spaces inside. Wrap filenames in backticks to resolve the warning and improve readability.
[source_static_analysis_hints]
📝 Proposed fix
- 1. 08b0c6e3 — dead aggregators deleted: critical.css,
- _consolidated-layouts.css, _consolidated-components.css (zero loaders;
+ 1. 08b0c6e3 - dead aggregators deleted: `critical.css`,
+ `_consolidated-layouts.css`, `_consolidated-components.css` (zero loaders;📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| 1. 08b0c6e3 — dead aggregators deleted: critical.css, | |
| _consolidated-layouts.css, _consolidated-components.css (zero loaders; | |
| 1. 08b0c6e3 - dead aggregators deleted: `critical.css`, | |
| `_consolidated-layouts.css`, `_consolidated-components.css` (zero loaders; |
🧰 Tools
🪛 markdownlint-cli2 (0.22.1)
[warning] 561-561: Spaces inside emphasis markers
(MD037, no-space-in-emphasis)
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@docs/projects/2509-css-migration/TASK-TRACKER.md` around lines 560 - 561,
Update the dead-aggregators entry in TASK-TRACKER.md by wrapping
_consolidated-layouts.css and _consolidated-components.css in backticks,
preserving the surrounding text and formatting.
Summary
Sprint-5 of Project 2509 CSS Migration: executes the sprint-4 cleanup follow-up queue. 28 files, +24 / -67,517 lines, zero compiled-output changes.
Commits
critical.css,_consolidated-layouts.css,_consolidated-components.css+ orphanedforms.css. Note:_consolidated-components.csswas not on the sprint-4 list but is the same verified class (zero loaders);forms.css's only importer was that aggregator.fl-*-layoutfiles,fl-clients{,-alt}-bundle,beaver-grid-layout,utilities.css. Only remaining references were provenance comments. Removes the ~157 untokenized#121212literals counted in sprint 4.variables/colors.css; fix the two stale comments pointing at it.page/service-template.html(no content uses the layout),partials/homepage/services.html+clients.html(zero external callers),partials/components/cta-block.html(only caller was the draft-only_testlayout; its test section removed there)..c-content-block__paragraphrule pair (the sprint-4 documented inline-bundle flicker source) + commented-out forms import.[[build.cachebusters]]hugo_stats.json → css(Hugo defaults replicated, since custom entries replace them).Verification (per commit)
sw.js?v=stamp, taxonomy term-casing races).bin/rake test:critical46/46 (84 screenshots, 0 diffs) +bin/dtest46/46, per commit. Zero rollbacks.resources/_gen, the cold build now byte-matches the warm build. Before the fix, this sprint's own baseline reproduced the flicker — cold differed from warm by 7 inline navigation-bundle rules (incl. abody{font-family}rule).New finding (pre-existing, NOT fixed here)
partials/page/header.htmlrenders the whole header viapartialCachedwith no variant key — nav-activestate is computed once from whichever page renders first and reused on all ~1300 pages. One build during gating marked "Blog" active site-wide; steady state is no item ever active. Documented in the tracker as a follow-up (fixing it changes visuals and deserves its own PR).🤖 Generated with Claude Code
Summary by CodeRabbit
Bug Fixes
Refactor
Documentation