[ui] LetterSlot: Add the page for A Letter from the Gardener, shown once the author writes it
docs/LETTER.md holds slots as comments only, so the player sees no change
until the author writes. The app bundles the letter at build time, a small
Markdown subset renders without {@html}, only https: and tel: become links,
and lint:copy now reads the letter. Review found turbo replaying a stale
build after the letter changed; docs/LETTER.md is now in its cache key.
This commit is contained in:
@@ -40,3 +40,18 @@ needed for non-CSS style languages or TS features that emit code (enums, decorat
|
||||
|
||||
**How to apply it.** Leave `svelte.config.js` as `export default {}` until a component
|
||||
needs SCSS or emitted TS. Add the preprocessor in the same commit as that need.
|
||||
|
||||
## Turbo's cache does not see a file the app imports from outside its package
|
||||
|
||||
**What happened.** The app imports `docs/LETTER.md?raw`. With a sample letter written
|
||||
into the file, `pnpm test:e2e` printed `@rosea/app:build: cache hit` and tested the
|
||||
*old* bundle, so the link to the letter was missing. Turbo hashes a package's own
|
||||
files, and `docs/` belongs to no package. Adding `docs/LETTER.md` to
|
||||
`globalDependencies` in `turbo.json` turned it into a `cache miss`, and the test passed.
|
||||
|
||||
**Why it bit.** A build cache keyed on the wrong inputs gives a stale bundle that looks
|
||||
fresh. This is CLAUDE.md §5.4 again, caused by the build tool and not the service worker.
|
||||
|
||||
**How to apply it.** Any file the app bundles from outside its package goes into
|
||||
`globalDependencies` or the task's `inputs`, in the same commit as the import. To
|
||||
check, change the file, run the build, and look for `cache miss`.
|
||||
|
||||
Reference in New Issue
Block a user