feat: tool registry with collapsible category sidebar#1
Conversation
Introduce the tool registry and render the 10 planned tools as a grouped, collapsible sidebar list. - src/tools/registry.ts — typed TOOLS array (id, name, category, icon, description), CATEGORIES, and getToolById / getToolsByCategory helpers. Icons sourced from lucide-react. - Sidebar (app-shell.tsx) renders tools by category. Each row is a TanStack Router Link with an accent-tinted rounded icon tile, name text, and an active-state highlight (accent left border + muted bg). - Categories are collapsible: chevron rotates 0deg ↔ -90deg, the tool list animates via the grid-template-rows 1fr ↔ 0fr trick (200ms). When a category is collapsed and contains the active tool, that tool stays visible above the collapsing region — siblings hide. - Tool route (tool.\$toolId.tsx) now looks up the tool in the registry and renders icon + name + category + description + "not implemented". Unknown ids get a friendly fallback with a link home. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
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 ignored due to path filters (1)
📒 Files selected for processing (3)
📝 WalkthroughWalkthroughThe PR introduces a tool registry system that defines tool metadata and categories, then integrates that registry into dynamic tool page routing and a refactored sidebar navigation UI with collapsible category-organized tool links. ChangesTool Registry and Navigation
Sequence Diagram(s)sequenceDiagram
participant User
participant Route as Route Handler
participant Registry as Tool Registry
participant UI as UI Components
User->>Route: Navigate to /tool/$toolId
Route->>Registry: getToolById(toolId)
alt Tool Found
Registry-->>Route: ToolDefinition
Route->>UI: Render ToolRoute with details
UI-->>User: Display tool icon, name, category, description
else Tool Not Found
Registry-->>User: Show "Unknown tool" message
end
User->>UI: View Sidebar
UI->>Registry: getToolsByCategory(categoryId)
Registry-->>UI: Tools in category
UI->>UI: Highlight active tool from pathname
UI-->>User: Render collapsible category sections
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 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 |
Summary
Introduces the tool registry and renders the 10 planned tools as a grouped, collapsible sidebar list — the foundational piece every other UX feature (tabs, search, favourites, welcome dashboard) builds on.
Screenshot
What's in
src/tools/registry.ts— typedTOOLSarray (id, name, category, icon, description),CATEGORIESarray, andgetToolById/getToolsByCategoryhelpers. Icons sourced fromlucide-react.app-shell.tsx) — tools rendered by category. Each row is a TanStack Router<Link>with an accent-tinted rounded icon tile, name text, and active-state highlight (accent left border + muted bg).0deg ↔ -90deg, the tool list animates via thegrid-template-rows: 1fr ↔ 0frtrick (200 ms ease-in-out, no JS height measurement).tool.$toolId.tsx) — looks up the tool in the registry and renders icon + name + category + description + "not implemented yet". Unknown ids get a friendly fallback with a link home.Out of scope (planned next)
Tab open/close/switch, sidebar panel switching from the icon rail, keyboard shortcuts, search, favourites, welcome dashboard widgets, individual tool implementations, settings UI.
Test plan
pnpm dev— sidebar renders 10 tools across 6 categories with accent-tinted icon tiles./tool/<id>, sidebar row highlights with accent border./tool/does-not-exist— friendly fallback with "Back to welcome" link.pnpm check— format + lint + type-check all pass.pnpm build— production build succeeds.🤖 Generated with Claude Code
Summary by CodeRabbit
Release Notes