Skip to content

fix(projects): resolve directory names regardless of case - #343

Merged
nixuuu merged 1 commit into
devfrom
fix/directory-picker-case
Nov 7, 2026
Merged

nixuuu merged 1 commit into
devfrom
fix/directory-picker-case

Conversation

@nixuuu

@nixuuu nixuuu commented Nov 7, 2026 •

Copy link
Copy Markdown
Member

Typing ~/git/ on a worker with only ~/GIT now opens ~/GIT/ and updates the path field before Add directory submits it. The worker resolves every path segment, prioritizes exact names, and accepts a case-insensitive match only when it is unique. With both Git and GIT, the picker names the candidates and asks for exact spelling. Missing paths stop loading with an actionable error and leave Add directory disabled.

Directory listings retain the existing worker validation and owner-scoped gateway routing. Add project and workspace create/update store the resolved path. Linked-computer coverage verifies that resolution and project creation happen on the destination worker. The picker associates responses with their requested path, so canonical paths and symlink targets can render without persistent skeletons.

Fixes: #155

Verification

  • Passed: bun install, bun run gen:check, bun run typecheck, bun run lint, bun run format:check, and bun run --filter @canopy/web build.
  • Full bun run check:tmp: 1748 passed, 161 skipped, 0 failed across 310 files; temporary directory clean.
  • Real gRPC regression coverage: exact matches, one case-insensitive match, multiple wrong-case segments, ambiguous siblings, missing directories, files, linked computers, and persisted workspace paths.
  • T3 browser verification against an isolated gateway, real worker, PostgreSQL, and scratch home: ~/git/ → ~/GIT/, nested correction, Add directory saves the real path, exact Git/GIT choices, ambiguous and missing paths disable adding, and relative paths show guidance. Light/dark at 1280×800 and 390×844; short, typical, and long names render cleanly. Ambiguity messages with 128-character names wrap without horizontal overflow on a phone. Preview tabs and owned stack/container cleaned up.
  • Runtime verification used Linux. Windows separators and filesystem-native path equivalences are retained; macOS and Windows were not run locally.

Copy audit — docs/copy.md §8

Before → after Reason
Raw missing-path error → “No such directory. Check the path or choose a directory.” States the problem and recovery without internal codes.
Raw filesystem exception → “Could not open this directory. Check the path and its permissions.” Gives an actionable fallback for inaccessible paths.
Raw non-directory error → “This path is not a directory. Choose a directory.” Identifies the incorrect target and next action.
No ambiguity guidance → Several directories match “git”: “GIT”, “Git”. Type an exact name. Names the candidates without choosing one.
Skeletons for relative input → “Enter a directory path”, alongside the existing “Start the path with ~/ or /.” hint Gives the idle state a title without repeating the recovery hint.

All changed text uses sentence case, plain English, short sentences, and the existing directory/worker glossary. Existing action labels keep their verbs. Errors end with recovery instructions; there are no new terms, jokes, repeated visible facts, or icon/colour-only meanings. Error status is announced accessibly. Desktop/phone and long-name checks passed.

@nixuuu
nixuuu force-pushed the fix/directory-picker-case branch from 4f7cd26 to face265 Compare November 7, 2026 15:58
Resolve every directory segment on the worker, keep exact-name precedence, and reject ambiguous matches with the candidate names. Track requested and resolved paths separately in the picker and persist canonical workspace paths.

Fixes: #155
@nixuuu
nixuuu force-pushed the fix/directory-picker-case branch from face265 to f129397 Compare November 7, 2026 16:01
@nixuuu
nixuuu marked this pull request as ready for review November 7, 2026 16:04
@nixuuu
nixuuu merged commit f6e52ed into dev Nov 7, 2026
12 checks passed
@nixuuu
nixuuu deleted the fix/directory-picker-case branch November 7, 2026 16:09
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