feat: add edit multi-repo paths dialog (p key)#450
Open
oryaacov wants to merge 3 commits intoasheshgoplani:mainfrom
Open
feat: add edit multi-repo paths dialog (p key)#450oryaacov wants to merge 3 commits intoasheshgoplani:mainfrom
oryaacov wants to merge 3 commits intoasheshgoplani:mainfrom
Conversation
asheshgoplani
requested changes
Apr 6, 2026
Owner
asheshgoplani
left a comment
There was a problem hiding this comment.
Thanks for the multi-repo paths dialog, @oryaacov! A few issues:
- Duplicate overlay code with #449 — PR #449 (which introduced the shared overlay pattern) is now merged. This PR still has its own copy of the overlay code. Please rebase onto main and use the shared overlay infrastructure from #449.
- Race condition in
applyMultiRepoPathChanges— this function mutates instance fields (ProjectPaths, etc.) without holding the instance mutex. Since the background status worker also reads these fields, this is a data race under-race. Wrap mutations ininst.mu.Lock()/Unlock(). - No tests for
EditPathsDialog— the new dialog needs test coverage for: adding paths, removing paths, reordering, and the apply/cancel flows.
Allow adding/removing repos from an existing multi-repo session without recreating it. Press `p` on a multi-repo session to open the editor. On confirm, the symlink directory is rebuilt and the session is restarted with updated --add-dir flags. Includes floating path suggestions dropdown with overlay rendering, tab completion, and validation (min 2 paths, no duplicates, paths must exist). UI hints added to: bottom status bar, preview pane Actions sections, preview pane Multi-Repo section, and help overlay. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1. Remove duplicate overlay/menu helpers from editpaths_dialog.go — now uses the shared infrastructure from newdialog.go (merged via asheshgoplani#449). 2. Wrap instance field mutations (ProjectPath, AdditionalPaths, WorkDir) in instancesMu write lock to avoid races with the background status worker. 3. Add 12 tests for EditPathsDialog covering: Show, HasChanged, add/ remove paths, min-path enforcement, navigate, edit+save, edit+cancel, validation, GetSessionID, and Hide state reset. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
b3ed8dd to
9db71f1
Compare
Contributor
Author
|
@asheshgoplani , my pleasure, thank you for creating this amazing project! |
Paths longer than the dialog's inner width pushed content past the right border, breaking the frame. Now paths are truncated with a leading "…" and the session title is capped to fit within the dialog width. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
a763fbd to
4b24109
Compare
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 join this conversation on GitHub.
Already have an account?
Sign in to comment
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
photkey that opens an edit dialog for multi-repo sessions, allowing path changes in-place with automatic session restartChanges
New file:
internal/ui/editpaths_dialog.go(578 lines)EditPathsDialogmodal for editing paths of an existing multi-repo sessiona), remove (d), edit (Enter), navigate (j/k)GetDirectoryCompletions(same as new session dialog)^N/^PcyclingoverlayDropdown,truncateVisible,sliceVisibleFrom) for z-index style dropdown renderinginternal/ui/home.gophotkey opens the dialog when a multi-repo session is focusedhandleEditPathsDialogKeydispatches Enter/Esc to the dialogapplyMultiRepoPathChangesrebuilds the symlink directory and restarts the sessionp: Pathshint added to bottom status bar, stopped/error Actions sections, and preview pane Multi-Repo sectioninternal/ui/hotkeys.go: Registerededit_pathsaction bound top(customizable)internal/ui/help.go: Added "Edit multi-repo paths" to help overlayHow it works
pon a multi-repo sessionapplyMultiRepoPathChanges: clears all symlinks in the session's temp dir, creates new symlinks for updated paths, updatesProjectPath/AdditionalPaths, saves to SQLite, callsRestart()(which doesrespawn-panewith updated--add-dirflags for Claude)Test plan
p, add a 3rd repo, confirm → session restarts with 3 repospkey is only active on multi-repo sessions (no-op on single-repo)🤖 Generated with Claude Code