feat(ui): upgrade workspace image preview with anchored pan/zoom, rotation, file actions, metadata, and fullscreen - #461
Draft
Is14w wants to merge 1 commit into
Conversation
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.
Linked issue
Nan
Summary
The current workspace image preview provides only basic zoom and clockwise rotation controls. It does not provide the interaction model users normally expect from a desktop image viewer, especially when inspecting large images or images whose dimensions exceed the available preview area.
This PR turns the workspace image preview into a complete image viewing experience with predictable navigation, mouse interaction, keyboard shortcuts, file actions, and image information.
The implementation remains focused on the workspace image preview and does not change the behavior of text, Markdown, spreadsheet, document, audio, video, or PDF previews.
Change scope
Modules:
agent-uiagent-guiagent-gateway/websrc-tauriif required for native save and clipboard supportMain UI:
crates/agent-ui/src/components/workspace-editor/WorkspaceFilePreviewOverlay.tsxHost integration:
crates/agent-gui/src/agent-ui-adapters/workspacePreview.tsxcrates/agent-gateway/web/src/agent-ui-adapters/workspacePreview.tsxcrates/agent-gui/src-tauri/src/commands/app/system.rsif requiredUser-visible changes
Image navigation and viewing
Pan and drag interaction
Zoom behavior
Rotation
Reset view
Full-screen viewing
Download and save
Clipboard actions
Copy image path
Image information
Context menu
Keyboard interaction
+/=: zoom in;-: zoom out;0: reset view;R: rotate clockwise;Shift+RorL: rotate counter-clockwise;F: enter or leave full-screen;Escape: close the context menu or leave full-screen;ArrowLeft/ArrowRight: navigate between images when focus is inside the image viewer.Host behavior
agent-ui.Screenshots / preview
Required before marking this PR ready for review.
Please attach a short recording or screenshots demonstrating:
Suggested runtime preview:
Verification
Checks to run: