Search popouts under the bar with the thread panel open; upload tray image previews (#779, #782) #786

Closed
charles wants to merge 0 commits from fix-779-782-search-dropdown-paste-preview into textchat
Owner

Two forum bugs in one PR.

Closes #779
Closes #782

#779: the search filter dropdown opens over the thread panel

Cause. header_popouts (screens/main/mod.rs) placed the search suggestions, pins and inbox popouts by counting the header's tools in from the window's right edge. With a thread or forum post open in the side panel, the channel header ends at the panel's left edge, so all three popouts opened over the panel.
Fix. While the panel is open, the offsets start from the panel's left edge (its width clamped as resizable_split draws it). I checked the other header popouts too. The thread browser, the thread members popout and the forum's sort popout already use measured anchors and were correct. The search results panel is not a popout.
Verified. New tests/header_popouts.rs (headless layout at 1600x900) checks "Search filters", pins and inbox in four setups: thread panel, forum post panel, member list open, member list closed. Before the fix it fails ("thread panel: from: at x = 1236 is under the bar (842..1086)"); after the fix it passes.

#782: a pasted image shows no thumbnail in the upload tray

Cause. The tray never had previews: by design, every tile drew the file-type icon because the UI reads no files. This affected paste, drop and the file picker alike. The original draws previewURL for image files of at most 10 MiB (shouldEagerlyPreviewLocalImage).
Fix.

  • LocalFiles gains preview(file, max_bytes, cover). It has a default body, so it stays within the sanctioned I/O boundary.
  • apps/fluxer's Desktop reads the file on disk (no further than the limit) or the kept pasted image on a thread of its own. It decodes it with the new fluxer_platform::images::thumbnail, which scales it down so it still covers the box.
  • The shell asks for each new image file in any draft once (composer::attachments::Previews, in media::State).
  • The tile draws the picture over its media box, cropped to fill like object-fit: cover. This works in the channel's, the thread panel's and the forum composer's trays.
  • File types follow isEmbeddableImageFile (by MIME type or extension). Files over 10 MiB, non-images and files that don't decode keep their icon.

Verified.

  • tests/upload_previews.rs: which files are asked for (pasted, dropped, picked; PNG/JPEG/GIF/WebP; size limit; panel thread) and a pixel check that the tile draws the picture in the channel and panel composers.
  • app::tests::the_shell_asks_for_the_previews_of_tray_images.
  • Desktop: previews_of_pasted_dropped_and_picked_images (PNG/JPEG/WebP/GIF from disk, pasted, over the limit, not an image, text).
  • Platform: thumbnails_cover_the_box_in_every_format.
  • New golden upload_tray_thumbnail, rendered on lavapipe in fluxer-native-shots:u2204.

Not covered: videos keep their icon (the original draws a frame of them), and animations show their first frame.

Gate: FLUXER_SCREENSHOT_TESTS=1 cargo xtask ci reports "all steps passed". The full screenshot suite also passes on lavapipe (241 passed).

🤖 Generated with Claude Code

Two forum bugs in one PR. Closes #779 Closes #782 ## #779: the search filter dropdown opens over the thread panel **Cause.** `header_popouts` (screens/main/mod.rs) placed the search suggestions, pins and inbox popouts by counting the header's tools in from the window's right edge. With a thread or forum post open in the side panel, the channel header ends at the panel's left edge, so all three popouts opened over the panel. **Fix.** While the panel is open, the offsets start from the panel's left edge (its width clamped as `resizable_split` draws it). I checked the other header popouts too. The thread browser, the thread members popout and the forum's sort popout already use measured anchors and were correct. The search results panel is not a popout. **Verified.** New `tests/header_popouts.rs` (headless layout at 1600x900) checks "Search filters", pins and inbox in four setups: thread panel, forum post panel, member list open, member list closed. Before the fix it fails ("thread panel: from: at x = 1236 is under the bar (842..1086)"); after the fix it passes. ## #782: a pasted image shows no thumbnail in the upload tray **Cause.** The tray never had previews: by design, every tile drew the file-type icon because the UI reads no files. This affected paste, drop and the file picker alike. The original draws `previewURL` for image files of at most 10 MiB (`shouldEagerlyPreviewLocalImage`). **Fix.** - `LocalFiles` gains `preview(file, max_bytes, cover)`. It has a default body, so it stays within the sanctioned I/O boundary. - `apps/fluxer`'s `Desktop` reads the file on disk (no further than the limit) or the kept pasted image on a thread of its own. It decodes it with the new `fluxer_platform::images::thumbnail`, which scales it down so it still covers the box. - The shell asks for each new image file in any draft once (`composer::attachments::Previews`, in `media::State`). - The tile draws the picture over its media box, cropped to fill like `object-fit: cover`. This works in the channel's, the thread panel's and the forum composer's trays. - File types follow `isEmbeddableImageFile` (by MIME type or extension). Files over 10 MiB, non-images and files that don't decode keep their icon. **Verified.** - `tests/upload_previews.rs`: which files are asked for (pasted, dropped, picked; PNG/JPEG/GIF/WebP; size limit; panel thread) and a pixel check that the tile draws the picture in the channel and panel composers. - `app::tests::the_shell_asks_for_the_previews_of_tray_images`. - Desktop: `previews_of_pasted_dropped_and_picked_images` (PNG/JPEG/WebP/GIF from disk, pasted, over the limit, not an image, text). - Platform: `thumbnails_cover_the_box_in_every_format`. - New golden `upload_tray_thumbnail`, rendered on lavapipe in `fluxer-native-shots:u2204`. Not covered: videos keep their icon (the original draws a frame of them), and animations show their first frame. Gate: `FLUXER_SCREENSHOT_TESTS=1 cargo xtask ci` reports "all steps passed". The full screenshot suite also passes on lavapipe (241 passed). 🤖 Generated with [Claude Code](https://claude.com/claude-code)
The search suggestions, pins and inbox popouts were placed from the
window's right edge, counting only the header's tools. With a thread or a
forum post in the side panel the channel header ends at the panel, so the
popouts opened over the panel. Their offsets now start at the panel's
left edge while it is open.

Closes #779

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The tray never showed a preview: the UI reads no files, so every tile drew
the file-type icon, a pasted clipboard image included. The original draws
the file's previewURL for images of at most 10 MiB.

LocalFiles gets preview(file, max_bytes, cover), which apps/fluxer's
Desktop answers on a thread of its own from the file on disk or the pasted
image it keeps, decoded and scaled with the new
fluxer_platform::images::thumbnail. The shell asks for each new image file
of any draft once (composer::attachments::Previews, in media::State) and
the tray tile draws the picture over its media box, cropped to fill it,
in the channel's, the thread panel's and the forum composer's trays.

Closes #782

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Author
Owner

Merged into textchat by hand (the merge API returns 405); the commits are in the branch.

Merged into `textchat` by hand (the merge API returns 405); the commits are in the branch.
charles closed this pull request 2026-11-17 20:43:16 +00:00

Pull request closed

Sign in to join this conversation.
No description provided.