96 Commits

Author SHA1 Message Date
felixm 29c0fc92d0 Merge branch 'tui-nav-archiving'
TUI h/l column navigation and recoverable session archiving.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-11 12:37:31 -04:00
felixm d9b7c001ef docs: document tmux.conf bindings and new nav/archive keys in README
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-11 12:31:52 -04:00
felixm 638d27bd21 feat: u restores archived sessions; x/u gated by current view 2026-06-11 12:29:24 -04:00
felixm 167695708b feat: A toggles the sessions column between active and archived
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-11 12:22:41 -04:00
felixm 6724d5e128 feat: archive session action bound to x
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-11 12:18:11 -04:00
felixm 8ee73ab8e3 feat: SessionList.set_mode swaps header for archived view
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-11 12:15:58 -04:00
felixm dfc7ffeaaf feat: h/l focus navigation between project and session columns
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-11 12:12:16 -04:00
felixm 2a56d6584b feat: add archive_session and unarchive_session to SessionService
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-11 12:08:23 -04:00
felixm c8380be72d feat: parameterize list_sessions with archived filter
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-11 12:05:19 -04:00
felixm 138e4e04bc docs: finalize TUI nav + archiving spec and implementation plan
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-11 12:02:45 -04:00
felixm 32f7e0ded7 docs: design spec for TUI h/l nav and session archiving
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-11 11:22:14 -04:00
felixm fc95bf9830 feat: stop and rename a session from its tmux window
Add "stop" and "rename" to the Alt+p tool palette so a session can be
managed from inside its own harness window, mirroring the TUI's s/r keys:

- stop kills the harness window (stop_session_for_window).
- rename prompts for a nickname, pre-filled with the current one. The
  name is read from /dev/tty via readline (the fzf pipe leaves our stdin
  spent) and never passes through tmux's command parser, so there's
  nothing to quote-escape.

Extract require_session_id_for_window as the shared resolve-or-raise
guard behind the tool/stop/rename branches, dropping the duplicated
"not an hqt session window" check.

Also removes the now-shipped feature plans and specs under docs/.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-11 11:07:33 -04:00
felixm ff357156d0 Merge branch 'new-session-dialog-ux'
New Session dialog UX refinements: reveal sandbox sub-options only when
sandboxing is on, unify focus highlight to the Peach accent, and add soft
j/k field navigation.
2026-06-11 10:50:47 -04:00
felixm 98a894f752 test: harden sandbox policy mapping across switch states
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-11 10:49:03 -04:00
felixm 78ea959788 feat: soft j/k field navigation in New Session dialog
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-11 10:43:00 -04:00
felixm d72f04dd89 style: unify New Session dialog focus highlight to accent
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-11 10:38:09 -04:00
felixm bafc664251 feat: reveal sandbox sub-options only when sandboxing is on
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-11 10:36:57 -04:00
felixm 783bfee79f docs: implementation plan for New Session dialog UX refinements
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-11 10:29:35 -04:00
felixm dbaf8ab1de docs: spec for New Session dialog UX refinements
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-11 10:26:37 -04:00
felixm 5b4e800883 feat: add reset-windows entry to the tool palette
Hook the existing tmux window-index reset into the Alt+p tool palette,
special-cased like clone: selecting 'reset-windows' compacts the hqt
session's window indexes (keeping the home window at 0) via
TmuxManager.reset_window_indexes.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-11 10:14:04 -04:00
felixm f5c97d1fe0 Merge branch 'tool-windows'
Add tool windows: tool registry, styled aux tmux windows
(TmuxRunner.new_aux_window / TmuxManager.open_aux_window),
SessionService tool-window + clone-for-window methods, and
hqt tool / hqt palette CLI subcommands (fzf tool launcher).

