Skip to content

feat(claudecast): add open-in tab/window preference for all terminal apps - #27154

Merged
raycastbot merged 9 commits into
raycast:mainfrom
diskun00:feat/claudecast-open-in-tab-window
May 5, 2026
Merged

raycastbot merged 9 commits into
raycast:mainfrom
diskun00:feat/claudecast-open-in-tab-window

Conversation

@diskun00

@diskun00 diskun00 commented Apr 14, 2026 •

Copy link
Copy Markdown
Contributor

Summary

It's a bit tedious to open new window each time for a new session. Thus in this PR, I add a global "Open In" preference (New Window / New Tab) that controls whether Claude Code sessions open in a new terminal window or a new tab, for all five supported terminal apps.

Changes

  • package.json — new openIn dropdown preference (default: New Window)
  • src/lib/terminal.ts — each terminal function branches on openIn
  • src/launch-project.tsx — fixes a reserved Raycast shortcut warning (⌘P → ⌘⇧P on "Continue with Prompt")

Terminal-specific behaviour

Terminal New Window New Tab
Terminal.app temp .command file + open -a Terminal ⌘T via System Events, then do script in front window
iTerm create window with default profile create tab with default profile in current window
Warp warp://action/new_window warp://action/new_tab
kitty new process --single-instance
Ghostty CLI --working-directory flag ⌘T via System Events

Testing

  • Built successfully with npm run build
  • Terminal.app new window and new tab manually verified
  • Warp URL scheme confirmed in Warp docs

…apps

Adds a global "Open In" preference (New Window / New Tab) that controls
whether Claude Code sessions open in a new terminal window or a new tab.

Supported for all five terminal apps:
- Terminal.app: new window via temp .command file + `open -a Terminal`;
  new tab via ⌘T keystroke through System Events (Raycast has Accessibility)
- iTerm: new window/tab via native AppleScript dictionary
- Warp: new_window vs new_tab URL scheme actions
- kitty: --single-instance flag for tab reuse, new process for window
- Ghostty: ⌘T keystroke for tab, CLI flag for window

Also fixes a reserved Raycast shortcut warning: ⌘P → ⌘⇧P on
"Continue with Prompt" action in Launch Project.

Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
@raycastbot raycastbot added extension fix / improvement Label for PRs with extension's fix improvements extension: claudecast Issues related to the claudecast extension platform: macOS labels Apr 14, 2026
@raycastbot

raycastbot commented Apr 14, 2026 •

Copy link
Copy Markdown
Collaborator

Thank you for your contribution! 🎉

🔔 @qazi0 @RoderickJDunn you might want to have a look.

You can use this guide to learn how to check out the Pull Request locally in order to test it.

📋 Quick checkout commands
BRANCH="feat/claudecast-open-in-tab-window"
FORK_URL="https://github.com/diskun00/extensions.git"
EXTENSION_NAME="claudecast"
REPO_NAME="extensions"

git clone -n --depth=1 --filter=tree:0 -b $BRANCH $FORK_URL
cd $REPO_NAME
git sparse-checkout set --no-cone "extensions/$EXTENSION_NAME"
git checkout
cd "extensions/$EXTENSION_NAME"
npm install && npm run dev

We're currently experiencing a high volume of incoming requests. As a result, the initial review may take up to 10-15 business days.

@greptile-apps

greptile-apps Bot commented Apr 14, 2026 •

Copy link
Copy Markdown
Contributor

Greptile Summary

This PR adds a global "Open In" preference (New Window / New Tab) to claudecast, wiring it through all five supported terminal helpers (Terminal.app, iTerm, Warp, kitty, Ghostty) and fixing a reserved Raycast shortcut (⌘P → ⌘⇧P on "Continue with Prompt").

  • Terminal.app tab path uses ⌘T via System Events with explicit delays before do script … in front window.
  • iTerm tab path uses create tab with default profile with a no-window fallback.
  • kitty tab path attempts kitten @ launch --type=tab; on failure it silently falls back to a new OS window with no runtime notification.
  • Warp always opens a new window regardless of the preference (documented in the preference description).
  • Changelog uses the correct [1.7.0] version with the {PR_MERGE_DATE} placeholder.

Confidence Score: 4/5

Safe to merge; the new tab paths work correctly for Terminal.app, iTerm, and Ghostty, and known limitations for kitty and Warp are documented in the preference description.

