Skip to content

v0.51.13 — Single-PR composer UX (#1758)#1759

Merged
nesquena-hermes merged 3 commits intomasterfrom
stage-307
May 6, 2026
Merged

v0.51.13 — Single-PR composer UX (#1758)#1759
nesquena-hermes merged 3 commits intomasterfrom
stage-307

Conversation

@nesquena-hermes
Copy link
Copy Markdown
Collaborator

v0.51.13 — Single-PR composer UX (#1758)

Constituent PR

Tests

4637 → 4642 collected (+5 regression tests). 4630 passed, 0 failed.

Pre-release verification

  • @nesquena APPROVED with headless-Chrome harness verifying thumb-image, ×-on-image, ×-on-audio, audio-element click paths.
  • Pre-fix verification confirmed 4/5 new tests catch regressions to the previous state.
  • All JS files syntax-clean.
  • Browser API sanity (11/11 endpoints) — all pass.
  • Opus advisor: SHIP, 0 MUST-FIX, 1 minor nit absorbed in-release (wrap :hover in @media (hover: hover) for iPad sticky-hover hygiene, 3-LOC defensive cleanup).

Refs

nesquena-hermes and others added 3 commits May 6, 2026 19:54
…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.
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.
@nesquena-hermes nesquena-hermes merged commit 704f8ab into master May 6, 2026
3 checks passed
@nesquena-hermes nesquena-hermes deleted the stage-307 branch May 6, 2026 20:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant