v0.51.13 — Single-PR composer UX (#1758)#1759
Merged
nesquena-hermes merged 3 commits intomasterfrom May 6, 2026
Merged
Conversation
…om them When pasting screenshots into the composer (especially multiple in sequence, now possible end-to-end with hermes-webui/hermes-swift-mac PR #74) the user has no way to verify the right image attached. The 56x56 thumbnail in the chip is fine as a UI affordance but offers no detail at all. Quote from the request: When I hit Cmd+C and save an image to the clipboard and then paste the clipboard out, I want to be able to click on any one of those uploaded images that's inside the composer bar and have it zoom up like a lightbox so I can see the image in full once it's been pasted in to the composer input. The lightbox infrastructure already exists for message-attached images (static/ui.js:269 _openImgLightbox + the doc-level click delegate at :298 for .msg-media-img). This PR extends the same delegate to also fire on .attach-thumb composer chips: - Clicking the thumbnail opens the existing image lightbox with the blob URL as src and the file name as alt text. - Audio/video chips are excluded (they have their own native <audio> / <video> controls and don't render an .attach-thumb img). - SVG thumbnails (.attach-thumb attach-thumb--svg) qualify — they are images visually. - The chip's x remove button is a sibling, not an ancestor, of the thumb — closest('.attach-thumb') from the button returns null, so removing still works without lightbox interference. Also updates static/style.css: - cursor: zoom-in on .attach-thumb (was cursor: default — actively misleading). - Subtle :hover emphasis (brightness 1.05 + scale 1.04, 120ms ease) so users discover the affordance before clicking. 5 regression tests in tests/test_composer_chip_lightbox.py pinning: - delegate handles .attach-thumb on IMG elements - delegate still handles .msg-media-img (no regression) - audio/video chips do NOT render an .attach-thumb img - cursor:zoom-in declared on the .attach-thumb selector - hover emphasis rule present Browser-verified live on port 8789: - addFiles three distinct screenshot files (mimicking three Mac sequential pastes) -> 3 chips, 3 thumbs, all distinct. - Click thumb #2 -> lightbox opens with the right image, alt text matches filename. - Click x on chip #2 -> removes that chip, no lightbox. - Escape key closes lightbox. Companion PR on the Mac side: hermes-webui/hermes-swift-mac#74 (unique filename per paste so sequential pastes actually appear as distinct chips). Refs #1733.
…mbnails to lightbox-zoom them by @nesquena-hermes
Constituent PR: - #1758 (@nesquena-hermes) — feat(composer): click pasted/attached image thumbnails to lightbox-zoom them. Refs #1733. Companion Mac PR hermes-webui/hermes-swift-mac#74 for sequential-paste filename uniqueness. Independent review: @nesquena APPROVED with exhaustive headless-Chrome behavioural harness verifying all 4 click paths (thumb-image, ×-on-image, ×-on-audio, audio-element). Pre-fix verification confirmed 4/5 of the new tests catch regressions to the previous state. Opus advisor: SHIP, all 6 verification questions clean. One non-blocking nit absorbed in-release: wrap .attach-thumb:hover in @media (hover: hover) for iPad sticky-hover hygiene (3-LOC defensive cleanup). Tests: 4637 → 4642 collected (+5). 4630 passed, 9 skipped, 3 xpassed, 0 failed. Pre-release verification: - pytest 4630 passed, 0 failed - node -c clean on static/ui.js - 11/11 browser API endpoints PASS - Pre-stamp re-fetch: PR head still matches local rebase - Opus advisor: SHIP, 0 MUST-FIX Refs #1733.
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.
v0.51.13 — Single-PR composer UX (#1758)
Constituent PR
hermes-webui/hermes-swift-mac#74for sequential-paste filename uniqueness. Already independently APPROVED by @nesquena with exhaustive headless-Chrome behavioural harness verifying all 4 click paths.Tests
4637 → 4642 collected (+5 regression tests). 4630 passed, 0 failed.
Pre-release verification
:hoverin@media (hover: hover)for iPad sticky-hover hygiene, 3-LOC defensive cleanup).Refs