feat: tab management with open/close and active highlight#2
Conversation
Opening a tool route registers it as a tab; tabs persist across reloads via the existing zustand store. Middle-click or X closes a tab and falls back to the next/prev tab (or home) when closing the active one. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
|
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 (1)
📝 WalkthroughWalkthroughThe PR simplifies tab state to a string[] with open/close methods, calls open(toolId) from the tool route on load, and updates AppShell UI and TabBar to close tabs via store.close() with navigation; CSS variable Tailwind syntax is updated throughout. ChangesTab Management System Refactoring
Sequence DiagramsequenceDiagram
participant User
participant Route as tool.$toolId
participant TabsStore
participant TabBar
participant Router
User->>Route: navigate to /tool/:toolId
Route->>TabsStore: open(toolId)
TabsStore->>TabsStore: append toolId if missing
Route->>Route: render tool with tabs
User->>TabBar: click close on tab
TabBar->>TabsStore: close(toolId)
TabsStore->>TabBar: return nextToolId or null
TabBar->>Router: navigate to nextToolId or /
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Warning There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure. 🔧 ESLint
ESLint skipped: no ESLint configuration detected in root package.json. To enable, add Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 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 `@src/components/shell/app-shell.tsx`:
- Around line 223-226: The close button in app-shell.tsx is currently icon-only
and relies on title for accessibility; update the button rendered where
onClick={(e) => handleClose(e, toolId)} is used to include an explicit
accessible name by adding an aria-label (e.g., aria-label="Close") so assistive
tech can identify it; ensure the aria-label text matches the intended
action/context (use toolId if needed for specificity) and keep the existing
title and handleClose handler unchanged.
🪄 Autofix (Beta)
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: 45e57edc-62f7-4ceb-85ae-008a867a41c6
📒 Files selected for processing (3)
src/components/shell/app-shell.tsxsrc/routes/tool.$toolId.tsxsrc/stores/use-tabs-store.ts
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Deploying with
|
| Status | Name | Latest Commit | Updated (UTC) |
|---|---|---|---|
| ❌ Deployment failed View logs |
devbox | 4b08c42 | May 24 2026, 04:10 PM |
Summary
TabBarrenders open tools with active highlight, icon, and close affordance/)(--var)shorthandTest plan
/when none remain)🤖 Generated with Claude Code
Summary by CodeRabbit
New Features
Style