Skip to content

Local viewer builds go to an untracked inst/viewer-dev/ - #16

Merged
jiajic merged 1 commit into
devfrom
chore/dev-bundle
Nov 2, 2026
Merged

jiajic merged 1 commit into
devfrom
chore/dev-bundle

Conversation

@jiajic

@jiajic jiajic commented Nov 2, 2026

Copy link
Copy Markdown
Collaborator

Building the viewer locally rewrote the committed bundle in inst/viewer/, so every local build had to be undone with git restore inst/viewer before committing. A .gitignore entry can't fix that: the bundle is tracked, so its changed and deleted files still show, and CI's git add -A inst/viewer would refuse an ignored path.

  • npm run build:dev writes inst/viewer-dev/, which is in .gitignore and .Rbuildignore.
  • .viewer_dir() serves inst/viewer-dev/ while its index.html is newer than inst/viewer/'s. Otherwise it serves the committed bundle. A pull that updates the committed bundle makes that bundle the newer one, so a stale local build isn't served.
  • npm run build and CI are unchanged.
  • AGENTS.md, README and the change checklist now point to build:dev.

Tests: a new server test covers which bundle is chosen. The server and e2e tests pass with load_all() serving inst/viewer-dev/. The intermittent "rules are visible" e2e test failed in one run and passed in the next four.

🤖 Generated with Claude Code

`npm run build:dev` writes inst/viewer-dev/ (gitignored, Rbuildignored), and
.viewer_dir() serves it while it is newer than the committed inst/viewer/,
so local builds no longer dirty the tracked bundle.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@jiajic
jiajic merged commit b69c3d2 into dev Nov 2, 2026
2 of 3 checks passed
@jiajic
jiajic deleted the chore/dev-bundle branch November 2, 2026 13:27
@jiajic jiajic mentioned this pull request Nov 2, 2026
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