Skip to content

fix(graph-ui): fix Windows folder navigation in the index picker#739

Open
rarepops wants to merge 5 commits into
DeusData:mainfrom
rarepops:fix/windows-folder-picker
Open

fix(graph-ui): fix Windows folder navigation in the index picker#739
rarepops wants to merge 5 commits into
DeusData:mainfrom
rarepops:fix/windows-folder-picker

Conversation

@rarepops

@rarepops rarepops commented Jul 1, 2026

Copy link
Copy Markdown

Summary

Fixes several issues with the repository folder picker (the New Index modal) on Windows. All changes are frontend-only (graph-ui) and Windows-scoped, so POSIX (Linux/macOS) navigation is left byte-for-byte unchanged, guarded by an isWinPath check.

On Windows the picker was effectively unusable: clicking breadcrumb segments errored with "not a directory", switching drives didn't update the listing, and the / quick-jump button led to an empty view.

Screenshot 2026-07-01 160803

Changes

  • Breadcrumb navigation. On a Windows drive path (C:/Users/x) the breadcrumb built click targets as "/" + segments (/C:/Users), which the backend rejects as "not a directory". It now builds drive-aware targets (C:/, C:/Users) and drops the meaningless leading / crumb on Windows.
  • Typed-path refresh. Typing a path (e.g. D:/) updated the input and breadcrumb but never re-fetched the directory listing, so switching drives by typing showed the previous drive's folders. Added a debounced, silent /api/browse refresh (plus Enter-to-navigate), scoped to Windows drive paths. This matters because older backends don't enumerate drives, making typing the only way to switch drives.
  • Drive quick-jump. On Windows the POSIX / quick-jump root is meaningless (browsing it returns an empty listing). It now offers drive roots instead, always including the current drive (derived from the browsed path), so it works even when the backend returns roots: ["/"].
  • Remove misleading "Project name" field. The optional input was labelled "Optional display name", but its value became the project's permanent identity (the <name>.db filename, the projects.name primary key, and the project. prefix on every node's qualified_name), not a cosmetic label. Since a project can't be renamed after indexing, the field was misleading. It has been removed; project names now always derive from the selected folder path.

Testing

  • graph-ui unit tests: 12/12 passing, including new regression tests for Windows breadcrumb navigation, typed-drive refresh, / to drive-root replacement, and a POSIX-negative test asserting a typed POSIX path does not trigger a re-browse.
  • Manually verified in the running UI on Windows: breadcrumb clicks, typing D:/, and the drive-root quick-jump all list the correct folders.

Notes

  • Backend (src/ui/http_server.c) is unchanged; these fixes work against existing/older builds that return roots: ["/"].
rarepops added 3 commits July 1, 2026 16:07
The index file picker built breadcrumb targets as '/' + segments, so on a Windows drive path (C:/Users/rap) clicking a crumb browsed to '/C:/...', which the backend rejected as 'not a directory'. Only the '.. (up)' button worked.

Build drive-aware crumb targets (C:/, C:/Users) and drop the bogus unified '/' root crumb on Windows drive paths; POSIX behavior is unchanged. Add a regression test for Windows breadcrumb navigation and cleanup() for test isolation.

Signed-off-by: Zadak <rarepops@protonmail.com>
Typing a path into the Repository path field updated currentPath (and thus the breadcrumb) but never re-fetched the directory listing, so switching drives by typing (e.g. 'D:/') left the previous location's folders showing. This is the only way to change drives when the backend does not enumerate drive roots.

Debounce a silent /api/browse refresh when the typed path changes (keeping the last good listing instead of flashing errors mid-typing), and navigate immediately on Enter. Add a regression test.

Signed-off-by: Zadak <rarepops@protonmail.com>
The optional 'Project name' input was labelled 'Optional display name', but its value became the project's permanent identity (the <name>.db filename, projects.name primary key, and the project. prefix on every node's qualified_name) - not a cosmetic label. Since a project cannot be renamed after indexing and the name is always derivable from the folder path, the field was misleading.

Remove the input, its state, and its submit payload; project names now always derive from the selected folder path. Drop the now-dead i18n strings and update the test.

Signed-off-by: Zadak <rarepops@protonmail.com>
@rarepops rarepops requested a review from DeusData as a code owner July 1, 2026 14:09
rarepops added 2 commits July 1, 2026 16:15
…stead

On Windows the POSIX '/' quick-jump root is meaningless (browsing it returns an empty listing), yet the picker showed a '/' button whenever the backend did not enumerate drives (older builds return roots=['/']). Clicking it stranded the user on an empty view.

Derive Windows-aware quick-jump roots: drop non-drive roots and always include the current drive (parsed from the browsed path), so the button lists the drive root. Other drives remain reachable by typing. Add a regression test.

Signed-off-by: Zadak <rarepops@protonmail.com>
The debounced folder-list refresh (and Enter-to-navigate) on the Repository path field now only fires for Windows drive paths (e.g. 'D:/'), where typing is the mechanism for switching drives. POSIX path navigation is left exactly as before.

Add a regression test asserting a typed POSIX path does not trigger a re-browse.

Signed-off-by: Zadak <rarepops@protonmail.com>
@rarepops rarepops force-pushed the fix/windows-folder-picker branch from 89795df to 00ce349 Compare July 1, 2026 14:15
@DeusData DeusData added bug Something isn't working ux/behavior Display bugs, docs, adoption UX windows Windows-specific issues priority/high Needs near-term maintainer attention; high-impact bug, regression, safety issue, or release blocker. labels Jul 1, 2026
@DeusData

DeusData commented Jul 1, 2026

Copy link
Copy Markdown
Owner

Thanks for the Windows picker fix. Triage: this is a Windows graph UI indexing bug, priority high, because drive/root navigation can block indexing from the UI.

For review, we will focus on drive-root breadcrumb targets, typed-path refresh, / behavior on Windows, preserving POSIX behavior, and the regression tests around the index picker/i18n changes. This is in the maintainer review queue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working priority/high Needs near-term maintainer attention; high-impact bug, regression, safety issue, or release blocker. ux/behavior Display bugs, docs, adoption UX windows Windows-specific issues

2 participants