feat: support Tabby terminal - #654
Conversation
Detect Tabby via TERM_PROGRAM=Tabby in the Claude/Codex/Gemini hook runtime-context enrichment and the Python SSH hook, tag its bundle ID (org.tabby) for jump-back, and activate it by bundle ID. Tabby has no AppleScript/CLI pane locator, so it is excluded from focused-terminal locator queries like WezTerm/Kaku. Updates the compatibility docs and adds infer + jump tests.
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (6)
🚧 Files skipped from review as they are similar to previous changes (5)
📝 WalkthroughWalkthroughThis change adds Tabby support across terminal detection, hook inference, process discovery, application activation, tests, documentation, and local tooling ignores. Gemini and the Python hook script now prioritize ChangesTabby terminal support
Estimated code review effort: 3 (Moderate) | ~20 minutes Mergeability Score: ⚪ Minimal · up to This is a localized Tabby terminal integration with matching detection, activation, and inference updates; no actionable merge-blocking risk remains beyond normal checks and review. Sequence Diagram(s)sequenceDiagram
participant HookPayload
participant TerminalJumpService
participant Tabby
HookPayload->>TerminalJumpService: provide terminal app Tabby
TerminalJumpService->>Tabby: activate bundle org.tabby
Tabby-->>TerminalJumpService: application activation result
Possibly related PRs
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 2
🧹 Nitpick comments (1)
Tests/OpenIslandCoreTests/ClaudeHooksTests.swift (1)
305-316: 🎯 Functional Correctness | 🔵 Trivial | ⚡ Quick winMake the three Tabby inference tests verify the no-locator contract.
Each test can pass even when
terminalLocatorProvideris called. Record provider invocations and assert zero calls in every implementation.
Tests/OpenIslandCoreTests/ClaudeHooksTests.swift#L305-L316: add a zero-call assertion forterminalLocatorProvider.Tests/OpenIslandCoreTests/CodexHooksTests.swift#L89-L107: add the same zero-call assertion alongside the Warp UUID assertion.Tests/OpenIslandCoreTests/GeminiHooksTests.swift#L230-L241: add the same zero-call assertion.🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@Tests/OpenIslandCoreTests/ClaudeHooksTests.swift` around lines 305 - 316, Add invocation tracking to the Tabby inference tests and assert that terminalLocatorProvider is never called: update Tests/OpenIslandCoreTests/ClaudeHooksTests.swift lines 305-316, Tests/OpenIslandCoreTests/CodexHooksTests.swift lines 89-107 alongside the Warp UUID assertion, and Tests/OpenIslandCoreTests/GeminiHooksTests.swift lines 230-241. Ensure each test’s provider records calls and verifies a zero-call count while preserving the existing Tabby assertions.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@docs/product.md`:
- Line 45: Remove the Tabby row from the terminal matrix in docs/product.md,
leaving the terminal matrix maintained only in README.md and preserving the
remaining product-scope content.
In `@Sources/OpenIslandCore/GeminiHooks.swift`:
- Around line 367-368: Make TERM_PROGRAM authoritative in GeminiHooks.swift:
evaluate explicit multiplexer markers first, then the TERM_PROGRAM switch, and
move the iTerm, Ghostty, and Warp legacy fallback checks below it. Apply the
same ordering in scripts/open-island-hooks.py, moving the iTerm and Ghostty
fallbacks below TERM_PROGRAM handling so TERM_PROGRAM=Tabby returns Tabby
despite inherited variables.
---
Nitpick comments:
In `@Tests/OpenIslandCoreTests/ClaudeHooksTests.swift`:
- Around line 305-316: Add invocation tracking to the Tabby inference tests and
assert that terminalLocatorProvider is never called: update
Tests/OpenIslandCoreTests/ClaudeHooksTests.swift lines 305-316,
Tests/OpenIslandCoreTests/CodexHooksTests.swift lines 89-107 alongside the Warp
UUID assertion, and Tests/OpenIslandCoreTests/GeminiHooksTests.swift lines
230-241. Ensure each test’s provider records calls and verifies a zero-call
count while preserving the existing Tabby assertions.
🪄 Autofix
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro Plus
Run ID: b5ee56a3-8b3c-4c47-9b73-7c21f972b7e8
📒 Files selected for processing (17)
.gitignoreREADME.mdREADME.zh-CN.mdSources/OpenIslandApp/ActiveAgentProcessDiscovery.swiftSources/OpenIslandApp/ProcessMonitoringCoordinator.swiftSources/OpenIslandApp/TerminalJumpService.swiftSources/OpenIslandCore/ClaudeHooks.swiftSources/OpenIslandCore/CodexHooks.swiftSources/OpenIslandCore/GeminiHooks.swiftTests/OpenIslandAppTests/TerminalJumpServiceTests.swiftTests/OpenIslandCoreTests/ClaudeHooksTests.swiftTests/OpenIslandCoreTests/CodexHooksTests.swiftTests/OpenIslandCoreTests/GeminiHooksTests.swiftdocs/architecture.mddocs/hooks.mddocs/product.mdscripts/open-island-hooks.py
- Make TERM_PROGRAM authoritative: move legacy per-app fallbacks (iTerm, Ghostty, Warp) below the TERM_PROGRAM switch in GeminiHooks.swift and open-island-hooks.py so inherited env vars cannot misclassify Tabby. - Drop the duplicated Tabby row from docs/product.md (terminal matrix is maintained only in README.md per CLAUDE.md). - Assert terminalLocatorProvider is never invoked in the Claude/Codex/Gemini Tabby inference tests.
Summary
Adds Tabby (https://github.com/eugeny/tabby) as a supported terminal for session detection and jump-back.
Tabby sets
TERM_PROGRAM=Tabby(authoritative signal) and has bundle IDorg.tabby. It has no AppleScript/CLI pane locator, so jump-back activates the app by bundle ID — matching the existing genericopen -b <bundleID>fallback pattern used for terminals without precise pane targeting.Changes
Sources/OpenIslandApp/TerminalJumpService.swift— addedTabbydescriptor (org.tabby, aliastabby) toknownApps.Sources/OpenIslandCore/{Claude,Codex,Gemini}Hooks.swift—inferTerminalAppmapsTERM_PROGRAM=tabby→"Tabby"; added"tabby"tonoLocatorTerminalApps(no AppleScript/CLI locator).Sources/OpenIslandApp/ProcessMonitoringCoordinator.swift—supportedTerminalAppmaps"tabby"→"Tabby".Sources/OpenIslandApp/ActiveAgentProcessDiscovery.swift—recognizedTerminalAppdetects the Tabby app binary path.scripts/open-island-hooks.py—infer_terminal_appmapsTERM_PROGRAM=Tabby→"Tabby"(SSH/remote path).README.md,README.zh-CN.md,docs/product.md,docs/architecture.md,docs/hooks.mdupdated with Tabby.TerminalJumpServiceTabby activation test..gitignore— added.codegraph/.Verification
TERM_PROGRAM=Tabby→"Tabby".swift build/swift testnot run — this machine has only CommandLineTools (no full Xcode), and SwiftPM fails at the manifest stage with an undefinedPackageDescriptionsymbol. The same failure reproduces on unmodifiedmain, so it is a pre-existing environment limitation, not this change. The Swift additions mirror existing terminal-handling patterns and should be verified in CI / a full-Xcode environment.Summary by CodeRabbit
New Features
Documentation
Tests