Skip to content

new keybindng F2 to edit the active tab name, also fix refocus after name editing#3158

Merged
sawka merged 1 commit intomainfrom
sawka/tab-rename-hotkey
Mar 31, 2026
Merged

new keybindng F2 to edit the active tab name, also fix refocus after name editing#3158
sawka merged 1 commit intomainfrom
sawka/tab-rename-hotkey

Conversation

@sawka
Copy link
Copy Markdown
Member

@sawka sawka commented Mar 31, 2026

No description provided.

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai bot commented Mar 31, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: e527f68b-f584-446e-9e0b-b8a5433d0f25

📥 Commits

Reviewing files that changed from the base of the PR and between 02b9e5f and a6822c8.

📒 Files selected for processing (6)
  • docs/docs/keybindings.mdx
  • frontend/app/store/keymodel.ts
  • frontend/app/store/tab-model.ts
  • frontend/app/tab/tab.tsx
  • frontend/app/tab/vtab.tsx
  • frontend/app/tab/vtabbar.tsx

Walkthrough

This PR adds F2 keyboard shortcut support for renaming tabs across the application. A global key handler is registered in keymodel.ts that fetches the active tab model and invokes its startRenameCallback when present. The TabModel class adds a public callback field initialized to null. Components in both tab.tsx and vtabbar.tsx establish useEffect hooks to register callbacks that trigger existing rename functionality via renameRef, with proper cleanup on unmount. The rename edit flow in vtab.tsx now schedules a refocus operation after blur commits the edit. Documentation is updated with the new keybinding entry and version badge.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

🚥 Pre-merge checks | ✅ 1 | ❌ 2

❌ Failed checks (1 warning, 1 inconclusive)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
Description check ❓ Inconclusive No pull request description was provided by the author, making it impossible to evaluate whether it relates to the changeset. Add a pull request description explaining the purpose, motivation, and any relevant context for the F2 keybinding and refocus fix.
✅ Passed checks (1 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately describes the main changes: adding F2 keybinding for tab renaming and fixing refocus behavior after name editing.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch sawka/tab-rename-hotkey

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.

@kilo-code-bot
Copy link
Copy Markdown
Contributor

kilo-code-bot bot commented Mar 31, 2026

Code Review Summary

Status: No Issues Found | Recommendation: Merge

Files Reviewed (5 files)
  • docs/docs/keybindings.mdx - Adding F2 keybinding documentation for tab rename
  • frontend/app/store/keymodel.ts - Registering F2 global key handler
  • frontend/app/store/tab-model.ts - Adding startRenameCallback to TabModel
  • frontend/app/tab/tab.tsx - Wiring callback to tab model
  • frontend/app/tab/vtab.tsx - Adding refocusNode after rename
  • frontend/app/tab/vtabbar.tsx - Wiring callback to tab model

The implementation correctly adds F2 keybinding support for renaming tabs. The pattern uses a callback mechanism where the global key handler invokes a callback stored on the tab model, which triggers the rename UI in the VTab component. Proper cleanup of the callback is handled in the useEffect return functions.


Reviewed by minimax-m2.5-20260211 · 285,656 tokens

@cloudflare-workers-and-pages
Copy link
Copy Markdown

Deploying waveterm with  Cloudflare Pages  Cloudflare Pages

Latest commit: a6822c8
Status: ✅  Deploy successful!
Preview URL: https://f4c06ab7.waveterm.pages.dev
Branch Preview URL: https://sawka-tab-rename-hotkey.waveterm.pages.dev

View logs

@sawka sawka merged commit c99bd48 into main Mar 31, 2026
10 checks passed
@sawka sawka deleted the sawka/tab-rename-hotkey branch March 31, 2026 17:46
suruoxi pushed a commit to suruoxi/waveterm that referenced this pull request Apr 1, 2026
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