Skip to content

fix(web): improve fullscreen image preview toolbar layout - #1665

Open
techotaku39 wants to merge 3 commits into
tiann:mainfrom
techotaku39:fix/web-fullscreen-preview-toolbar-align
Open

fix(web): improve fullscreen image preview toolbar layout#1665
techotaku39 wants to merge 3 commits into
tiann:mainfrom
techotaku39:fix/web-fullscreen-preview-toolbar-align

Conversation

@techotaku39

Copy link
Copy Markdown
Contributor

Problem / Motivation

The fullscreen image preview toolbar used inconsistent text glyph controls and did not expose the image's original dimensions or file size. Desktop and mobile layouts also require different metadata placement.

Summary

  • Rework the fullscreen image preview toolbar with a left-aligned close button and right-aligned controls.
  • Replace text glyph controls with consistently sized SVG icons and normalize button dimensions.
  • Display the image's natural dimensions and file size in the preview metadata.
  • Keep metadata in the desktop toolbar row while placing it in a dedicated bottom row on mobile.
  • Propagate file size metadata from message attachments, composer attachments, generated images, and the file page.
  • Add regression coverage for toolbar order, icon sizing, metadata, navigation, and responsive layout.

Validation

  • bun typecheck — passed.
  • bun run test:e2e -- terminal-wrap-fidelity.spec.ts — passed, 2/2 tests.
  • bun run test:web -- src/components/ImagePreview.test.tsx src/components/AssistantChat/AttachmentItem.test.tsx src/components/AssistantChat/messages/ToolMessage.test.ts src/components/AssistantChat/messages/ToolMessage.generatedMedia.test.tsx — passed, 4 files and 19 tests.
  • bun run build — passed.
  • Task Live Playwright validation — passed at 1280×800 and 390×844, confirming desktop toolbar metadata and mobile bottom metadata placement.
  • git diff --check — passed.

Related Issues

None

Risk / Rollback

UI-only change with optional file metadata propagation. No API, database, dependency, or migration changes are included. Rollback can be performed by reverting this change.

AI Disclosure

Implemented and validated with OpenAI Codex (GPT-5.6).

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Findings

  • None.

Summary
Review mode: initial

No issues found in the latest full diff. Residual testing risk: the responsive assertions at web/src/components/ImagePreview.test.tsx:48 verify Tailwind utility classes in jsdom, not computed desktop/mobile layout; the main GitHub test check was still in progress at review time.

Testing

  • Not run (automation); PR code was not executed. GitHub integration passed; test remained in progress.

HAPI Bot

…eview-toolbar-align

# Conflicts:
#	web/src/components/AssistantChat/AttachmentItem.tsx
#	web/src/components/ImagePreview.tsx

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Findings

  • None.

Summary
Review mode: follow-up after new commits

No issues found in the latest full diff. Residual testing gaps: web/src/components/ImagePreview.test.tsx:48 verifies responsive behavior through Tailwind utility classes rather than computed desktop/mobile layout, and the four caller paths that supply file size metadata are not all covered by propagation assertions. The GitHub test check was still in progress at review time.

Testing

  • Not run (automation); PR code was not executed. GitHub integration passed; test remained in progress.

HAPI Bot

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