Skip to content

[codex] Fix lazygit shortcut in nested terminals - #532

Merged
tw93 merged 1 commit into
tw93:mainfrom
shlroland:codex/herdr-lazygit-cwd
Aug 15, 2026
Merged

tw93 merged 1 commit into
tw93:mainfrom
shlroland:codex/herdr-lazygit-cwd

Conversation

@shlroland

@shlroland shlroland commented Aug 13, 2026

Copy link
Copy Markdown
Contributor

Summary

Fixes #531.

Cmd+Shift+G could show Lazygit: Not a git repository even when the current interactive Fish shell had already entered a valid Git repository with zi or cd. The problem is not specific to Herdr or tmux: Kaku's cached/OSC 7 pane cwd can lag behind the shell's real $PWD, so the old Git preflight checked the wrong directory and blocked dispatch.

The shortcut still belongs to Kaku, but it now checks only that lazygit is installed and sends Ctrl+U + lazygit + Enter to the current terminal input stream. The receiving shell or multiplexer resolves the command using its actual focused-pane $PWD. If that directory is not a Git repository, lazygit reports the native error itself.

Changes

  • Remove the outer-pane cwd and Git preflight from launch_lazygit.
  • Preserve the missing-lazygit and dispatch-failure feedback.
  • Preserve clear-line-before-send behavior.
  • Add a regression guard preventing reintroduction of the outer cwd Git rejection.

Validation

  • cargo test -p config
  • make fmt-check
  • make app
  • luajit -e "assert(loadfile('assets/macos/Kaku.app/Contents/Resources/kaku.lua'))"

Manual verification

  1. Start Kaku in a non-Git directory.
  2. In a normal Fish pane, use zi to enter a Git repository.
  3. Confirm pwd and git status show the repository.
  4. Press Cmd+Shift+G.
  5. Lazygit should open in the repository selected by Fish, without relying on Kaku's cached pane cwd.

The same flow also covers Herdr and tmux nested panes.

@vercel

vercel Bot commented Aug 13, 2026

Copy link
Copy Markdown

@shlroland is attempting to deploy a commit to the Faberon Team on Vercel.

A member of the Team first needs to authorize it.

@shlroland
shlroland marked this pull request as ready for review August 13, 2026 09:33
@tw93
tw93 merged commit c7d2c60 into tw93:main Aug 15, 2026
7 of 8 checks passed
@tw93

tw93 commented Aug 15, 2026

Copy link
Copy Markdown
Owner

@shlroland Merged as c7d2c604 and included in the latest Nightly. The active shell now owns the nested cwd decision, so Cmd+Shift+G no longer rejects lazygit based on the outer pane path. Exact-main Checks and Build Validation are green. Thanks for the focused fix.

Nightly: https://github.com/tw93/Kaku/releases/download/nightly/Kaku-nightly.dmg

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.

[BUG] Cmd+Shift+G rejects lazygit in nested terminal working directories

2 participants