The kitty tab mode silently falls back to a new window when remote control is not configured, with no in-app feedback. Users who select "New Tab" with a default kitty setup will get a new window every time without knowing why. The rest of the changes are well-scoped.

extensions/claudecast/src/lib/terminal.ts — specifically the kitty tab fallback path around the silent catch block

Important Files Changed

Filename Overview
extensions/claudecast/src/lib/terminal.ts Adds openIn branching to all five terminal helpers; kitty tab path falls back silently on kitten @ failure with no user-visible notification
extensions/claudecast/package.json Adds openIn dropdown preference (default: window) and a new contributor entry; schema and values look correct
extensions/claudecast/src/launch-project.tsx Fixes reserved Raycast shortcut: ⌘P → ⌘⇧P on "Continue with Prompt" action; change is correct and isolated
extensions/claudecast/CHANGELOG.md New [1.7.0] entry at top with {PR_MERGE_DATE} placeholder; version ordering is correct
Prompt To Fix All With AI
Fix the following 1 code review issue. Work through them one at a time, proposing concise fixes.

---

### Issue 1 of 1
extensions/claudecast/src/lib/terminal.ts:224-238
**kitty tab fallback is silent at runtime**

When `kitten @ launch` fails (remote control not configured), the error is silently swallowed and a new window is opened with no notification to the user. The preference description documents this limitation, but a user who selects "New Tab" and consistently gets new windows will have no in-app indication of why. Adding a `showToast` call in the `catch` block (e.g., "kitty: remote control not configured, opened in a new window instead") would make the fallback discoverable without requiring the user to re-read the preference description.

Reviews (5): Last reviewed commit: "Fix CHANGELOG date" | Re-trigger Greptile

@raycastbot

Copy link
Copy Markdown
Collaborator

This pull request has been automatically marked as stale because it did not have any recent activity.

It will be closed if no further activity occurs in the next 7 days to keep our backlog clean 😊

@raycastbot raycastbot added the status: stalled Stalled due inactivity label Apr 28, 2026
@0xdhrv 0xdhrv self-assigned this Apr 30, 2026
@raycastbot raycastbot removed the status: stalled Stalled due inactivity label Apr 30, 2026
Comment thread extensions/claudecast/CHANGELOG.md Resolved

@0xdhrv 0xdhrv left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Hi @diskun00 👋

Thanks for the contribution 🔥

Could you look into the suggestions from Greptile


I converted this PR into a draft until it's ready for the review, please press the button Ready for review when it's ready and we'll have a look 😊

@0xdhrv
0xdhrv marked this pull request as draft April 30, 2026 10:54
Houkun added 3 commits May 1, 2026 09:37
…tabs, escape cwd

- Bump our changelog entry to 1.6.0 to avoid colliding with the upstream 1.5.0
  that landed via the merge from main.
- kitty New Tab now uses 'kitten @ launch --type=tab' (real tab via remote
  control), falling back to a new window if 'allow_remote_control' is not
  enabled. Pass cwd via '--cwd=' arg so it is not shell-expanded.
- Escape '"' in cwd before interpolating into the Terminal.app .command
  heredoc so paths containing quotes do not break the cd.
- Document the kitty remote-control requirement in the openIn preference
  description and CHANGELOG.
…n-in-tab-window

# Conflicts:
#	extensions/claudecast/CHANGELOG.md
#	extensions/claudecast/src/lib/terminal.ts
@diskun00
diskun00 marked this pull request as ready for review May 4, 2026 06:10
Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
@diskun00

diskun00 commented May 4, 2026 •

Copy link
Copy Markdown
Contributor Author

Hi @diskun00 👋

Thanks for the contribution 🔥

Could you look into the suggestions from Greptile

I converted this PR into a draft until it's ready for the review, please press the button Ready for review when it's ready and we'll have a look 😊

Hi @0xdhrv , thanks for reviewing! i've resolved the comments from greptile:D

@qazi0 qazi0 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

lgtm, thank you @diskun00 🚀

@raycast-extensions-bot raycast-extensions-bot Bot added the Approved Approved by a user label May 5, 2026

@0xdhrv 0xdhrv left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Looks good to me, approved ✅

@raycastbot
raycastbot merged commit 13fa123 into raycast:main May 5, 2026
11 checks passed
@github-actions

github-actions Bot commented May 5, 2026

Copy link
Copy Markdown
Contributor

@raycastbot

Copy link
Copy Markdown
Collaborator

🎉 🎉 🎉

