Skip to content

feat(add-project): native folder picker (Finder) in the desktop app - #261

Merged
vakovalskii merged 1 commit into
mainfrom
feat/add-project-folder-picker
Jul 21, 2026
Merged

feat(add-project): native folder picker (Finder) in the desktop app#261
vakovalskii merged 1 commit into
mainfrom
feat/add-project-folder-picker

Conversation

@vakovalskii

Copy link
Copy Markdown
Owner

The "Add project → Local path" field only had a text input + a <datalist> of known folders. The native datalist popup overflows the modal and can't be scrolled/styled, and there was no way to browse for a folder. Reported: "выбор проекта не скроллится, я бы Finder открывал".

  • Desktop: a preload bridge (window.codbashDesktop.pickFolder) + an ipcMain codbash:pick-folder handler that opens the native openDirectory dialog and returns the chosen absolute path. Preload wired into the BrowserWindow (contextIsolation stays on, nodeIntegration off) — the renderer only sees that one method.
  • Frontend: a Browse… button next to the path input, shown only when the desktop bridge is present (hidden in the plain browser, which keeps the datalist). Picking a folder fills the input with its absolute path.

Browser verified: button hidden, 78 datalist suggestions still populate, no bridge, 0 console errors. Takes effect in the installed app after a desktop rebuild.

🤖 Generated with Claude Code

The "Add project → Local path" field only had a text input + a datalist of
known folders; the native datalist popup overflows and can't be scrolled/
styled, and there was no way to browse for a folder.

- Desktop: add a preload bridge (window.codbashDesktop.pickFolder) + an
  ipcMain 'codbash:pick-folder' handler that opens the native openDirectory
  dialog and returns the chosen absolute path. Wire preload into the
  BrowserWindow (contextIsolation stays on, nodeIntegration off).
- Frontend: a "Browse…" button next to the path input, shown only when the
  desktop bridge is present (hidden in the plain browser, which keeps the
  datalist). Picking a folder fills the input with its absolute path.

Browser keeps the datalist autocomplete unchanged (verified: button hidden,
78 suggestions, no bridge, 0 console errors). Takes effect in the installed
app after a desktop rebuild.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@vakovalskii
vakovalskii merged commit 32db642 into main Jul 21, 2026
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