Skip to content

feat: path input improvements, Ctrl+D delete, scrollback fix, copyClaudeDir#48

Open
google-q-dot wants to merge 1 commit into
Frayo44:mainfrom
google-q-dot:feat/path-input-improvements
Open

feat: path input improvements, Ctrl+D delete, scrollback fix, copyClaudeDir#48
google-q-dot wants to merge 1 commit into
Frayo44:mainfrom
google-q-dot:feat/path-input-improvements

Conversation

@google-q-dot
Copy link
Copy Markdown

Summary

Three sets of improvements to the new session dialog and session management, cherry-picked from open PRs #26 and #42, plus new path input features:

Path Input Improvements (new)

  • Ctrl+V paste support — Async clipboard reader (src/core/clipboard.ts) for terminals without bracketed paste (WSL/Windows Terminal); also added usePaste hook to InputAutocomplete to ensure suggestions update after bracketed paste
  • Filesystem-aware path autocompleteresolvePathCompletion() in src/core/filesystem.ts shows matching subdirectories as you type a path, merged with history suggestions via pathSuggestions createMemo
  • Ctrl+B directory browser — New DialogDirectoryBrowser component to navigate filesystem and find git repos; git repos marked with ★; once selected, worktree checkbox auto-appears via existing reactive isGitRepo() effect

From PR #42: Ctrl+D delete session + scrollback fix

  • Ctrl+D in tmux — Signal file pattern (/tmp/agent-view-delete-session) to delete current session from within attached tmux; status bar hint added
  • Scrollback fix — All \x1b[2J\x1b[H\x1b[2J\x1b[3J\x1b[H across tmux.ts, ssh.ts, updater.ts (9 occurrences) to clear scrollback buffer and prevent session switching artifacts
  • refresh-client after switchswitch-client -n/-p now followed by refresh-client to force redraw

From PR #26: copyClaudeDir + footer hints

  • copyClaudeDir — New copyClaudeDir() in src/core/git.ts copies .claude directory to new worktrees; controlled by copyClaudeDir config field (off by default)
  • Settings dialog — New "Copy .claude to worktree" toggle (Yes/No) in settings (c keybind)
  • Dynamic footer — When path/branch field is focused, footer shows "↓↑ browse | Tab/→ select | Ctrl+B dir | Enter create"

Test plan

  • Open new session dialog, focus path field → Ctrl+V should paste clipboard content
  • Type a path prefix (e.g. /home/) → autocomplete shows subdirectories
  • Press Ctrl+B → directory browser opens; navigate to a git repo → worktree checkbox appears
  • Attach a session, press Ctrl+D → detach and show delete confirmation
  • Switch between sessions (Ctrl+]/) → no scrollback artifacts from previous session
  • Settings: toggle "Copy .claude to worktree" to Yes → create worktree session → verify .claude copied
  • Settings: toggle back to No → verify .claude not copied
  • Footer hint: verify dynamic text changes when focusing path/branch fields
  • bun run build + bun test pass (145 tests, 0 fail)

🤖 Generated with Claude Code

…udeDir

- Add Ctrl+V paste support via clipboard utility (src/core/clipboard.ts)
- Add filesystem-aware path autocomplete showing subdirectories
  (src/core/filesystem.ts, InputAutocomplete usePaste hook)
- Add Ctrl+B directory browser for navigating to git repos
  (src/tui/component/dialog-directory-browser.tsx)
- Add Ctrl+D delete session from within tmux (signal file pattern)
- Fix scrollback buffer not being cleared on session switch (\x1b[3J)
- Add copyClaudeDir utility to copy .claude config to new worktrees
- Add "Copy .claude to worktree" setting in settings dialog
- Add dynamic footer hints for path/branch autocomplete fields

Co-Authored-By: Claude Opus 4.7 <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