feat: grid keybindings, double-click-to-focus, and app-focus accent overlay#334
Closed
roba-adnew wants to merge 10 commits into
Closed
feat: grid keybindings, double-click-to-focus, and app-focus accent overlay#334roba-adnew wants to merge 10 commits into
roba-adnew wants to merge 10 commits into
Conversation
On quit, capture each pane's agent (Claude Code/Codex/Gemini) session id; on relaunch, reopen each session in place. Two parts make it reliable: - Live capture: a SessionStart hook reports the agent's session id over the notify socket (new agent_session notification + runtime dispatch), so ids are recorded as soon as a session starts instead of only scraped at quit. - Robust resume: the resume command is injected as ARCHITECT_RESUME_CMD and run once by the wrapper rc after the user's shell rc loads -- never typed into the PTY, so it cannot race startup or be eaten by a shell prompt. Also: a normal quit no longer wipes a captured id (teardown only overwrites on a successful scrape), and the focused/zoomed pane is persisted and restored.
…verlay - Shift+Arrow moves the grid selection (Cmd+Arrow still works). - Double-click a grid pane focuses it; a single click does nothing (Cmd+Return still focuses the selection). Typing — including Enter — goes to the selected grid pane as before. - Cmd+Esc returns a focused pane to the grid. The Escape-hold-to-collapse gesture is removed so single/double Esc pass straight through to the program (Claude Code's Esc-Esc rewind, vim's Esc). - Double-click a focused pane returns to grid (only when the program is not capturing the mouse). Accent / focus indicator: - When the window is NOT the frontmost app, an accent fill washes only the focused/selected pane ([ui] inactive_overlay_alpha, 0 disables) so you can still tell which pane is active. When the window is focused, that pane shows only its accent-coloured border — no fill. Other panes are unchanged. Fonts: - [font] size (focused) + [font] grid_scale (grid text multiplier). - Cmd+Shift+= / Cmd+- adjusts the focused size; Cmd+Opt+= / Cmd+Opt+- adjusts the grid scale (0.5-3.0). Both are persisted to persistence.toml and restored on the next launch. - [ui] inactive_overlay_alpha. Help overlay and config template updated; tests added for the new config fields, the Shift+Arrow / grid-font chords, and grid_font_scale persistence.
19ee315 to
4e4bd70
Compare
Extends the existing Cmd+click link opener (scheme URLs, OSC-8 hyperlinks) to bare filesystem paths printed in terminal output, e.g. the "src/foo.zig" paths Claude Code emits. - New path_matcher.zig: detects a path-like token under the cursor (absolute, ~-relative, or relative), stripping a :line[:col] suffix and trailing dots, and rejecting plain words. - Relative paths resolve against the pane's working directory; the path must exist on disk (the existence check keeps arbitrary text from matching). - Opens via the existing macOS `open` pipeline. Because it hooks the shared link matcher, Cmd+hover also underlines the path and shows the pointer cursor, exactly like URLs. Tests: path_matcher token detection + resolveExistingPath filesystem resolution.
When a file path is Cmd+clicked in terminal output, open it in VS Code (`open -a "Visual Studio Code"`) instead of the default app — except .html/.htm files, which open with the default handler (the browser). Web URLs and file:// links keep going to the default handler. Refactors os/open.zig to a variable-length argv so it can pass the `-a <app>` form, and adds openTarget() used by the link click handler.
Cmd +/- is now context-aware: in grid view it changes the grid font size, in focus view it changes the focus font size. The two no longer bleed into each other (focus zoom compensates the grid scale so the grid holds steady), and both are persisted to persistence.toml and restored on relaunch. Replaces the separate Cmd+Opt grid shortcut (and gridFontSizeShortcut) with this single, more intuitive zoom-what-you-see control.
…d nav Single-click in grid view now moves the focus/selection highlight to the clicked pane without spawning a shell or zooming to full screen (double-click still expands to full screen). Routed via a new SelectGridSession UiAction so clicks never trigger FocusSession's spawn/zoom. Remove the Shift+Arrow grid-select chord; Cmd+Arrow remains the grid navigation control. Shift+Arrow now passes through to the focused terminal as a normal keystroke. Updates the help overlay, generated-config keybinding help, and README accordingly.
…kground - Single-click in grid view now focuses a pane instantly with no animation; the moved accent border is the feedback. The nav-wave stays on keyboard navigation only, matching the standard pointer-vs-keyboard focus convention (:focus-visible) and keeping clicks snappy. - Remove the translucent background veil that dimmed grid-view panes. - Default terminal background is now #262624 to match the Cacha dark theme.
Rebuild from the current worktree and quit/relaunch the installed app in one step, so source edits never leave a stale binary running. Defaults to a ReleaseFast build (--debug opt-in), sets up the native Homebrew SDL3 + macOS 15.4 SDK workaround so it builds without Nix, and waits for a clean shutdown before relaunching. Exposed as 'just reload' and a Claude Code skill.
…lling The reload force-killed Architect after 30s. With busy/looping agents, that interrupted its quit teardown before each Claude could flush its session to disk, so the next 'claude --resume' reloaded a rewound transcript (lost completed turns). Now wait for Architect to exit on its own (re-sending the quit periodically for a saturated app), and only force-kill as an absolute last resort after ~5 minutes.
…ending quit Replace the poll loop + periodic quit re-send with a single graceful quit followed by 'caffeinate -w <pid>', which blocks on the process-exit event (no busy-poll, no re-sending). A backgrounded watchdog force-kills only if the teardown truly hangs (~5 min). The re-send was an unnecessary defensive hack; the earlier missed-teardown was the old 30s force-kill, not a dropped quit.
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
A few grid-interaction refinements plus a window-focus visual cue.
Keybindings / mouse
Accent / app-focus indicator
Config
[font] grid_scale— grid-pane text size multiplier (alongside the existing[font] size).[ui] inactive_overlay_alpha— strength of the unfocused-pane accent fill (0disables).Behaviour changes to be aware of
Testing
zig build,zig build test,zig build lint(zwanzig — clean), andzig fmt --checkall pass.