feat: treq send — preview images/text in the agent terminal - #233
Open
Ziinc wants to merge 15 commits into
Open
Conversation
Agents can run `treq send <path>` (or pipe stdin) to stage a path-based asset and dispatch it to the open Treq window. The sending PTY shows square thumbnails; click opens an image or read-only text modal. Co-authored-by: Ziinc <Ziinc@users.noreply.github.com>
Also un-nest dismiss control so thumbnails are not nested buttons. Co-authored-by: Ziinc <Ziinc@users.noreply.github.com>
Contributor
|
🚀 Web preview: https://preview-233.treq-9zy.pages.dev |
Design notes (why)
|
Cover text + image square thumbnails and both preview modals. Screenshot harness convertFileSrc now returns file:// so images rasterize. Co-authored-by: Ziinc <Ziinc@users.noreply.github.com>
Float square previews absolutely over the terminal bottom with a scrim fade, and always show a circular X to dismiss each thumbnail. Co-authored-by: Ziinc <Ziinc@users.noreply.github.com>
Co-authored-by: Ziinc <Ziinc@users.noreply.github.com>
Thumbnails extend horizontally from the top-left corner with a top-down gradient scrim. Co-authored-by: Ziinc <Ziinc@users.noreply.github.com>
Makes the circular close control readable against the dark terminal. Co-authored-by: Ziinc <Ziinc@users.noreply.github.com>
Replace the modal preview with a backdrop-blur carousel of the asset itself. Terminal chips use shadcn Attachment; lightbox actions close, copy to clipboard, and reveal in Finder/Explorer/file manager. Co-authored-by: Ziinc <Ziinc@users.noreply.github.com>
Hide the grey dismiss control until the attachment is hovered so the terminal strip stays quieter at rest. Co-authored-by: Ziinc <Ziinc@users.noreply.github.com>
Add a thumbnail variant that matches the previous treq send overlay: h-14 w-14 dark tiles, cover images, icon+title for text, and hover dismiss X at the corner. Skip size/orientation variants so min-w-40 and card padding do not stretch the squares. Co-authored-by: Ziinc <Ziinc@users.noreply.github.com>
Align capture expectations with the restored square thumbnail styling. Co-authored-by: Ziinc <Ziinc@users.noreply.github.com>
Show zoom out, percentage, and zoom in in the treq send toolbar when viewing an image. Scale the current image with CSS transform and reset zoom when switching carousel slides. Text previews omit zoom controls. Co-authored-by: Ziinc <Ziinc@users.noreply.github.com>
Co-authored-by: Ziinc <Ziinc@users.noreply.github.com>
transform:scale only repaints larger without changing layout width, so SVG previews looked unchanged. Use CSS zoom so the img's used size (and scrollable overflow) actually increases. Co-authored-by: Ziinc <Ziinc@users.noreply.github.com>
transform:scale and CSS zoom either leave layout width unchanged or fail to serialize from jsdom into screenshot captures. Size the img with width/height in px (fitted natural size * zoom, with a 256px fallback) so SVG and raster previews actually grow. Co-authored-by: Ziinc <Ziinc@users.noreply.github.com>
Ziinc
marked this pull request as ready for review
August 9, 2026 15:09
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds
treq sendso agents can push on-disk files (or stdin) into the treq UI for preview. Image and text assets show as dark square thumbnails over the sending terminal; click opens a blur carousel lightbox with copy / reveal / close.Image zoom
Zoom out / percentage / zoom in (50%–400%, 25% steps) for image assets. Zoom sets explicit
width/height(fitted natural size × factor) so layout size actually grows —transform: scale()only repaints larger without changing width. Text previews omit zoom controls.Test plan