docs(skills): invoke-registry-parity — Fresh vs TanStack loader registration#191
Open
JonasJesus42 wants to merge 1 commit into
Open
docs(skills): invoke-registry-parity — Fresh vs TanStack loader registration#191JonasJesus42 wants to merge 1 commit into
JonasJesus42 wants to merge 1 commit into
Conversation
…tration Document the architectural difference between @deco/deco (Fresh, walks every file into manifest.gen.ts) and @decocms/start (TanStack, prunes loaders/actions not referenced by .deco/blocks when generate-loaders.ts is called with --decofile-dir). Symptom: runtime.site.loaders.X returns undefined and the network tab shows /deco/invoke/site/loaders/X → 404. Common when migrating Fresh storefronts that invoke loaders from React code instead of the CMS. References the two follow-up framework issues: - #189 — flip prune to opt-in - #190 — dev-mode filesystem fallback Real-world hit: deco-sites/baggagio-tanstack delivery-promise drawer. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
There was a problem hiding this comment.
1 issue found across 1 file
Prompt for AI agents (unresolved issues)
Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.
<file name=".claude/skills/invoke-registry-parity/SKILL.md">
<violation number="1" location=".claude/skills/invoke-registry-parity/SKILL.md:194">
P2: Cross-reference `[[deco-htmx-cache-contamination]]` links to a skill file that does not exist in this repository. Either create that file or remove the reference.</violation>
</file>
Reply with feedback, questions, or to request a fix.
Re-trigger cubic
| - The `@decocms/start` invoke route is `/deco/invoke/...`. Fresh's was `/live/invoke/...`. Both shapes are still accepted on the handler. | ||
| - `setupApps()` in `@decocms/apps` uses `registerInvokeHandlers()` (additive registry) for VTEX/Shopify keys — independent of `setInvokeLoaders()`. The site-side `generate-loaders.ts` only governs `site/*` keys. | ||
| - The same pruning logic also drops loaders that aren't referenced by `__resolveType` even if they're imported in code via `runtime.site.loaders.X`. The static analyzer doesn't see those runtime-string keys. | ||
| - This is closely related to (but distinct from) `[[deco-htmx-cache-contamination]]` — that one is about SSR-cached HTML leaking cookies, this is about invoke routing. |
There was a problem hiding this comment.
P2: Cross-reference [[deco-htmx-cache-contamination]] links to a skill file that does not exist in this repository. Either create that file or remove the reference.
Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At .claude/skills/invoke-registry-parity/SKILL.md, line 194:
<comment>Cross-reference `[[deco-htmx-cache-contamination]]` links to a skill file that does not exist in this repository. Either create that file or remove the reference.</comment>
<file context>
@@ -0,0 +1,206 @@
+- The `@decocms/start` invoke route is `/deco/invoke/...`. Fresh's was `/live/invoke/...`. Both shapes are still accepted on the handler.
+- `setupApps()` in `@decocms/apps` uses `registerInvokeHandlers()` (additive registry) for VTEX/Shopify keys — independent of `setInvokeLoaders()`. The site-side `generate-loaders.ts` only governs `site/*` keys.
+- The same pruning logic also drops loaders that aren't referenced by `__resolveType` even if they're imported in code via `runtime.site.loaders.X`. The static analyzer doesn't see those runtime-string keys.
+- This is closely related to (but distinct from) `[[deco-htmx-cache-contamination]]` — that one is about SSR-cached HTML leaking cookies, this is about invoke routing.
+
+## Bagaggio incident — exact reproduction (2026-05)
</file context>
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.
Summary
Adds
.claude/skills/invoke-registry-parity/SKILL.mddocumenting the architectural difference between Fresh (`@deco/deco`) and TanStack (`@decocms/start`) in how the invoke registry is populated.In Fresh, `manifestGen.ts` walks every file under `src/loaders/`, `src/actions/` and registers all of them. In TanStack, `scripts/generate-loaders.ts` filters by `__resolveType` references in `.deco/blocks/` when called with `--decofile-dir`, so code-only invocations (header components, hooks, effects) silently 404.
This caused the Bagaggio delivery-promise drawer + popup to never populate after migration. Fix on the site side was dropping `--decofile-dir` from `package.json`'s `generate:loaders`.
Related issues
Test plan
🤖 Generated with Claude Code
Summary by cubic
Adds
.claude/skills/invoke-registry-parity/SKILL.mdexplaining why loaders/actions can 404 after migrating from@deco/deco(Fresh) to@decocms/start(TanStack), and how to fix it. This helps teams unblockruntime.site.loaders.Xcalls that returnundefined.generate-loaders.ts./deco/invoke/site/loaders/*and how to detect missing registry entries.--decofile-diror manually register loaders/actions.Written for commit 1c322fc. Summary will update on new commits. Review in cubic