Skip to content

feat: add edit multi-repo paths dialog (p key)#450

Open
oryaacov wants to merge 1 commit intoasheshgoplani:mainfrom
oryaacov:feat/edit-multirepo-paths
Open

feat: add edit multi-repo paths dialog (p key)#450
oryaacov wants to merge 1 commit intoasheshgoplani:mainfrom
oryaacov:feat/edit-multirepo-paths

Conversation

@oryaacov
Copy link
Copy Markdown

@oryaacov oryaacov commented Mar 28, 2026

Summary

  • Multi-repo sessions currently have no way to add/remove repos after creation — you must delete and recreate
  • This adds a new p hotkey that opens an edit dialog for multi-repo sessions, allowing path changes in-place with automatic session restart

Changes

New file: internal/ui/editpaths_dialog.go (578 lines)

  • EditPathsDialog modal for editing paths of an existing multi-repo session
  • Path list with add (a), remove (d), edit (Enter), navigate (j/k)
  • Tab completion via GetDirectoryCompletions (same as new session dialog)
  • Floating suggestions dropdown with overlay rendering and ^N/^P cycling
  • Validation: min 2 paths, no duplicates, all paths must exist
  • ANSI-aware overlay helpers (overlayDropdown, truncateVisible, sliceVisibleFrom) for z-index style dropdown rendering

internal/ui/home.go

  • p hotkey opens the dialog when a multi-repo session is focused
  • handleEditPathsDialogKey dispatches Enter/Esc to the dialog
  • applyMultiRepoPathChanges rebuilds the symlink directory and restarts the session
  • p: Paths hint added to bottom status bar, stopped/error Actions sections, and preview pane Multi-Repo section

internal/ui/hotkeys.go: Registered edit_paths action bound to p (customizable)

internal/ui/help.go: Added "Edit multi-repo paths" to help overlay

How it works

  1. User presses p on a multi-repo session
  2. Dialog shows current paths (resolved from symlinks back to real paths)
  3. User adds/removes/edits paths, confirms with Enter
  4. applyMultiRepoPathChanges: clears all symlinks in the session's temp dir, creates new symlinks for updated paths, updates ProjectPath/AdditionalPaths, saves to SQLite, calls Restart() (which does respawn-pane with updated --add-dir flags for Claude)

Test plan

  • All existing UI tests pass (47+ tests)
  • Clean build on main
  • Manual: create multi-repo session with 2 repos, press p, add a 3rd repo, confirm → session restarts with 3 repos
  • Manual: edit paths dialog shows path suggestions dropdown
  • Manual: remove a repo (must keep ≥2), confirm → session restarts with updated repos
  • Manual: verify p key is only active on multi-repo sessions (no-op on single-repo)
  • Manual: verify bottom bar shows "Paths" hint only for multi-repo sessions

🤖 Generated with Claude Code

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>
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