Skip to content

Reset dashboard content store per run; document concurrency limits#4

Merged
DustinVK merged 2 commits into
mainfrom
wherefore/dashboard-concurrency-docs
Jul 3, 2026
Merged

Reset dashboard content store per run; document concurrency limits#4
DustinVK merged 2 commits into
mainfrom
wherefore/dashboard-concurrency-docs

Conversation

@DustinVK

@DustinVK DustinVK commented Jul 3, 2026

Copy link
Copy Markdown
Owner

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_ROOT and only varies WHEREFORE_SRC, so Astro's .astro content store (anchored to root) is shared across every project. Question ids (Q-001...) are identical in every project, so a store left over from a different --src collides and Astro logs the duplicate-id warnings.

Changes

  • bin/wherefore-dashboard.js — clear data-store.json at the start of each dev/build so every run is scoped to the current --src. Silences the warnings for the common sequential "view project A, then project B" flow.
  • Package README — new "Running several projects at once" section documenting the narrow remaining concurrency limit:
    • Multiple dev servers at once is fine (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 devDependency install.
  • Top-level README — one-line pointer to that section.

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 test in packages/wherefore-dashboard passes (11/11). Verified the second sequential build no longer emits duplicate-id warnings, and the README anchor resolves.

🤖 Generated with Claude Code

DustinVK and others added 2 commits July 3, 2026 13:52
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>
@DustinVK DustinVK merged commit f8d2a9f into main Jul 3, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant