Skip to content

feat(desktop): play vault audio and video natively - #189

Merged
frostyard-machines merged 8 commits into
mainfrom
feat/native-media
Nov 11, 2026
Merged

frostyard-machines merged 8 commits into
mainfrom
feat/native-media

Conversation

@bketelsen

@bketelsen bketelsen commented Nov 11, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Play vault audio/video in native reading views, live preview and attachment tabs. Standalone wiki/Markdown media embeds become blob-backed playback controls; prose links retain their link behavior. Play opens the decoder, Pause/seek/Stop control it, and unmount closes playback and the file. Attachment tabs retain the system-player fallback.

Closes #148. Stacked on #188, which includes native math from #187. The pinned MyGo already supplies the playback APIs.

Risk tier

Risk tier: 3 — L1 paths internal/desktop/editor/live.go, internal/desktop/reading/view.go, new internal/desktop/media/media.go, and packaging/flatpak/org.frostyard.Frostnotes.json; L2 .github/risk-paths.json. Only validated local blob hashes with supported extensions reach playback; URLs and paths are rejected. Playback starts on a user press. Flatpak adds the PulseAudio socket for sound. Registered audio decoders are pinned through the existing MyGo module and regenerated Go sources.

Docs housekeeping

Updated the render contract, native UI spec, app design and desktop plan with reciprocal links. Added the media opener to the risk paths.

Verification

  • mise exec -- make check and make desktop-build passed on the refreshed branch.
  • Media/render/reading/editor race tests passed during implementation.
  • Regression tests cover standalone Markdown/wiki embeds in quotes/lists, inline fallback, rejected URL/path inputs and unmount resource cleanup.
  • Regenerated Flatpak sources, including the merged frostui dependency from fix(deps): adopt merged frostui and stabilize async checks #191.
  • Physical speakers and platform video codecs were not exercised; unavailable codecs surface errors and attachment tabs retain Open in default app.

Merge order

Remaining merge order: #191 → #188 → #189 → #190. #187 was merged into #188, so its math changes land with #188. Preserve ancestry with merge commits, or rebase the remaining branches after a squash merge. Merge #188 first, then retarget this PR to main.

Update (2026-11-11): moved onto MyGo v0.9.0 by merging

Local results

On each of #188, #189 and #190, these are green:

  • make check
  • go test -race over ./internal/desktop/... and ./internal/render/
  • make desktop-build

make desktop-evidence on #190: the tree at a median of 369 µs, the switcher at 4.8 ms, and a phone edit in 8.7 ms.

Typing cost: about 2.7 ms a keystroke in source mode, and 11.6 to 12.7 ms in live preview, against main's 9.0 ms without per-line styles and the 16 ms budget.

Not verified yet

@github-actions github-actions Bot added level:L1 Read every line risk:high Touches a path in .github/risk-paths.json labels Nov 11, 2026
# Conflicts:
#	docs/design/app.md
#	docs/plans/0009-mygo-desktop.md
#	go.sum
#	internal/desktop/editor/live.go
#	internal/desktop/reading/view.go
Base automatically changed from feat/native-line-styles to main November 11, 2026 17:29
@bketelsen
bketelsen added this pull request to stack #198 November 11, 2026 17:57
@frostyard-machines
frostyard-machines merged commit fa13eb8 into main Nov 11, 2026
10 checks passed
@frostyard-machines
frostyard-machines deleted the feat/native-media branch November 11, 2026 18:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

level:L1 Read every line risk:high Touches a path in .github/risk-paths.json

Projects

None yet

Development

Successfully merging this pull request may close these issues.

desktop: play audio and video

2 participants