Repository navigation
feat: choose a path in an exact Open or Save panel - #57
Merged
Merged
Conversation
This was referenced Oct 17, 2026
iamnbutler
force-pushed
the
feat/dialog-path
branch
from
October 17, 2026 04:10
ac8179f to
d49585f
Compare
This was referenced Oct 17, 2026
Merged
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.
Adds
pathtodesktop_dialog_answer, so an agent can choose a folder or file in an Open or Save panel. Before this, a save panel's file name field could be typed into, but a panel couldn't be pointed at a folder. #38 left this unsupported because Peekaboo'sdialogHandleFileonly finds the panel by fuzzy app name.Behavior
desktop_dialog_answer { target, path }takes an absolute path and leaves the default button unpressed:Pressing Save or Open is still a separate
buttonanswer, so the agent can list the dialog and check it first.This is foreground input, which the lead approved where background delivery can't work. The tool description and docs say so:
Outcome:
completedonly when the panel reads back the folder and, for a Save panel, the name.unknown, withDESKTOP_ACTION_UNVERIFIEDand a hint to list the dialog before pressing its default button. This covers a file chosen in an Open panel, since there is no selection readback, and a panel that exposes no folder.details:directory_readback,filename_readback,path_navigation_methodandpanel.Native
New patch
peekaboo-dialog-path.patch(last in the stack) adds the exact Bridge operationexactFileDialogPath(FileDialogPathRequest { target: DialogTargetSelector, path, focus }).How the host resolves the panel:
How it enters the path:
PathTextField, set it through Accessibility and press Return.saveAsNameTextField.Paths resolve symlinks before input, so
/tmpcompares as/private/tmp.Result:
confirmedChangewhen the readback matches, otherwisedispatchedUnverified. The descriptor is service-owned:responseResolveddialog result.Wiring: request and response, descriptor, permission partition, semantic policy, result contract, signed dialog-result receipt validation, server handler and client. The handler casts to a new
FileDialogPathProvidingprotocol, asmenuCommanddoes, so upstream test doubles don't change.Client:
dialog.swiftrequires the operation in the handshake and checks the dialog is a file panel on a fresh read.allowedOperationsgains.exactFileDialogPath.Tests
npm run checknode dist/app.js … --identity "Developer ID Application: Nathan Butler (8S43JJMN6B)").DialogFileDialogPathTests(folder, file in a symlinked folder, missing folder, request validation and decode revalidation), plusDialogExactInputContractTestsandDialogForegroundOutcomeTests. 37 tests passed.peekaboo-dialog-path.patchis last. Following fix: update upstream operation inventory tests in each patch that adds an operation #60's scheme, the patch sets the wire count to 127 (main is 126) and adds.exactFileDialogPathto theaccessibilityAndPostEventpartition and the mutating-operation list. All 95 PeekabooTests Bridge suites, run narrowly in the foreground in three batches: everything passes except the known failures. PeekabooBridgeWindowEnumerationTimeoutTests and PeekabooBridgeSetValueFailureTests fail under batch load and pass alone. "minimized identity may dispatch when WindowServer omits its entry" is Bridge test 'minimized identity may dispatch when WindowServer omits its entry' fails on main #50 and fails on main too; it depends on the host. AutomationKitDialogFileDialogPathTestsandDialogServicesuites: 10 tests pass.npm run checkpasses.pathanswer reaches the native client and passes the handshake check, then is refused because the session is locked.pathtogether withbutton, is refused in TypeScript.Pending: screen locked
The GUI session is locked (
IOConsoleLocked), so no panel could be opened or answered. Exact checks to run with the dev app (open -n --env DESKTOP_TOOLS_STATE=/tmp/<x> "Desktop Tools.app") and TextEdit:desktop_dialogon the window: expectis_file_dialog: true.desktop_dialog_answerwithpath: "/tmp/dt-path-test/Report.rtf", aftermkdir /tmp/dt-path-test.completed, the panel expanded to/private/tmp/dt-path-test, and the name fieldReport.rtf.button: "Save"and check the file exists.path: "/Users/<you>/Desktop". Expectcompleted, the folder changed, and the name unchanged.pathnaming an existing file.unknownwithDESKTOP_ACTION_UNVERIFIEDand the file selected in the panel.button: "Open"opens it.path: "/tmp/does-not-exist/x.rtf"is refused with no input sent.path.unknownorrefused.PathTextFieldis missing (if any), check thatpath_navigation_methodisgo_to_folderand the outcome isunknownrather thancompleted.