Skip to content

feat(app): add native file image actions - #4063

Closed
dwyanewang wants to merge 2 commits into
getpaseo:mainfrom
dwyanewang:feat/file-image-actions
Closed

dwyanewang wants to merge 2 commits into
getpaseo:mainfrom
dwyanewang:feat/file-image-actions

Conversation

@dwyanewang

@dwyanewang dwyanewang commented Aug 30, 2026

Copy link
Copy Markdown
Contributor

Linked issue

Follow-up to #4032.

Type of change

  • Bug fix
  • New feature
  • Enhancement
  • Refactor
  • Docs

Reasoning

Image files can now be previewed and zoomed in place, but on mobile the preview does not expose the image actions users need to move the result into another workflow. A user currently has to leave the preview and find another route to copy, save, or share the image.

File previews are child tabs of the session that opened them. The compact header also needs a direct close action so a user can leave the preview and return to that parent session without opening the tab switcher.

This change adds the native image actions and the compact file-preview close path without replacing the shared zoom viewport.

Goals

  • Open image actions by long-pressing a native file preview
  • Copy the image to the clipboard
  • Save the image to the photo library with add-only permission
  • Share the cached image through the platform share sheet
  • Show pending, success, permission-denied, and failure feedback
  • Show a compact close button for the active file tab
  • Return to the parent session when the file preview closes
  • Preserve the upstream preview and zoom behavior

Non-goals

  • Reimplement image preview, pan, or zoom
  • Add image actions to browser or Electron previews
  • Change attachment preview lifecycle, retries, or garbage collection
  • Change navigation for agent, terminal, browser, or other non-file tabs
  • Change the file explorer download flow

QA

Automated checks:

$ npx vitest run packages/app/src/file-pane/image-preview-save.test.ts --bail=1

 Test Files  1 passed (1)
      Tests  3 passed (3)
   Duration  474ms
$ npx vitest run packages/app/src/i18n/resources.test.ts --bail=1

 Test Files  1 passed (1)
      Tests  36 passed (36)
   Duration  5.36s
$ npm run test --workspace=@getpaseo/app -- src/stores/workspace-layout-store.test.ts -t "closing a focused child tab returns to its parent before using tab-strip order" --bail=1

 Test Files  1 passed (1)
      Tests  1 passed | 122 skipped (123)
   Duration  23.28s
$ env -u PASEO_PASSWORD npm run test:e2e --workspace=@getpaseo/app -- e2e/browser/file-editing.spec.ts --grep "closes a compact file preview back to its parent session"

  ✓  1 [browser] › e2e/browser/file-editing.spec.ts › closes a compact file preview back to its parent session (19.2s)

  1 passed (1.7m)

PASEO_PASSWORD is removed for this command because the isolated E2E daemon inherits the parent environment; leaving a local daemon password set enables authentication that the seed client does not use.

The pre-commit hook ran the repository checks against the committed change:

summary: (done in 45.37 seconds)
✓ format (0.91 seconds)
✓ lint (1.20 seconds)
✓ typecheck (45.33 seconds)

Platform coverage:

Platform Tested Notes
iOS No No iOS environment is available on this Linux host
Android Yes Android visual and interaction QA confirms the layout, zoom controls, Copy/Save/Share actions, compact close button, and return to the parent session
Web Yes Compact browser E2E opens an image file, shows the close action, closes it, and returns to the parent session
Desktop macOS No Native actions are not included
Desktop Windows No Native actions are not included
Desktop Linux No Native actions are not included

Android visual and interaction QA is complete for the current PR commit. iOS remains untested because no iOS environment is available on this Linux host; this gap is reported for review.

Checklist

  • One focused change
  • npm run typecheck passes
  • npm run lint passes
  • npm run format passes
  • QA evidence
  • Tests added or updated where it made sense

@dwyanewang

dwyanewang commented Aug 30, 2026

Copy link
Copy Markdown
Contributor Author

Android visual and interaction QA for commit 956b2e3c1: compact image preview in dark mode with zoom controls, the native long-press Copy/Save/Share menu, and the compact close action.

Android compact image preview with native actions

Manual Android QA confirmed that Copy, Save, and Share complete successfully, and that closing the compact preview returns to the parent session.

@dwyanewang
dwyanewang marked this pull request as ready for review August 30, 2026 08:57
@boudra

boudra commented Sep 8, 2026

Copy link
Copy Markdown
Collaborator

Closing this feature PR. Please discuss the workflow and shared need in Discussions, following CONTRIBUTING.md.

@boudra boudra closed this Sep 8, 2026
@dwyanewang

Copy link
Copy Markdown
Contributor Author

Understood, thanks. Opened the workflow discussion for the image actions: #4534.

Leaving this closed. If the discussion gains interest I'll reopen a narrower PR covering only the image actions — the compact close action is a separate concern and shouldn't have been bundled here.

dwyanewang added a commit to dwyanewang/paseo that referenced this pull request Sep 12, 2026
Refresh every overlay's reviewed coordinates to this round's main snapshot
fa93c42 (was d7c7044)
and add the new personal overlay feat/todo-plugin-hybrid.

Semantic review of d7c7044..fa93c42 (9 upstream commits) against every
overlay head: none of the features were absorbed upstream, so all entries stay.

- feat/file-image-actions (956b2e3): PR getpaseo#4063 never merged; image-preview*
  files and expo-media-library still absent from main. Only i18n paths overlap.
- feat/forge-plugin-infrastructure (a900da8 -> 7e3d1c7): rebased onto the
  new main. range-diff maps all 8 commits; the two conflict resolutions in
  plugin-process.ts and run-git-command.ts are semantic unions (upstream's
  releaseApi dispose and executeGitCommand<Output>/runGitCommandBytes refactor
  kept alongside the branch's forge cleanup and git URL redaction). One new
  test-only commit fixes a stale spawn-args assertion.
- feat/todo-plugin-hybrid (faedbc1): new personal overlay, single commit on
  fa93c42. PluginSettingsDocument and plugins/agent-launch/** have no
  counterpart in main. Restructured at the source so it merges cleanly with
  rw-base and the forge overlay.
- fix/android-keyboard-covers-input (8541863): PR getpaseo#2467 open; main still uses
  keyboardBehavior="extend" and has no android_keyboardInputMode.
- fix/electron-explorer-tab-menu (99cb41d): PR getpaseo#3890 open; main exposes the
  configuration only through a right-click ContextMenu, not the toolbar trigger.
- fix/skill-cache-invalidation-scoped (317f359): PR getpaseo#4463 open; headOid and
  worktreeRevision still absent from the checkout-status schemas.
- refactor/provider-history-read (e1d2876): PR getpaseo#4473 open; readSessionHistory
  has zero hits in main, which still resumes archived sessions via purpose.
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.

2 participants