Skip to content

feat: support Tabby terminal - #654

Open
flpvvvv wants to merge 3 commits into
Octane0411:mainfrom
flpvvvv:feat/tabby-terminal
Open

feat: support Tabby terminal#654
flpvvvv wants to merge 3 commits into
Octane0411:mainfrom
flpvvvv:feat/tabby-terminal

Conversation

@flpvvvv

@flpvvvv flpvvvv commented Aug 12, 2026

Copy link
Copy Markdown

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 ID org.tabby. It has no AppleScript/CLI pane locator, so jump-back activates the app by bundle ID — matching the existing generic open -b <bundleID> fallback pattern used for terminals without precise pane targeting.

Changes

  • Sources/OpenIslandApp/TerminalJumpService.swift — added Tabby descriptor (org.tabby, alias tabby) to knownApps.
  • Sources/OpenIslandCore/{Claude,Codex,Gemini}Hooks.swiftinferTerminalApp maps TERM_PROGRAM=tabby"Tabby"; added "tabby" to noLocatorTerminalApps (no AppleScript/CLI locator).
  • Sources/OpenIslandApp/ProcessMonitoringCoordinator.swiftsupportedTerminalApp maps "tabby""Tabby".
  • Sources/OpenIslandApp/ActiveAgentProcessDiscovery.swiftrecognizedTerminalApp detects the Tabby app binary path.
  • scripts/open-island-hooks.pyinfer_terminal_app maps TERM_PROGRAM=Tabby"Tabby" (SSH/remote path).
  • Docs — README.md, README.zh-CN.md, docs/product.md, docs/architecture.md, docs/hooks.md updated with Tabby.
  • Tests — Claude/Codex/Gemini infer tests + TerminalJumpService Tabby activation test.
  • .gitignore — added .codegraph/.

Verification

  • Python hook inference verified: TERM_PROGRAM=Tabby"Tabby".
  • ⚠️ swift build / swift test not run — this machine has only CommandLineTools (no full Xcode), and SwiftPM fails at the manifest stage with an undefined PackageDescription symbol. The same failure reproduces on unmodified main, 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

    • Added support for the Tabby terminal, including automatic detection and app activation.
    • Tabby supports jump-back behavior when precise pane targeting is unavailable.
    • Expanded the documented compatibility list to include Tabby and 15+ supported terminals/IDEs.
  • Documentation

    • Updated English and Chinese compatibility guides and terminal support documentation.
  • Tests

    • Added coverage for Tabby detection and fallback activation across supported integrations.

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.
@coderabbitai

coderabbitai Bot commented Aug 12, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 5504270f-3422-4dd5-9961-71f260f67d7c

📥 Commits

Reviewing files that changed from the base of the PR and between aea2132 and 61c2afb.

📒 Files selected for processing (6)
  • .gitignore
  • Sources/OpenIslandCore/GeminiHooks.swift
  • Tests/OpenIslandCoreTests/ClaudeHooksTests.swift
  • Tests/OpenIslandCoreTests/CodexHooksTests.swift
  • Tests/OpenIslandCoreTests/GeminiHooksTests.swift
  • scripts/open-island-hooks.py
🚧 Files skipped from review as they are similar to previous changes (5)
  • Tests/OpenIslandCoreTests/CodexHooksTests.swift
  • scripts/open-island-hooks.py
  • .gitignore
  • Tests/OpenIslandCoreTests/ClaudeHooksTests.swift
  • Tests/OpenIslandCoreTests/GeminiHooksTests.swift

📝 Walkthrough

Walkthrough

This 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 TERM_PROGRAM before legacy terminal environment variables.

Changes

Tabby terminal support

Layer / File(s) Summary
Terminal detection and hook integration
Sources/OpenIslandApp/..., Sources/OpenIslandCore/..., scripts/open-island-hooks.py, Tests/OpenIslandCoreTests/...
The app and hook implementations detect Tabby from process metadata or TERM_PROGRAM=tabby. Tabby bypasses focused-terminal locator lookup. Gemini and the Python script apply updated detection precedence. Tests cover these paths.
Tabby application activation
Sources/OpenIslandApp/TerminalJumpService.swift, Tests/OpenIslandAppTests/TerminalJumpServiceTests.swift
The jump service maps Tabby to bundle identifier org.tabby. The fallback activation path is tested.
Compatibility documentation and local tooling
README.md, README.zh-CN.md, docs/..., .gitignore
Compatibility documentation describes Tabby app activation and the lack of pane-level targeting. Local tooling and Python cache artifacts are ignored.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Mergeability Score: ⚪ Minimal · up to 61c2a

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
Loading

Possibly related PRs

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 5.26% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely describes the main change: adding support for the Tabby terminal.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 2

🧹 Nitpick comments (1)
Tests/OpenIslandCoreTests/ClaudeHooksTests.swift (1)

305-316: 🎯 Functional Correctness | 🔵 Trivial | ⚡ Quick win

Make the three Tabby inference tests verify the no-locator contract.

Each test can pass even when terminalLocatorProvider is called. Record provider invocations and assert zero calls in every implementation.

  • Tests/OpenIslandCoreTests/ClaudeHooksTests.swift#L305-L316: add a zero-call assertion for terminalLocatorProvider.
  • 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

📥 Commits

Reviewing files that changed from the base of the PR and between 830f0ef and aea2132.

📒 Files selected for processing (17)
  • .gitignore
  • README.md
  • README.zh-CN.md
  • Sources/OpenIslandApp/ActiveAgentProcessDiscovery.swift
  • Sources/OpenIslandApp/ProcessMonitoringCoordinator.swift
  • Sources/OpenIslandApp/TerminalJumpService.swift
  • Sources/OpenIslandCore/ClaudeHooks.swift
  • Sources/OpenIslandCore/CodexHooks.swift
  • Sources/OpenIslandCore/GeminiHooks.swift
  • Tests/OpenIslandAppTests/TerminalJumpServiceTests.swift
  • Tests/OpenIslandCoreTests/ClaudeHooksTests.swift
  • Tests/OpenIslandCoreTests/CodexHooksTests.swift
  • Tests/OpenIslandCoreTests/GeminiHooksTests.swift
  • docs/architecture.md
  • docs/hooks.md
  • docs/product.md
  • scripts/open-island-hooks.py

Comment thread docs/product.md Outdated
Comment thread Sources/OpenIslandCore/GeminiHooks.swift
- 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.
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.

1 participant