Fix Windows resource cache for Orbit templates#1554
Conversation
lefarcen
left a comment
There was a problem hiding this comment.
Hey @PerishCode, this is a focused fix for the Windows packaging cache boundary. The source change lines up with #1507: win.resource-tree now hashes design-templates, and the schema marker bump makes sure old resource-tree entries cannot be reused. The regression test also hits the important stale-cache behavior by changing design-templates/orbit-general/SKILL.md and expecting a second cache miss plus rematerialized content.
I don’t see code blockers in this pass. One PR-body housekeeping item before the next review pass: the new template is still missing What users will see and Surface area. Since this is packaging/runtime behavior rather than UI, Surface area can likely mark the packaged/default-behavior surface or explicitly say there is no direct UI checkbox to select, but reviewers should not have to infer that.
If you want to patch the description with an assistant, this prompt should be enough:
Read the current PR body for #1554 and the template at
.github/pull_request_template.md. Rewrite the description filling in:
- Why: use case + pain being addressed, not a one-line restatement
- What users will see: user perspective — what they click, what new
thing appears, what default changes- Surface area: check every applicable box; pick "None" if this is not user-facing
- Screenshots if UI is checked: entry-point screenshot, before/after
- Validation: what you actually ran (
pnpm guard,pnpm typecheck, etc.)
Then update viagh pr edit 1554 --repo nexu-io/open-design --body-file -.
No rush — the implementation itself looks coherent; this just helps the next reviewer scope the user-visible packaging impact faster.
mrcfps
left a comment
There was a problem hiding this comment.
@PerishCode I reviewed the Windows resource-tree cache change and the new regression coverage. The cache key now tracks design-templates, the schema bump prevents reuse of pre-fix entries, and the added test exercises the stale-cache path by mutating design-templates/orbit-general/SKILL.md and verifying the rematerialized resource tree updates as expected.
Thanks for tightening up this packaging edge case 🙌
🔁 Powered by Looper · runner=reviewer · agent=opencode · An autonomous AI dev team for your GitHub repos.
Summary
design-templatesin the Windowswin.resource-treecache keydesign-templates/orbit-generalchanges invalidate and rematerialize the Windows resource treeFixes #1507
Why
The packaged resource copy already includes
design-templates, but the Windows resource-tree cache key did not hash that tree. A stalewin.resource-treecache could therefore keep reusing a pre-migration resource tree that lacked Orbit templates, andwin.electron-builder-dirwould inherit that stale key downstream.Validation
pnpm -C tools/pack exec vitest run tests/win-resources.test.ts --reporter verbosefailed with staleversion onecontent after updatingdesign-templates/orbit-general/SKILL.mdpnpm -C tools/pack exec vitest run tests/win-resources.test.ts tests/resources.test.ts --reporter verbosepnpm --filter @open-design/tools-pack typecheckpnpm --filter @open-design/tools-pack testpnpm --filter @open-design/tools-pack buildgit diff --checkpnpm guardpnpm typecheckPackaged artifact proof
pnpm tools-pack win build --to dir --namespace o1507 --dir C:\tmp\od-1507 --jsonwin-unpacked/resources/open-design/design-templatescontainsorbit-general,orbit-github,orbit-gmail,orbit-linear, andorbit-notionorbit-general/SKILL.mdexists in the artifactdocument.titleisOpen Design/api/design-templatesexposes all five Orbit template ids aboveC:\tmp\od-1507Notes
orbit-general; this PR fixes the Windows cache invalidation boundary that can keep packaged artifacts stale.pnpm typecheckcompleted successfully with existing Astro content warnings and Shikiurdufallback warnings.