Skip to content

Conversation

@forketyfork
Copy link
Owner

@forketyfork forketyfork commented Jan 17, 2026

Summary

  • Extended Cmd+N (spawn new terminal) to work in grid mode in addition to full mode

Solution

Previously, the Cmd+N shortcut was restricted to only work in full mode (anim_state.mode == .Full). This required users to first expand a terminal to full screen before being able to spawn a new terminal.

This change extends the mode check to accept both Full and Grid modes. When used in grid mode:

  • A new terminal spawns in the next available slot
  • The new terminal inherits the focused terminal's working directory
  • The new terminal becomes focused in the grid view
  • A toast notification shows which terminal was created (e.g., "Terminal 2 ⌘2")

Test plan

  • zig build passes
  • zig build test passes
  • Manual test: In grid mode, press Cmd+N to spawn a new terminal
  • Manual test: Verify new terminal inherits current directory
  • Manual test: Verify toast notification appears

Issue: Cmd+N (spawn new terminal) only worked in full mode, requiring users
to first expand a terminal before creating a new one.

Solution: Extended the mode check for the Cmd+N handler to accept both Full
and Grid modes. In grid mode, the new terminal spawns in the next available
slot, inherits the focused terminal's working directory, and becomes focused
in the grid view.
Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 890c07b4b8

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

When the focused grid slot is unspawned, use it directly instead of
searching for another free slot. This fixes a regression where pressing
Cmd+N with an unspawned focused slot (and no other free slots) would
incorrectly show "All terminals in use".
@forketyfork forketyfork merged commit 0952c88 into main Jan 17, 2026
4 checks passed
@forketyfork forketyfork deleted the feat/cmd-n-grid-mode branch January 17, 2026 06:42
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.

2 participants