fix(studio): open Markdown links in resource preview (#3723) - #3726
Open
RerankerGuo wants to merge 1 commit into
Open
fix(studio): open Markdown links in resource preview (#3723)#3726RerankerGuo wants to merge 1 commit into
RerankerGuo wants to merge 1 commit into
Conversation
Route internal viking:// Markdown targets through the existing resource navigator instead of the attachment download endpoint. Preserve download fallback behavior for previews without a navigation callback and add a click regression test. Test: NODE_OPTIONS='--localstorage-file=/tmp/openviking-vitest-localstorage' pnpm test\nTest: pnpm build
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.
Description
Internal Markdown links rendered by Web Studio's resource preview were rewritten to
/api/v1/content/download, which forced an attachment download instead of opening the linked resource in the existing preview. This change routes resolvedviking://links through Web Studio's resource navigator while preserving the download fallback for preview contexts without a navigation callback.Human Involvement
Related Issue
Refs #3723
This addresses the Web Studio navigation symptom. It does not change compile-time relation metadata generation.
Type of Change
Changes Made
FilePreviewand its lazy wrapper.viking://resources/wiki/target.mdinstead of replacing them with the attachment download endpoint..mdtarget is preserved and the resource navigator receives it.Testing
Commands:
Checklist
Screenshots (if applicable)
Not applicable; the regression is covered by the component test.
Additional Notes
pnpm exec tsc --noEmitremains blocked by existing errors in generated SDK files and unrelated components on currentmain; the production Vite build passes.