This repository was archived by the owner on Feb 6, 2026. It is now read-only.
fix: Require explicit project creation and canonicalize repo paths#126
Merged
fix: Require explicit project creation and canonicalize repo paths#126
Conversation
Canonicalize repository paths before storing/querying to ensure case-insensitive filesystem paths like /Users/foo/Code/repo and /Users/foo/code/repo are treated as the same project. Also normalize subpaths by trimming whitespace and slashes. This prevents duplicate project entries when the same repository is accessed with different path capitalizations on macOS (which uses case-insensitive HFS+ by default). Changes: - Add canonicalize_repo_path() to resolve symlinks and normalize paths - Add clean_subpath() to trim whitespace and normalize subpath formatting - Update create_git_project, get_or_create_git_project, get_git_project_by_repo, and update_git_project to use these helpers Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
…ect flow Projects are no longer created automatically when: - Opening the app with a CLI path or current directory - Creating a new tab via folder picker - Creating branches without an existing project The only way to create a project is now through the "Add Project" button. This prevents ghost projects from appearing for dev directories, stale tab paths, or unintended automatic project creation. Changes: - Remove getOrCreateGitProject() from frontend and backend - Update App.svelte to check for existing projects instead of creating them - Update NewBranchModal to require projectId (no longer optional) - Update BranchHome empty state to show "Add Project" instead of "New Branch" - Make Cmd+N shortcut only work when projects exist Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Summary
Removes implicit project auto-creation behavior, requiring users to explicitly add projects via the "Add Project" flow. Also fixes duplicate project entries caused by path variations (symlinks, case differences) by canonicalizing repository paths.
Changes
Explicit project management: Removes
getOrCreateGitProjectAPI and associated implicit creation logic. Opening a repo now only creates a tab if a project already exists—users must use "Add Project" first. This makes project creation intentional rather than accidental.Path canonicalization: Resolves symlinks and normalizes paths before storing or looking up projects, preventing the same repository from appearing as multiple projects when accessed via different path representations (e.g.,
/varvs/private/varon macOS).Subpath normalization: Cleans subpath inputs by trimming whitespace and removing leading/trailing slashes, ensuring consistent storage and comparison.
Improved list ordering: Changes branches and projects to sort by most recently updated (DESC) instead of oldest first, surfacing active items at the top.
Empty state UX update: When no projects exist, the welcome screen now prompts "Add a project" with ⌘P shortcut instead of "New Branch" with ⌘N, guiding users through the correct onboarding flow.