Local demo serves stale editor bundles after source changes
Maintainers usually reply within 1 day
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 35/100
- Issue type
- Bug
- Clarity
- Clearly specified
- Activity status
- Stale
- Tech stack
- node.js, typescript
- Domain
- build-system, developer-experience
Research direction
Start in packages/bim-editor/demo/build.ts by reading ensureEditorDemoBuilt, its pending map, and freshBuild to understand how freshness checks and concurrent requests work. Add regression coverage for unchanged cache reuse, rebuilding after a source change, concurrent requests, and retrying failed builds; the issue proposes a focused signed-off PR, and an open linked PR is already in progress.
Written by the indexing model from the issue text.
Description
What happened
While testing an editor fix with the local demo, changing source code and reloading the browser continued to show the old behavior. Restarting the dev server rebuilt the editor and picked up the change.
ensureEditorDemoBuilt in packages/bim-editor/demo/build.ts retains its resolved promise in the pending map. Later page/asset requests return that same promise before reaching freshBuild, so the existing source-mtime check is never run again in that process. The map entry is currently removed only on failure.
Expected behavior
Concurrent requests should share one in-progress freshness check/build. Once it settles, later requests should check the disk cache again: reuse unchanged output and rebuild when a tracked source changed. A failed rebuild should remain retryable.
This does not require a file watcher or hot module replacement; a browser reload should be enough.
Steps to reproduce
- Run
npm run demoand open the editor, allowing its first build to finish. - Change visible editor text in a source file included in the bundle.
- Reload the page without restarting the server.
- Observe that the old text remains. Restart the server and reload; the new text appears.
Area / environment
Local editor demo build cache, not trade-specific. Observed on macOS with Node 22.23.1 and Chrome; the retained-promise path is platform independent.
The same map lifecycle remains on current upstream main. I searched upstream for a matching rebuild issue and did not find one.
Proposed scope
Release completed entries while preserving in-flight request sharing. Add regression coverage for unchanged-cache reuse, rebuilding after a source change, concurrent requests, and recovery from failed builds. I plan to follow up with a focused signed-off PR.
No client models, credentials, or real project data are needed to reproduce this.
- Dominant language
- TypeScript
- Stars
- 85
- Forks
- 10
- Avg merge
- 1h 28m
- Merged PRs (30d)
- 20
Getting set up
- Ships a Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from permitzip/mutinybim
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Maintainers usually reply within 1 day
-
area: docs documentation
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
Maintainers usually reply within 1 day
-
area: web-app bug
Difficulty 2/5 1-3 hours Newbie friendliness 83/100
permitzip/mutinybim#27 · 1 comment ·
Maintainers usually reply within 1 day
-
enhancement
Difficulty 5/5 Over a week Newbie friendliness 35/100
permitzip/mutinybim#66 · 2 comments ·
Maintainers usually reply within 1 day
-
enhancement
Difficulty 4/5 3-5 days Newbie friendliness 48/100
permitzip/mutinybim#65 · 2 comments ·
Maintainers usually reply within 1 day
All issues in permitzip/mutinybim
Similar issues
-
🐛 The Rulekeeper - An index run that gives up on the lock ends SucceededPossibly taken @github-actions claimed this today. Open
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
SSWConsulting/SSW.Rules#2809 · 1 comment ·
Maintainers usually reply within 1 day
-
automated-triage type/bug type/ci
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Maintainers usually reply within 1 day
-
📦 expo-router Android contributor: external needs review sdk-58 severity: medium
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Maintainers usually reply within 1 day
-
Translate the READMEOpendocumentation good first issue
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
asasemahmed/openboard#68 ·
Maintainers usually reply within 1 day
-
bug good first issue
Difficulty 2/5 1-3 hours Newbie friendliness 72/100