feat(vscode): .md link navigation and stale panel fix#84
Open
teezeit wants to merge 1 commit intoakonan:mainfrom
Open
feat(vscode): .md link navigation and stale panel fix#84teezeit wants to merge 1 commit intoakonan:mainfrom
teezeit wants to merge 1 commit intoakonan:mainfrom
Conversation
- Intercept <a href="*.md"> clicks in the webview and post a navigate message so clicking a link switches the editor to that file instead of opening a browser URL - Add resolveLink() supporting both relative and absolute hrefs; absolute paths walk up the directory tree to find the target file - showTextDocument uses the current editor's viewColumn so the file replaces in-place rather than opening a new tab - Register onDidDispose in deserializeWebviewPanel (mirrors the createOrShowPreview path) so restored panels clean up correctly - Switch vscode:prepublish from tsc to esbuild bundle so wiremd is inlined into the VSIX and the extension activates correctly Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
471a6e4 to
72ede83
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
vscode-plugin-navigation.mp4
.mdlink navigation — clicking<a href="*.md">links in the preview now switches the editor to that file (in the same column) instead of opening a browser tab. Supports relative and absolute hrefs; absolute paths walk up the directory tree to locate the target.deserializeWebviewPanelnow registersonDidDisposeto clearthis.panel, matching whatcreateOrShowPreviewalready does. Prevents stale references after VS Code restart.vscode:prepublishfrom plaintscto an esbuild bundle sowiremdis inlined into the VSIX. Without this the extension silently failed to activate (status bar button missing).Dependencies
This PR is independent of the parser/renderer PRs (#78–#83) — all changes are purely VS Code extension-side. However, merging after those PRs is recommended so the bundled VSIX includes all latest wiremd features.
Test plan
[Label](other.md)link, open the preview, click the link — editor switches toother.mdin the same column, preview updates/pages/other.md) — resolves correctly from any directory depth🤖 Generated with Claude Code