Skip to content

feat(chat): add full-screen image attachment actions - #4

Merged
hardy4yooz merged 2 commits into
hardy4yooz:mainfrom
Realcryptoplato:codex/image-attachment-viewer
Oct 9, 2026
Merged

hardy4yooz merged 2 commits into
hardy4yooz:mainfrom
Realcryptoplato:codex/image-attachment-viewer

Conversation

@Realcryptoplato

@Realcryptoplato Realcryptoplato commented Aug 9, 2026 •

Copy link
Copy Markdown
Contributor

Closes #3

What changed

  • makes inline chat images keyboard- and pointer-selectable
  • adds a full-screen image viewer with save, Web Share, canonical-link copy, and close controls
  • exposes Delete message only through the existing owner/moderator permission and confirmation flow
  • keeps authenticated Relay object URLs limited to rendering and file actions while copying/sharing the canonical media URL
  • adds English and Simplified Chinese labels and an end-to-end interaction test

Why

The web client only rendered a small inline preview, so agent-generated PNGs could not be inspected or handled with the native client image actions.

Security and protocol notes

This change reuses the existing authenticated media fetch and message-deletion paths. It does not alter Relay events, signing, identity storage, or upload behavior. Protected object URLs remain ephemeral and are not exposed as copied/shared links.

Screenshots

Captured from compiled demo mode with synthetic identities and relay.example.com; no private Relay or account data is present.

Desktop (1280x720)

Buzz Web image viewer on desktop using demo data

Mobile (390x844)

Buzz Web image viewer on mobile using demo data

Validation

  • npm run typecheck
  • npm test (76 tests)
  • npm run check
  • npm run build:e2e
  • npx playwright test tests/e2e/smoke.spec.ts --grep "message images expand"
  • full hosted CI (web and agent-control)
  • visual checks at 1280x720 desktop, 768x1024 tablet, and 390x844 phone sizes with no viewport overflow

Signed-off-by: Greg Lindberg <greglindberg@gmail.com>
@hardy4yooz

Copy link
Copy Markdown
Owner

Thank you for the thoughtful implementation and for keeping the Relay/media security boundary intact. I tested this branch in a temporary merge with the current main branch: typecheck, 76 unit tests, static checks, production build, and all 34 end-to-end tests passed.

We are keeping this PR unmerged for now because two user-facing cases still need work:

  • The full-screen dialog does not contain or restore keyboard focus. In Chromium, pressing Tab from the Close button moves focus outside the dialog; Escape can then stop closing it, and closing the viewer does not return focus to the image thumbnail. This conflicts with the accessible viewer goal in Add full-screen actions for chat image attachments #3.
  • Save image fetches the displayed URL as a File. An external image may render correctly in an img element but still reject a cross-origin fetch, which makes the save action fail.

Please add focus containment (or make the background inert), restore focus to the trigger, cover Tab/Escape behavior in Playwright, and either provide a safe fallback for non-CORS images or explicitly limit the action to downloadable Relay media. The branch is also behind main, so please update it before the next CI run.

The overall direction is good, and I will be glad to re-review once these cases are addressed. Thank you again.

@hardy4yooz
hardy4yooz marked this pull request as ready for review October 9, 2026 03:46
@hardy4yooz
hardy4yooz merged commit 9718473 into hardy4yooz:main Oct 9, 2026
4 checks passed
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.

Add full-screen actions for chat image attachments

3 participants