Skip to content

Conversation

@stevenvo
Copy link
Contributor

Summary

Makes new tab creation more intuitive by inheriting the current working directory from the active tab.

Problem

When creating a new tab (Cmd+T), it always starts in the home directory, requiring users to cd back to their project directory. This breaks workflow continuity.

Solution

  • Extract cmd:cwd from the active tab's first terminal block
  • Pass inherited cwd as metadata to the new tab's terminal block
  • Terminal starts in the same directory as the previous tab

Behavior

  • With active tab in /projects/myapp: New tab starts in /projects/myapp
  • No active tab or no cwd: Falls back to home directory (~)
  • Initial launch: Not affected (uses default behavior)

Implementation

  • Modified CreateTab in pkg/wcore/workspace.go
  • Reads active tab's block metadata for cmd:cwd
  • Merges inherited cwd into new tab's terminal block
  • Backward compatible (doesn't break existing tab creation)

Test Plan

  • cd to project directory
  • Press Cmd+T to create new tab
  • Verify pwd shows same directory
  • Test with no active tab (home directory)
  • Test initial app launch (unchanged)

🤖 Generated with Claude Code

When creating a new tab (Cmd+T), it now starts in the same directory
as the currently active tab, instead of always defaulting to home.

## Changes
- Extract cmd:cwd from active tab's first block
- Pass inherited cwd to new tab's terminal block via metadata
- Only applies to user-created tabs (not initial launch)
- Falls back to home directory if no cwd found

## Benefits
- More intuitive workflow - stay in your project directory
- Reduces need to cd after creating new tabs
- Maintains context across tabs

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
@CLAassistant
Copy link

CLAassistant commented Dec 15, 2025

CLA assistant check
All committers have signed the CLA.

@chatgpt-codex-connector
Copy link

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Dec 15, 2025

Warning

Rate limit exceeded

@stevenvo has exceeded the limit for the number of commits or files that can be reviewed per hour. Please wait 8 minutes and 26 seconds before requesting another review.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

📥 Commits

Reviewing files that changed from the base of the PR and between fbb0c4d and 4a622b7.

📒 Files selected for processing (1)
  • pkg/wcore/workspace.go (2 hunks)
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

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 and usage tips.

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