Repository navigation
Refresh open Markdown links when workspace files change - #26599
Conversation
f19dd12 to
be7ed94
Compare
9dcd07e to
e5123f3
Compare
be7ed94 to
e01f5a8
Compare
e5123f3 to
8636c57
Compare
e01f5a8 to
ed9b620
Compare
8636c57 to
b99c90a
Compare
ed9b620 to
7eb686c
Compare
7eb686c to
b932977
Compare
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configuration
📒 Files selected for processing (12)
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 2 remain after this review. 📝 WalkthroughWalkthroughThe Markdown document listing now refreshes after qualifying worktree file-change events. Refresh requests carry a freshness timestamp, and watcher-triggered failures retain the last successful list. The changes add tests for event filtering, request freshness, refresh behavior, and cleanup. A Docker-backed E2E test checks document listing and preview-link state after a remote document is created and removed. CI routing and job selection include the new E2E spec. Priority: ➖ Normal Merge Risk: ⚪ Minimal · up to Document-list refreshes and the new E2E routing appear ready to merge after normal checks. 🚥 Pre-merge checks | ✅ 3 | ❌ 2❌ Failed checks (2 warnings)✅ Passed checks (3 passed)Full details: Description checkExplanation The description is detailed and covers the change, rationale, testing, visual proof, scope, and checklist. However, it explicitly states that no issue exists and does not provide the required linked issue reference. Full details: Docstring CoverageExplanation Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 11 functions across 11 files. (1 skipped: 1 unsupported.)
✨ Finishing Touches 💡 1📝 Generate docstrings 💡
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
ELI5
A Markdown preview now notices when a linked document is created or deleted in its workspace, without requiring you to reopen the preview.
What Changed
Before, a remote host and the file explorer could both list a newly created
LATE.md, while an open[[LATE]]link still said Document not found. Markdown metadata now listens to the existing editor file-change event, checks the host and workspace root, and refreshes after creates, deletes, renames, directory changes or watcher overflow.Why
The app already owns the file watcher. Reusing its events avoids another watcher, IPC channel or polling loop. A short debounce combines write bursts; split panes share a scan started after the change and bypass older pending results. Ordinary content updates and unrelated files do not trigger document scans.
Linked Issue
Found during SSH → Remote conversion testing; no existing issue.
Visual Proof
Before: the explorer lists LATE.md, but the preview link remains missing. After: the same open preview resolves the link. The corrected runtime also verifies that deletion restores missing-target styling.
markdown-live-documents-runtime-red-final.log
markdown-live-documents-runtime-green-final.log
Testing
The identical conversion → full restart → open preview → host-create journey fails on untouched Phase 3.5 in 21.4 s, despite a positive host document-list response and the actual host-qualified create event. The corrected build passes create and delete in 13.3 s. Nine new regressions fail on baseline; 186 tests across 16 files pass after the change. Full
pnpm tc,pnpm lint, changed-code quality, fresh E2E build and commit hooks pass. CI's standalone React Doctor check also passes after removing an unnecessary callback ref; the rebuilt create/delete runtime passes again in 12.3 s.Unit coverage includes host/root isolation, local ownership, Markdown extensions, renames, directory deletion, overflow, burst/split-pane coalescing, late stale results, equal-clock freshness, and cancellation when the owner changes or the pane unmounts.
Review
Independent of the other consolidation fixes; base is OrcaWin/phase35. Product changes are limited to document-list refresh, sharing fresh in-flight requests, exporting an existing Markdown extension classifier, and typing the existing DOM event.
Agent skill upstream boundary
Notes
No remote wire or server change. The same event path covers folder workspaces, Git worktrees, direct SSH and managed hosts. Windows path behavior uses the existing cross-platform path functions; Windows was not runtime-tested.
The real proof restarts the converted app before changing files because conversion can separately strand the editor watcher after its initial connection failure. That recovery defect remains under investigation. The independent wrong-host metadata and duplicate editor-record defects also remain visible in baseline logs; this PR does not fix them or rich-editor NodeView styling.
Checklist