Root cause: every local resource preview tab kept its own /api/local-folder/events EventSource alive. Hidden PDF and Office tabs consumed browser same-origin connection slots, so later preview iframes/file reads stalled and rendered as blank pages.
Changes:
- keep passive resource file watching active-tab only
- close inactive resource-tab EventSources on tab activation and release
- update the bug record with the PDF fifth-open and XLSX fourth-open repro and verification
Verification:
- node --check rust/crates/mnote-web/browser/document-resource-tab-runtime.js
- cargo test -p mnote-web --manifest-path rust/Cargo.toml pdf_preview_page_does_not_render_visible_toolbar
- cargo test -p mnote-web --manifest-path rust/Cargo.toml document_shell_returns_page_aggregate_snapshot
- cargo build -p mnote-web --manifest-path rust/Cargo.toml
- browser smoke: opened 5 XLSX previews; #4 and #5 completed with tableCount=1
- browser smoke: opened 5 DHA PDFs; #5 rendered 8/8 canvases, iframeCount=0, browser errors=0
- add document evidence parsing/search/open routes, Hermes tool wiring, local index settings/status, and the document-evidence skill plus design notes
- fix PDF resource tabs by rendering PDFs inline with pdf.js canvases instead of iframe preview pages, release PDF documents on close, and document the fourth-PDF stall bug
- keep PDF preview at 2x rendering while removing the previous lazy-load/placeholder direction, and make dev:hot bind loopback defaults externally reachable
Verification:
- node --check rust/crates/mnote-web/browser/document-resource-tab-runtime.js
- node scripts/task-dev-hot-plan-test.js
- cargo test -p mnote-web --manifest-path rust/Cargo.toml pdf_preview_page_does_not_render_visible_toolbar
- cargo test -p mnote-web --manifest-path rust/Cargo.toml document_shell_returns_page_aggregate_snapshot
- cargo build -p mnote-web --manifest-path rust/Cargo.toml
- browser smoke: sequentially opened the four tea_seed_oil_cosmetic PDFs; fourth PDF rendered 15/15 canvases, iframeCount=0, browser errors=0
- scope local-folder PageTree revision and document sidebar rendering to fileTreeScope
- preserve projected table/image attrs for local Markdown aggregate fallback
- avoid FileTree restore forced layouts on cold design open
- add API ChatOnly provider runtime and local OCR task handling regressions
- add npm dev:hot wrapper using cargo-watch and page reload polling
- add mnote-web dev hot reload endpoint and coverage
- record current architecture review and tracked bug findings across realtime, tree, editor, and AI runtimes
Verification:
- node scripts/task-dev-hot-plan-test.js
- node --check scripts/dev-hot.js
- cargo test -p mnote-web dev_hot -- --nocapture
Open filetree mindmap assets inside the primary document pane so the sidebar root is not rebuilt during rapid mindmap/page switching.
Keep filetree active rows on doc:<documentId> and asset:<mindmapId>, shorten generated mindmap filenames, and preserve legacy index rows only as compatibility input.
Add task438-task445 browser smokes and close the 4-27/4-38/4-39/4-40 tree-domain bug records.