Skip to content

fix: keep the stock directoryPicker seam active in the desktop composition - #112

Open
nekomona wants to merge 1 commit into
dataelement:mainfrom
nekomona:feat/electron-directory-picker-seam
Open

fix: keep the stock directoryPicker seam active in the desktop composition#112
nekomona wants to merge 1 commit into
dataelement:mainfrom
nekomona:feat/electron-directory-picker-seam

Conversation

@nekomona

Copy link
Copy Markdown

Closes #111 · Branch feat/electron-directory-picker-seam · Follow-up to #55

What & why

#55 disabled the stock directory-picker (auto) row on the belief that the Koffi dialog worker can fail inside packaged Electron, inserting a standalone client surface instead. That removed ctx.directoryPicker from the host, so every host-side consumer broke: host.pickDirectorydirectory-picker-unavailable, and plugins reading the seam threw (observed with dsh-remote 0.5.10: cannot get property "directoryPicker" without inject).

The premise does not hold. Verified on a packaged Windows v0.3.0 build from inside the Harness child: pickNativeDirectory() spawns the worker, a real selection resolves the path, and an abort cleanly closes the dialog.

Change

build/dsh-desktop.patch.yml: drop the disable row and the client-surface insert. The stock auto row from dsh-web-app mounts the native backend — ctx.directoryPicker, host.pickDirectory, and the entire seam work for every plugin, unmodified, on dsh's original pick channel.

The preload bridge and the client-ui patch are untouched: the client surface keeps the parented Electron dialog.

3 files, +10/−14. No new transport, no new wire surface, no env flags, no dependency-patch changes, no main-process changes. (The rc.8 dependency-patch set is untouched — the fix carries over unchanged across the rc.7 → rc.8 upgrade.)

Verification

  • Rebased onto current main (rc.8): npm test168 passing; npm run typecheck, npm run build — clean
  • Live proof on an installed v0.3.0 build, from inside the Harness child: a real pickNativeDirectory() call resolved the selected path; abort produced a clean rejection
  • End-to-end with an unmodified third-party plugin: reverted the installed dsh-remote to stock 0.5.10 — with this composition change its local-pick flow works through the stock seam with zero changes to dsh-remote
  • Note for maintainers: my verification is Windows-only; the disable comment cited Windows specifically, but a macOS re-check before release would confirm the same

…ition

DSH Desktop disabled the stock directory-picker row (the Koffi-based worker
can exit before reporting a result inside packaged Electron) and inserted a
standalone client surface. That removed ctx.directoryPicker from the host,
so every host-side consumer failed: host.pickDirectory returned
directory-picker-unavailable, and community plugins reading the seam broke
(observed with dsh-remote 0.5.10: its local-pick endpoint surfaced
"cannot get property \"directoryPicker\" without inject").

The premise does not hold: verified on a packaged Windows v0.3.0 build, the
native dialog worker spawns, reports, and services aborts correctly from
inside the Harness child (a real pick through pickNativeDirectory() resolved
the selected path). Keep the composition stock instead of re-implementing the
seam:

- build/dsh-desktop.patch.yml: drop the disable row and the client-surface
  insert. The stock auto row from dsh-web-app mounts the native backend and
  its client surface, so host.pickDirectory, plugins reading the seam, and
  the stock flow all work unmodified.
- The Electron-dialog preload bridge and the client-ui patch stay unchanged:
  the client surface keeps using the parented Electron dialog.

Verified: full suite 153 passing, typecheck and build clean, and the native
pick channel confirmed live on an installed v0.3.0 build.
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.

Host-side directoryPicker seam unavailable in DSH Desktop

1 participant