Repository navigation
feat(files): add safe Markdown source and preview views - #448
Merged
Qiyuanqiii merged 1 commit intoOct 23, 2026
Merged
Qiyuanqiii merged 1 commit into
Qiyuanqiii merged 1 commit into
Conversation
This was referenced Oct 21, 2026
Base automatically changed from
Qiyuanqiii/workspace-search-hit-line
to
Qiyuanqiii/docs-current-state
October 23, 2026 17:16
Qiyuanqiii
force-pushed
the
Qiyuanqiii/workspace-markdown-preview
branch
from
October 23, 2026 17:16
b6e89e8 to
d6678c2
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
Workspace Markdown files previously offered only numbered source. Add Source and Preview controls for
.md,.markdown, and.mdownfiles, using the existing SafeMarkdown renderer and the already returned, redacted snapshot.Source remains the initial view. Search hits and new citation locations return to numbered source. Switching views preserves the original file-reference payload, provenance, truncation indicator, and editing drafts. HTTP(S) links retain the existing new-window behavior; relative, local, and execution links remain inert, raw HTML is skipped, and remote images are omitted.
Stacked on #442. This PR targets
Qiyuanqiii/workspace-search-hit-lineso its diff contains only the Markdown preview change.Validation
b6e89e8c481bb38293d584a9204b36916528c834: all 23 checks succeeded in workflow 39655433477.node node_modules/vitest/vitest.mjs run src/components/workspace-explorer-preview.test.tsx src/components/workspace-explorer.test.tsx src/components/safe-markdown.test.tsx src/components/file-edit-drafts.test.tsx— 38 tests passed.node node_modules/typescript/bin/tsc -b --pretty falsenode node_modules/vite/bin/vite.js build --logLevel warngit diff --checkScreenshots
Before, at #442 head
5892e371: Markdown can only be read as numbered source.After: Preview shows formatted documentation and retains the Source control.
The committed acceptance README records the disposable sample and exact browser flow.
Surface governance
N/A — no Surface change.
Audit