Repository navigation
feat(webui): provider/model selection and session close - #680
Merged
Merged
Conversation
New-session flow gains a provider dropdown (all ProviderName literals +
'server default', which omits both fields) and a free-text model input
with kimi-for-coding/k3/deepseek-chat presets; defaults to
kimi-code/kimi-for-coding. Both persist via the existing localStorage
config. Session list shows provider_name/model_name and gains a
per-row close button wired to DELETE /sessions/{id} with a confirm
step; 404/409 surface in the list error banner.
Server support already existed (CreateSessionRequest.provider/model,
DELETE /sessions/{id}); this is frontend-only. 24/24 vitest, tsc clean.
Contributor
📝 WalkthroughWalkthroughThe WebUI adds provider and model controls to session creation, omits them for server defaults, and introduces session deletion with confirmation, API handling, UI state updates, and conflict-error coverage. ChangesSession management
Estimated code review effort: 3 (Moderate) | ~25 minutes Sequence Diagram(s)sequenceDiagram
participant SessionRow
participant App
participant AgentClient
participant SessionsAPI
SessionRow->>App: request deletion
App->>AgentClient: closeSession(sessionId)
AgentClient->>SessionsAPI: DELETE /sessions/{sessionId}
SessionsAPI-->>AgentClient: status and session_id
AgentClient-->>App: deletion result
App-->>SessionRow: remove session or show error
Possibly related PRs
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
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. Comment |
Contributor
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 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 `@coding-agent/webui/app/src/App.tsx`:
- Around line 184-192: Update the deleteSession success path to call
setSessionsError(null) after the deletion completes successfully, before
refreshing or updating the session list. Keep the existing error assignment in
the failure path unchanged so only stale errors are cleared after a confirmed
successful delete.
In `@coding-agent/webui/app/src/components/Header.tsx`:
- Around line 13-23: Update the PROVIDERS definition in Header.tsx to use a
generated or shared source of truth from the backend provider names instead of
maintaining a manual duplicate. Ensure additions and removals in the backend
provider list automatically keep the UI provider options synchronized.
🪄 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: aaf2f534-54b6-445d-a1ed-8995162a2aa0
📒 Files selected for processing (5)
coding-agent/webui/app/src/App.test.tsxcoding-agent/webui/app/src/App.tsxcoding-agent/webui/app/src/components/Header.tsxcoding-agent/webui/app/src/components/SessionList.tsxcoding-agent/webui/app/src/lib/api.ts
This was referenced Jul 25, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
服务端能力早已存在(
CreateSessionRequest.provider/model、DELETE /sessions/{id}),纯前端补齐:DELETE /sessions/{id},404/409 显示可读错误Summary by CodeRabbit
New Features
Bug Fixes