Repository navigation
Show images and play video in the terminal client - #16
Conversation
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configuration
You can disable this status message by setting the Use the checkbox below for a quick retry:
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
adcb8ed to
617d3ca
Compare
|
@coderabbitai review Rebased onto #15 (12ec205). This stacked PR has not had a bot review yet. |
|
…iles Public URLs are fetched over HTTPS only, without credentials, within size, redirect and time limits; errors never include the URL. Images are decoded with dimension and allocation limits and downscaled; videos go to an owner-only temporary file that is removed on drop. Decoded images share an LRU cache with a 64 MiB budget. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Request::Media loads in a spawned task gated by the four-read device quota: Url sources use the public download client, Blob sources are read in 256 KiB chunks and always released. Results arrive as Update::Media. Request::Release frees blob handles the UI no longer needs. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
fxcode PR #2 keeps a finished video open and treats a failed seek as a no-op, so seeking past the end no longer stops the app. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
On terminals with Kitty graphics, images on screen load four at a time and show inline. o opens a message's image or video full screen and p plays its video, with pause, seek, and replay keys. The app releases blob handles it does not show or no longer needs, skips expired links until a refresh renews them, and never loads an image again after the cache drops it. A player error closes the viewer instead of the app. The demo includes a generated image. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Enabling reqwest's TLS feature for qmsg also enabled it for the orchestrator's reqwest, whose Client::new() then panicked without a crypto provider. hyper-rustls with ring keeps the same rules: HTTPS or loopback HTTP only, no credentials in the URL, at most three checked redirects, size limits, and errors without the URL. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
617d3ca to
2d5a83e
Compare
Stacked on #15 (
t3/build-tui-pr). It adds tuicord-style images and video to the terminal client.Behavior
Image. Rows are reserved from the media's width and height, and images are never enlarged. Images that are partly scrolled off, or covered by an overlay, show their name instead.oopens the selected message's image or video full screen;pplays its video. Without a selected message, both use the newest message with media. In the viewer, Space pauses, ←/→ seek 5 s (or move between a message's images),rreplays, andqor Esc closes. Video plays through fxcodeVideo(libmpv) with fxcode's control bar.[image: name]and download nothing.oexplains that kitty, Ghostty or WezTerm is needed. Spoilers show as[spoiler image]until opened.Media handling
ReadBlobin 256 KiB chunks and always released afterwards. The UI releases handles for messages a refresh replaced or dropped, for discarded or stale history pages, and for snapshot icons and avatars, which it does not show. A handle is never released while a read is using it, and never released twice.0700directory with a0600file, under$XDG_RUNTIME_DIRor the temp directory. The file name comes only from the MIME type. The directory is deleted when the viewer closes.fxcode
Pins fxcode PR #2 (
27431fc, stacked on fxcode #1). Without it, seeking past the end of a video made fxcode return a fatalmpv: error running command, which closed qmsg. CI already installslibmpv-dev.Validation
cargo test -p qmsg: 50 tests pass, including these media tests:cargo clippy --workspace --all-targetswith-D warnings,cargo fmt --all --check, andcargo test -p qmsg-orchestratorpass. Downloads use hyper-rustls rather than reqwest. Enabling reqwest's TLS feature here would also enable it for the orchestrator, whosereqwest::Client::new()then panics; that broke the first CI run.ReadBlob, and an MP4. Both images showed inline. The blob was read once and released, with no duplicate releases across refreshes. The video played, paused, seeked past its end twice, and replayed. Closing removed its temp directory.Limits
GIFs show their first frame. Videos have no inline poster frame: they show
▶ [video: name]until played. The viewer shows the image downscaled to at most 1600 px. Seeking past the end restarts the video from the beginning, which is mpv's behavior with the fxcode fix. Images are not shown inside reply previews.Screenshots
These links use Claudio's S9 file server and require Tailscale, so GitHub cannot show them inline. They show only demo data and a local fixture.
536d5d1)o)p)Ghostty, except the last row in Alacritty. 1280×800, font size 11.
🤖 Generated with Claude Code