Skip to content

feat(native): achieve parity for transcript media playback, HTML/table media, and gallery - #370

Merged
rynfar merged 3 commits into
nativefrom
nw/244-tr-media
Nov 14, 2026
Merged

rynfar merged 3 commits into
nativefrom
nw/244-tr-media

Conversation

@rynfar

@rynfar rynfar commented Nov 14, 2026 •

Copy link
Copy Markdown
Owner

Closes the remaining TR-MEDIA parity gaps between Web and apps/native: inline and modal video playback (WKWebView with strict CSP, re-sign URL stability latch, active player lease pool, base-plane fullscreen portal, and GPUI fallback), HTML media/heading/table/video preprocessing and table-cell media grids with column alignment, full message gallery navigation, user message video attachments, raw-HTML opt-out for user messages, offline data: image decoding, workspace file preview video player, and SourceControlMedia fallback resolution. Updates TR-MEDIA to done in apps/native/parity/LEDGER.md.

Key changes

  • Core (crates/core): AssetResource::SourceControlMedia + fallback_url(), VideoAttachment & is_workspace_video_preview_path, MediaHints title metadata, MediaResolveOptions & resolve_media_source_with_options, MarkdownMediaDocument::with_inherited_definitions & gallery_images(), TableData::cell_markdown_rows, HTML <img>/<video>/<source>/<h1>/<table>/<details> normalization with raw-HTML toggle (prepare_display_markdown_with_raw_html) and <url> / literal < ... > / multiline code-fence preservation, and UserAttachmentPartition.videos.
  • Client & App (crates/client, crates/app): fetch_data_media offline data: URI decoding and SourceControlMedia fallback in assets.rs and MediaCache; VideoPlayer (media/video.rs) with http(s) external-link validation, non-source update_options notifications, and unmount/owner WebView+lease retirement; MediaViewer (media/viewer.rs) mixed image/video gallery storing opening MediaScope and AnyWindowHandle, first-frame FullscreenViewer sync (window.refresh()), and dismiss on ThreadView::sync / FilePreview::set_target / unmount; transcript/{media.rs,markdown.rs,markdown/blocks.rs,messages.rs} per-block scoped video/image keys, authored sizing, full-message gallery navigation, aligned media tables, NestedViews cycle cleanup, user raw-HTML opt-out + user videos; and files/preview.rs video preview.

Verification on latest HEAD (954fa89f0a)

  • cargo clippy --manifest-path apps/native/Cargo.toml --workspace --all-targets -- -D warnings: pass (0 warnings)
  • cargo test --manifest-path apps/native/Cargo.toml -p t3-core -p t3-client: t3-client 110/110, t3-core 1372/1372 (incl. themes::tests::runtime_palettes_match_generated_web_css), conformance 8/8
  • t3-native --features snapshot --test-threads=1 (media::, transcript::, files::, thread_view::): 12 + 41 + 4 + 19 = 76 passed, 0 failed
  • node --test apps/native/parity/sync.test.ts: 42/42 pass
  • vp fmt --check apps/native/parity/LEDGER.md: pass

Snapshot evidence (1440x900 offscreen GPUI on 954fa89f0a)

Ref #244
Ref #294
Closes #187

Model: Antigravity (Gemini 2.5 Pro)

Brings apps/native TR-MEDIA into parity with Web: WKWebView inline/modal video player (re-sign stability latch, lease pool, fullscreen base-plane portal, GPUI fallback), HTML media/heading/table/video preprocessing and media-bearing table grid rendering, full message gallery navigation, user message videos and raw-HTML opt-out, workspace video preview, and SourceControlMedia fallback resolution. Updates TR-MEDIA to done in LEDGER.md.

Model: Claude Sonnet 4.6 (Antigravity)
# Conflicts:
#	apps/native/parity/LEDGER.md
…en review findings

Fix all four review findings and secondary code-fence note from #362:
- Isolate inline VideoPlayer/image keys per block & view entity, retire WebViews/leases on unmount or owner switch, and notify on non-source option changes.
- Preserve bracketed markdown destinations and literal comparisons in HTML headings/tables, escape '<'/'>' in rewritten anchors, and skip fenced code blocks across blank lines.
- Store the opening MediaScope and window handle on MediaViewer, sync FullscreenViewer immediately on open/navigate/dismiss, and close viewer state on thread/file switches or pane unmount.
- Restrict direct External Link opens and button rendering to http(s) URLs.

Model: Antigravity (Gemini 2.5 Pro)
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