Files
dotfiles/claude/memory/feedback-arc-make-rebuild-after-scss-partial-edits.md
T

3.3 KiB

name, description, type, originSessionId
name description type originSessionId
ARC build pipeline — make rebuild required after SCSS partial edits Hakyll only tracks scss/main.scss, not its @import-ed partials. After editing any _*.scss partial, make build runs but SCSS doesn't recompile — site goes out with stale CSS. Use make rebuild after partial edits. feedback a156edbb-0c3d-4285-b3ed-f5a45b8dda66

make rebuild — required after editing any SCSS partial

Date observed: 2026-05-05 (chamber-page polish session)

The rule

After editing any scss/AldineXXI/_*.scss partial in ARC, run make rebuild rather than make build. Otherwise the site deploys with stale CSS (the SCSS won't be recompiled, only the markdown content pipeline will run).

Why

site.hs rule for SCSS:

match "scss/main.scss" $ do
    route $ gsubRoute "scss/main" (const "assets/css/style") ...
    compile $ getResourceString
        >>= withItemBody (unixFilter "sass" ["--stdin", "--style=compressed", "--load-path=scss"])

Hakyll's incremental build only re-runs the compile for files matched in match. The match "scss/main.scss" matches only scss/main.scss, not any of the partials it imports (_compass.scss, _layout.scss, _sidenotes.scss, etc.).

When a partial changes, main.scss itself hasn't changed, so Hakyll skips SCSS recompilation entirely. The deploy proceeds with the previously-compiled _site/assets/css/style.css, and the new SCSS rules are silently absent from production.

How to apply

Edited file Right command
content/**/*.md only make build
templates/*.html only make build
site.hs make rebuild (already documented)
scss/main.scss make build (Hakyll detects it)
Any scss/AldineXXI/_*.scss partial make rebuild
Mixed (markdown + partial) make rebuild

When in doubt, make rebuild. The cost (a few extra seconds) is much lower than the cost of a silent stale-CSS deploy.

Diagnostic

If a recent SCSS rule appears absent from the deployed site, check _site/assets/css/style.css mtime and content:

ls -la _site/assets/css/style.css                           # mtime should be recent
grep -c '<some new selector you added>' _site/assets/css/style.css   # should be ≥ 1

If mtime is from before the partial edit OR the new selector isn't present, the rebuild was skipped. Run make rebuild.

Possible upstream fix (deferred)

The cleanest long-term solution: change site.hs so Hakyll tracks SCSS partials as dependencies of main.scss. Hakyll has makePatternDependency and match "scss/AldineXXI/*" patterns that could express this. Out of scope for the moment — workaround (make rebuild) is sufficient. Worth flagging if the project CLAUDE.md gets a build-pipeline cleanup pass.

Surface to CLAUDE.md

The project CLAUDE.md (~/_Dev/animal-davidglidden-eu/CLAUDE.md) currently says:

make build               # Standard build, auto-deploys to CloudFlare + GitHub mirror
make rebuild             # Clean rebuild, auto-deploys (use after site.hs changes)

The "use after site.hs changes" hint should extend to "use after site.hs or any SCSS partial changes." Steward to authorize the CLAUDE.md edit when convenient; until then this memory carries the rule.