Show WebVM target artifacts in VS Code Explorer#26
Conversation
Adding .gitkeep for PR creation (default mode). This file will be removed when the task is complete. Issue: #25
Working session summaryImplemented and pushed the fix to PR #26: #26 What changed:
Verification:
Research sources recorded in the case study: This summary was automatically extracted from the AI working session output. |
🤖 Solution Draft LogThis log file contains the complete execution trace of the AI solution draft process. 💰 Cost estimation:
📊 Context and tokens usage:
Total: (532.1K + 9.8M cached) input tokens, 46.1K output tokens, $17.150118 cost 🤖 Models used:
📎 Log file uploaded as Repository (56381KB)Now working session is ended, feel free to review and add any feedback on the solution draft. |
✅ Ready to mergeThis pull request is now ready to be merged:
Monitored by hive-mind with --auto-restart-until-mergeable flag |
Fixes #25.
Summary
/workspace/targetvisible in the VS Code Explorer by syncing target artifact metadata instead of pruning the directory.Root Cause
The guest sync hook introduced for issue #21 used this traversal:
That kept prompt-time sync fast, but it also made the browser workspace incomplete. Cargo created
target/in the WebVM, but VS Code never received tree entries for it.Fix
web/glue/workspace-sync.jsnow traverses/workspace/targetand emits target files as skipped metadata records with sizes.web/glue/workspace-fs.jsnow supports metadata-only files, shows them throughstat()/readDirectory(), rejects content reads withUnavailable, and excludes them from WebVM priming snapshots.web/disk/Dockerfile.disknow bakes the same sync protocol into/root/.bash_profile.web/tests/workspace-sync.test.mjsreproduces the old prune behavior and verifies target metadata visibility/refresh.web/tests/e2e/local-pages-e2e.test.mjsasserts that the warm-disk workspace tree includestargetwhen browser e2e runs.Reproduction Evidence
docs/case-studies/issue-25/verification/focused-before.logshows the focused regression test failing before the fix because/workspace/targetwas still pruned.docs/case-studies/issue-25/screenshots/local-target-visible.pngis the reporter's local VS Code reference.docs/case-studies/issue-25/screenshots/rust-web-box-target-hidden.pngis the reporter's rust-web-box failure screenshot.Verification
node --test web/tests/workspace-sync.test.mjspassed: 8 tests.node --test web/testspassed: 179 passed, 3 skipped because local Playwright/browser-commander or live URL was not configured.bash -n.git diff --checkpassed.cargo fmt --checkpassed.cargo clippy --all-targets --all-featurespassed.cargo test --all-features --verbosepassed.cargo test --doc --verbosepassed.rust-script scripts/check-file-size.rspassed.cargo build --release --verbosepassed.cargo package --list --allow-dirtypassed.rust-script scripts/check-changelog-fragment.rspassed with PR-like env vars.rust-script scripts/check-version-modification.rspassed with PR-like env vars.Notes
Target file contents are intentionally not mirrored into IndexedDB. Opening a metadata-only target artifact from Explorer returns
Unavailablerather than fake file contents, whilecargo runcontinues to use the real files in the WebVM filesystem.