# Conflicts:
#	src/hqt/cli.py
#	src/hqt/tmux/manager.py
#	tests/test_cli.py
#	tests/test_sessions.py
2026-06-11 09:43:37 -04:00
felixm 75a0dc70bc test: verify delayed prompt injection
Fix pre-existing ty error in action_new_session by typing the sandbox
element as SandboxPolicy | None instead of object.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-11 09:08:54 -04:00
felixm 2e58b191fa feat: wire delayed prompt TUI actions
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-11 09:06:36 -04:00
felixm dfea5a5630 feat: show scheduled prompts in session rows
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-11 09:04:26 -04:00
felixm 7ebc3bf560 fix: preserve resume setup for scheduled dispatch 2026-06-11 08:50:54 -04:00
felixm 7109be8cbf test: cover schedule prompt modal validation 2026-06-11 08:48:35 -04:00
felixm ac7d57bfeb feat: add delayed prompt modal 2026-06-11 08:41:39 -04:00
felixm f10264f695 feat: dispatch due scheduled prompts 2026-06-11 08:40:16 -04:00
felixm 6c7e4e4682 Merge branch 'sandboxed-sessions' 2026-06-11 08:35:14 -04:00
felixm 488d76e88d Disable allow-rename on tool windows (match new_window)
nvim/lazygit emit OSC title sequences; without allow-rename off a tool
could overwrite the window name and scramble the styled @hqt_label.
Mirrors the window-option setup in new_window. Surfaced by final
integration review.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-11 08:28:07 -04:00
felixm 88a52d0e6d fix: handle scheduled prompts on session deletion 2026-06-11 08:26:33 -04:00
felixm 4169e7fc28 feat: schedule prompts in session service 2026-06-11 08:18:44 -04:00
felixm 8ebb07e578 Hoist shlex to module-level import in cli
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-11 08:18:06 -04:00
felixm 5f29418186 fix: make sandboxed sessions usable for real git workflows
Address three integration gaps found in review:

- Bind ~/.gitconfig read-only in the sandbox base layer so `git commit`
  finds user.name/email inside the jail (spec §3).
- Bind a worktree session's repo common .git dir writable: the worktree's
  real gitdir lives at <repo>/.git/worktrees/<branch>, outside the bound
  cwd, so git was broken in sandboxed worktree sessions.
- doctor now gates on sandbox.is_available() (the single source of truth
  shared with the New Session dialog) rather than a raw shutil.which, so
  it agrees with the service on non-Linux platforms (spec §6).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-11 08:16:48 -04:00
felixm e35828d819 Add hqt palette CLI subcommand (fzf tool launcher)
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-11 08:13:31 -04:00
felixm 60612065ff feat: persist scheduled prompts 2026-06-10 22:55:18 -04:00
felixm c574117c71 feat: report tmux prompt injection failures 2026-06-10 22:54:48 -04:00
felixm a5f2f69faa docs: plan delayed prompt injection 2026-06-10 22:46:55 -04:00
felixm 90db743922 docs: design delayed prompt injection 2026-06-10 22:39:44 -04:00
felixm 09505f0758 fix: keep tmux focus during window index reset 2026-06-10 22:18:13 -04:00
felixm ee4bb4cbfa feat: expose tmux window index reset 2026-06-10 22:02:09 -04:00
felixm bebdf8c1ee feat: reset tmux window indexes 2026-06-10 21:56:21 -04:00
felixm 666df40aca test: cover tmux window index reset 2026-06-10 21:51:16 -04:00
felixm a798c2bcf4 Seed harness rows in CLI service wiring (mirror on_mount)
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-10 21:40:00 -04:00
felixm 9b515f6b44 docs: design tmux window index reset 2026-06-10 21:39:31 -04:00
felixm 7d851dcb7e feat: doctor reports bubblewrap availability
Adds a non-fatal bubblewrap check to the doctor command that reports whether
the bwrap binary is available. This is necessary for sandboxed sessions and
the check is displayed alongside other system requirement checks.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-10 21:37:30 -04:00
felixm 8a304ba19e Add hqt tool CLI subcommand (tool + clone dispatch)
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-10 21:35:57 -04:00
felixm 43fdfd61f1 Mirror create_session signature in clone test stub
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-10 21:33:37 -04:00
felixm f6ed53ce23 feat: sandbox toggles in New Session dialog, gated on bwrap availability
Adds sandbox_available param to NewSessionScreen, renders Switch/Select/
Switch widgets for sandbox on/off, filesystem access (rw/ro), and network
toggle. When bwrap is unavailable the switch is disabled and a warning label
is shown. The _policy_from staticmethod maps widget values to SandboxPolicy.
The result tuple gains SandboxPolicy | None as its fifth element. app.py
passes sandbox_available=sandbox.is_available() when opening the dialog and
unpacks the new element to forward sandbox= to create_session.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-10 21:33:34 -04:00
felixm 5265c8d4b0 Add SessionService.clone_session_for_window
Opens a fresh harness session with the same project, harness, and model
as the source window, creating a new sibling hqt-<id> conversation.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-10 21:31:42 -04:00