Skip to content

Open archives in independent windows and copy between them - #311

Merged
skyswordw merged 5 commits into
mainfrom
codex/multiple-archive-windows
Nov 6, 2026
Merged

skyswordw merged 5 commits into
mainfrom
codex/multiple-archive-windows

Conversation

@skyswordw

@skyswordw skyswordw commented Nov 6, 2026 •

Copy link
Copy Markdown
Member

Opening another archive now keeps the existing archive in its own window. Finder/Open-panel multi-selection opens every file, and reopening the same canonical source focuses its existing session. Each Browser/Glance session owns its passwords, source access, loading, edits, Undo and operations; commands follow the key archive window and close/quit check the correct sessions. Tray and recent history remain shared.

Cross-window drag copies the selection into the target folder as one undoable pending edit. It preserves the source, including its unsaved edits, and writes the target only on Save. Existing Keep Both naming, read-only refusal, audited extraction, helper policy and quarantine propagation apply. Source identity/revision and destination ownership are checked across asynchronous work; cancellation/close cleans staging, while accepted staging survives Undo/Redo until Save/discard/reload/teardown.

The native drag boundary is explicit: SwiftUI normalizes file promises and can strip their extra item-provider representations. The receiver synchronously consumes the capability bound to the active AppKit dragging session and its pasteboard change count, rather than relying only on NSItemProvider's private UTI. The UTI is exported in project.yml/generated Info.plist. Regression coverage verifies normalized providers, one-time consumption and invalidation for a later external gesture.

Validation:

  • Final local suite: 711 tests in 105 suites, zero failures/skips; 1,276/1,276 zh-Hans strings; clean generated plists. Final head 8418e01 passed build-test (711 tests, zero failures/skips), Universal 2, package and snapshots; merged as 432d994.
  • Native CUA window checks: independent selection/Delete/Undo, dirty Close/Cancel, Browser/Glance transfer and both archives listed in Window.
  • Native cross-window pipeline: drag beta.txt from Source.zip into Target.zip → one pending edit and visible file → Command-Z removes it → Redo restores it → Save → close/reopen retains it. An independent ZIP read confirms exact copied bytes and preserved original fixture contents.
  • CUA required an explicit destination click after its drag call to deliver the native release event. This is recorded as an automation limitation, not claimed as a fresh human physical-input pass. The user's earlier complete physical gestures exposed the normalized-provider failure, now covered by the native fix and regression test. Temporary diagnostics were removed.

Resolves the implementation in #308. Wider physical view-mode/multi-display and signed-integration matrices remain under #38; no VoiceOver pass is claimed. Codex owns functional correctness and testing; Claude Code owns the reused visual/motion treatment. #309/#310 are merged into this branch. Installed apps and registered extensions were not replaced. See Handoff/multiple-archive-windows.md for the current contract and bounded evidence.

@skyswordw

Copy link
Copy Markdown
Member Author

Native acceptance update: the user attempted the prepared cross-window drag/Undo sequence on the final isolated Stow Test build and reported that it could not be dropped or another abnormal behavior occurred. The exact step is being clarified. Merge is paused while this real-input report is investigated; the 709 passing tests do not establish native drag acceptance. A subsequent read-only AX snapshot showed two pending edits in Target.zip, so no specific diagnosis is inferred yet.

@skyswordw
skyswordw marked this pull request as draft November 6, 2026 13:03
@skyswordw

Copy link
Copy Markdown
Member Author

Follow-up to the user's concrete report (dragging onto the destination produces no response): the private drag UTI was missing from the app's exported type declarations. A system lookup returned nil. Commit 73ddc51 adds the declaration in project.yml/generated Info.plist and uses the explicit UTType at the SwiftUI drop boundary. The regression test now checks both the built app's declaration and UTI resolution, in addition to the native pasteboard payload. All 11 focused window/transfer tests passed.

The isolated Stow Test bundle has been rebuilt and the disposable Source.zip/Target.zip windows reopened for a second physical drag/Undo check. The user has been asked to drop into the files column, not Details. Keep this PR in draft until the native outcome is established; this fixes a verified omission but is not yet a claim that the reported gesture now passes.

@skyswordw
skyswordw marked this pull request as ready for review November 6, 2026 15:29
@skyswordw

Copy link
Copy Markdown
Member Author

The native silent-drop defect is now reproduced and corrected, without asking the user for another verification pass.

Event-only diagnostics established that the destination received the drop but SwiftUI supplied a normalized file-URL provider without the extra private drag representation (providers=1, local=0). The native receiver now consumes the source delegate's active gesture capability synchronously, bound to its AppKit pasteboard/change count. An ended/cancelled gesture expires unused capabilities, and stale/foreign private providers are refused. Temporary diagnostics were removed.

Native CUA verification completed: Source.zip beta.txt → Target.zip file area → one visible file and one staged edit → Command-Z removes it → Redo restores it → Save → close/reopen retains it. Source still contains the original. Independent ZIP reads verify copied bytes (beta\n), source Folder/alpha.txt and target Destination/keep.txt. Copied SHA-256: f2c82decdd7181cf98945929a62598db7e6b477e11f6e0eb0ae97020eff151ad. The CUA wrapper required a destination click to deliver release after starting the native drag; this is explicitly an automation limitation, not a claim that the user repeated the gesture successfully.

The full integrated local suite passed 711 tests / 105 suites with zero failures/skips and all 1,276 zh-Hans strings translated. The final gesture-expiry cleanup passed all 15 relevant drag/transfer tests. Final CI is running on 8418e01. #309 and #310 were functionally reviewed, merged and integrated into this branch. Full hardware/view-mode/multi-display/signed-integration coverage remains under #38; VoiceOver remains deferred under #93. No registered extension was replaced.

@skyswordw
skyswordw merged commit 432d994 into main Nov 6, 2026
4 checks passed
@skyswordw

Copy link
Copy Markdown
Member Author

Human acceptance completed — 2026-11-06 (Pacific/Honolulu).

The user personally performed the final Stow Test sequence with the fresh Verify Source.zip / Verify Target.zip fixtures and reported that every step passed: drag beta.txt into the destination files area, observe one pending edit, Command-Z removes it, Shift-Command-Z restores it, Save, close/reopen the target, and confirm the source still contains the original.

Independent post-test disk verification confirms:

  • The complete source ZIP SHA-256 is unchanged from the pre-test baseline.
  • The destination beta.txt is byte-identical to the source (beta final\n).
  • The original destination entry Destination/keep.txt is unchanged.
  • The destination contains exactly Destination/keep.txt and beta.txt, and its ZIP integrity check passes.

This adds a successful human physical drag/Undo/Redo/Save/reopen pass to the earlier automated and CUA evidence for #311/#308. It does not claim the entire broader hardware/view-mode/signed-integration matrix in #38 or a VoiceOver pass. No further fix is needed for this reported sequence.

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