Skip to content

feat(files): add safe Markdown source and preview views - #448

Merged
Qiyuanqiii merged 1 commit into
Qiyuanqiii/docs-current-statefrom
Qiyuanqiii/workspace-markdown-preview
Oct 23, 2026
Merged

Qiyuanqiii merged 1 commit into
Qiyuanqiii/docs-current-statefrom
Qiyuanqiii/workspace-markdown-preview

Conversation

@Qiyuanqiii

@Qiyuanqiii Qiyuanqiii commented Oct 21, 2026 •

Copy link
Copy Markdown
Member

Summary

Workspace Markdown files previously offered only numbered source. Add Source and Preview controls for .md, .markdown, and .mdown files, 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-line so its diff contains only the Markdown preview change.

Validation

  • CI passed for 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 false
  • node node_modules/vite/bin/vite.js build --logLevel warn
  • Real Chrome journey against the production API and renderer: open Markdown, switch to Preview, search for a marker, and select the result. The preview returned to Source and highlighted line 24; the content digest stayed unchanged.
  • git diff --check

Screenshots

Before, at #442 head 5892e371: Markdown can only be read as numbered source.

Before: Markdown source only

After: Preview shows formatted documentation and retains the Source control.

After: formatted Markdown preview

The committed acceptance README records the disposable sample and exact browser flow.

Surface governance

  • No Surface is added, promoted, downgraded, deprecated, or removed.

N/A — no Surface change.

Audit

  • No credentials or local runtime data are included.
  • Policy, workspace, sandbox, and persistence boundaries were reviewed.
  • The acceptance README documents the changed behavior and reproduction.

@Qiyuanqiii
Qiyuanqiii added this pull request to stack #483 October 23, 2026 17:13
Base automatically changed from Qiyuanqiii/workspace-search-hit-line to Qiyuanqiii/docs-current-state October 23, 2026 17:16
@Qiyuanqiii
Qiyuanqiii force-pushed the Qiyuanqiii/workspace-markdown-preview branch from b6e89e8 to d6678c2 Compare October 23, 2026 17:16
@Qiyuanqiii
Qiyuanqiii merged commit 90a81a7 into Qiyuanqiii/docs-current-state Oct 23, 2026
1 check passed
@Qiyuanqiii
Qiyuanqiii deleted the Qiyuanqiii/workspace-markdown-preview branch October 23, 2026 17:17
Qiyuanqiii added a commit that referenced this pull request Oct 23, 2026
…cs-current-state

chore(integration): 将 docs-current-state 批次补齐到 main(#442 #448 #463)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant