fix(gui): render Claude helper model labels - #623
Conversation
📝 WalkthroughWalkthroughThe helper model option mapping now passes ChangesClaude Code helper model picker
Estimated code review effort: 1 (Trivial) | ~5 minutes Possibly related PRs
Suggested labels: Suggested reviewers: 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 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 install timed out. The project may have too many dependencies for the sandbox. 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 `@gui/tests/claudecode-fetch-errors.test.tsx`:
- Around line 177-182: Update the test setup around the globalThis.fetch
override to save the original fetch implementation before assigning the mock,
then restore it in a finally block that encompasses the mount and assertions,
including mount failures. Keep the existing Claude Code response behavior
unchanged while ensuring later tests see the original fetch.
🪄 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: Path: .coderabbit.yaml
Review profile: ASSERTIVE
Plan: Pro Plus
Run ID: 17760d33-3647-4bd3-9b3f-6d559af04012
📒 Files selected for processing (2)
gui/src/pages/ClaudeCode.tsxgui/tests/claudecode-fetch-errors.test.tsx
Maintainer review (bug + security)Verdict: APPROVE SecurityNo medium+ XSS issues. Helper model options use Bug review / open bot threads
ScopeTiny, correct fix: Claude Code helper model select now renders labels via Notes
|
|
Will get merged after interal code work lands on dev. |
Summary
modelLabel()in the Claude Code background-helper selector[object Object]Root cause
modelLabel()returns a React element for icon-backed models, but the Claude Code page coerced it withString(...). The sharedSelectOption.labelalready acceptsReact.ReactNode, so the coercion was unnecessary.Verification
bun test ./gui/tests/claudecode-fetch-errors.test.tsx ./gui/tests/claude-code-background-helper.test.tsxcd gui && bun run test(354 passed)cd gui && bun run lintcd gui && bun run buildbun run typecheckbun run privacy:scanbun run test(5,722 passed, 1 skipped)git diff --checkSummary by CodeRabbit
Bug Fixes
Tests