Skip to content

Preview Markdown files in Von and browser tabs - #704

Merged
witbrock merged 1 commit into
mainfrom
codex/von-ef9e51808af30722
Sep 14, 2026
Merged

witbrock merged 1 commit into
mainfrom
codex/von-ef9e51808af30722

Conversation

@witbrock

Copy link
Copy Markdown
Member

Merge decision: ready — blob-backed file concepts can open a readable Markdown preview in a closable Von tab or a separate browser tab.

User outcome

File concept headers now offer Preview in Von and Preview in browser tab, alongside the existing download action. Both destinations use the same authorised preview route, with an original-file download link.

Material changes

  • Reuse the download route's actor resolution and canonical file-byte access checks.
  • Render UTF-8 Markdown using the existing sanitiser. A document CSP and sandbox prevent uploaded content from executing scripts, loading embedded resources or submitting forms.
  • Reuse dynamic tab insertion/navigation; reopening a preview activates it, and closing returns to the preceding tab. Previews are removed on authentication changes.
  • Explain unavailable files, unsupported formats, invalid encoding and the 2 MiB synchronous-preview limit; downloads remain available.

Evidence

  • 15 backend tests: rendering, original-byte round trip, denied/unauthenticated access, sanitisation, unsupported/oversized/invalid/empty inputs and existing upload/download/delete behaviour.
  • 50 frontend tests across file actions, tab ID collisions and content sizing.
  • Changed-file ESLint: no errors (15 existing warnings); Python 3.11 grammar check passed.
  • Playwright at localhost:5097, using candidate frontend modules/CSS and real Flask preview/download routes with synthetic authenticated session and in-memory storage: both destinations, desktop/mobile, close/return, three Markdown tables, no page errors or page-width overflow. Download matched the supplied source SHA-256 aeef69cc7bf598a9fcb2549d26a41ca958aa6af3b745a112826cda633ef04996. Evidence retained in the worker's .run/file-preview/; private source contents/screenshots are not published.

Ship boundary

Minimum criteria are readable Markdown in both destinations with preserved download/access behaviour. Script execution, leaked denied-file contents or broken preview navigation would stop shipment; none was observed in the bounded checks.

The browser evidence uses a local fixture, not production data access or public OAuth. Other formats, linked bundle asset resolution, persistent preview tabs and public deployment are outside this delivery. No database/schema or infrastructure changes.

@witbrock
witbrock merged commit 4b1ec51 into main Sep 14, 2026
2 checks passed
@witbrock
witbrock deleted the codex/von-ef9e51808af30722 branch September 14, 2026 22:13
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