Reset dashboard content store per run; document concurrency limits#4
Merged
Conversation
The dashboard runs Astro with a fixed root and only varies WHEREFORE_SRC, so Astro's .astro content store is shared across projects. Because question ids (Q-001...) are identical in every project, a store left over from a different --src collided and Astro logged "Duplicate id" warnings. Clear data-store.json at the start of each dev/build so every run is scoped to the current --src, silencing the warnings for the sequential view-A-then-B flow. Document the narrow remaining concurrency limit in the package README (concurrent dev servers are fine since each serves from its own in-memory store; parallel builds against the shared npx install can cross-contaminate output -- serialize them or use a per-project install), with a pointer from the top-level README. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Ships the per-run content-store reset (duplicate-id fix) and the concurrency docs to npx users. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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.
What
Fixes the
[glob-loader] Duplicate id "Q-001" ...warnings that appear when the dashboard is run against one project and then another.Why
The CLI runs Astro with a fixed
root: PACKAGE_ROOTand only variesWHEREFORE_SRC, so Astro's.astrocontent store (anchored toroot) is shared across every project. Question ids (Q-001...) are identical in every project, so a store left over from a different--srccollides and Astro logs the duplicate-id warnings.Changes
bin/wherefore-dashboard.js— cleardata-store.jsonat the start of eachdev/buildso every run is scoped to the current--src. Silences the warnings for the common sequential "view project A, then project B" flow.devservers at once is fine (each serves from its own in-memory store).builds against the sharednpxinstall can cross-contaminate output — serialize them, or use a per-project devDependency install.Notes
Full per-run root isolation was evaluated and set aside: a spike showed it only works by stacking undocumented Astro/Vite behaviors with a silent-corruption failure mode. Documenting the build-specific limit is the robust, low-cost path.
Testing
npm testinpackages/wherefore-dashboardpasses (11/11). Verified the second sequential build no longer emits duplicate-id warnings, and the README anchor resolves.🤖 Generated with Claude Code