Such a great contribution deserves a reward, but unfortunately we couldn't find your Raycast account based on your GitHub username (@diskun00).

Please link your GitHub account to your Raycast account to receive your credits and soon be able to exchange them for some swag.

raycastbot added a commit that referenced this pull request May 8, 2026
…board, fix ooms, etc. (#27693)

* Update claudecast extension

- Merge contributions: keep local 1.8.0 state with cmux + auth gate broadening
- Pull contributions
- chore(gitignore): also ignore PR_*.md naming variant
- fix(1.8.0): broaden auth gate, restore detail-view recency, fix kitty window mode
- chore(release): v1.8.0
- Merge branch \'contributions/merge-pr27154\'
- Pull contributions: PR #27154 (open-in tab/window preference for all terminal apps)

* fix(1.8.0): address greptile review

* Update CHANGELOG.md

---------

Co-authored-by: raycastbot <[email protected]>
raycastbot added a commit that referenced this pull request Aug 24, 2026
…d Usage Forecasts (#30471)

* Update claudecast extension

- Merge published ClaudeCast contributions
- Pull contributions
- Add session inbox and agent controls
- fix(1.8.0): address greptile review
- Merge contributions: keep local 1.8.0 state with cmux + auth gate broadening
- Pull contributions
- chore(gitignore): also ignore PR_*.md naming variant
- fix(1.8.0): broaden auth gate, restore detail-view recency, fix kitty window mode
- chore(release): v1.8.0
- Merge branch \'contributions/merge-pr27154\'
- Pull contributions: PR #27154 (open-in tab/window preference for all terminal apps)
- fix(terminal): address Greptile review on PR #27632
- Merge branch \'contributions/merge-1777843536365\'
- Pull contributions
- chore(changelog): credit @Haknt for Ghostty/Warp terminal fixes
- chore(release): v1.6.0 — refreshed description and CHANGELOG
- fix(terminal): use native APIs for Ghostty and Warp launch (#1)
- Sync with upstream raycast/extensions (v1.4.0 + v1.5.0)
- fix(terminal): use native APIs for Ghostty and Warp launch (#1)
- Fix model pricing table with correct per-version rates
- Separate streaming usage scanner, configurable menu bar cost, extension icon
- Remove session limit from all-time stats calculation
- Fix model extraction to read from message.model
- Fix cost calculation from tokens, add token breakdown, use os.homedir
- Merge branch \'contributions/merge-1775429074266\'
- Pull contributions
- Add CLAUDE.md and PR review notes to .gitignore
- Update extension description punctuation
- Add deep search match snippets, fix surrogate crashes and tilde expansion
- Fix: sanitize lone surrogates and safe-truncate to prevent render tree JSON crash
- Sync with published fork (qazi0/extensions)
- Update README with Ralph Loop and main menu screenshot
- Add Ralph Loop screenshots
- Update README documentation
- Add Anthropic API key preference
- Add Claude installation checks and path validation
- Fix Ask Claude context capture and add path persistence
- Fix duplicate React keys in Browse Sessions
- Add Anthropic API key support and CLI installation check
- Fix memory leaks in session parsing and stats
- Update CHANGELOG with v1.1.0 release notes
- Add loading toast while Ralph Loop prepares
- Render multiline variables as TextArea in prompt library
- Update Ralph Loop UI: cleaner name and multiline support
- Add Ralph Loop resume functionality
- Add Ralph Loop fresh context execution with signal-based termination
- Use standard markdown for README screenshots
- Enhance README with icon, screenshots, and reorganized features
- Comprehensive code review fixes: security, performance, and reliability
- Use Raycast trash() for safer session deletion
- Remove unused token counting code from usage-stats
- Address Greptile PR review feedback
- Update store screenshots
- Upgrade Prompt Library: high-quality icons and comprehensive prompts
- Update SESSION_NOTES.md with Session 2 accomplishments
- Fix Git Actions: detect current VS Code project and show results
- Remove unused assets from assets folder
- Add CHANGELOG.md and update README with OAuth setup
- Initial commit: ClaudeCast - Claude Code Raycast extension

* Use Claude login for subscription usage

* Update ClaudeCast Store documentation

* Update CHANGELOG.md

---------

Co-authored-by: raycastbot <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Approved Approved by a user extension: claudecast Issues related to the claudecast extension extension fix / improvement Label for PRs with extension's fix improvements platform: macOS

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants