Skip to content

feat: group model select with collapsible panel in Control UI - #87300

Closed
newbie-yu wants to merge 2 commits into
openclaw:developfrom
newbie-yu:feat/model-group-panel
Closed

newbie-yu wants to merge 2 commits into
openclaw:developfrom
newbie-yu:feat/model-group-panel

Conversation

@newbie-yu

Copy link
Copy Markdown

Summary

What problem does this PR solve?

Why does this matter now?

What is the intended outcome?

What is intentionally out of scope?

What does success look like?

What should reviewers focus on?

Summary guidance

This PR description is the contributor's durable explanation of the change. Write it for human maintainers first; ClawSweeper and Barnacle use the same text to understand intent, proof, risk, and current review state.

Describe the intent and outcome in 2-5 bullets. Avoid restating the diff; reviewers and bots can read the changed files.

If this PR fixes a plugin beta-release blocker, title it fix(<plugin-id>): beta blocker - <summary> and link the matching Beta blocker: <plugin-name> - <summary> issue labeled beta-blocker. Contributors cannot label PRs, so the title is the PR-side signal for maintainers and automation.

Linked context

Which issue does this close?

Closes #

Which issues, PRs, or discussions are related?

Related #

Was this requested by a maintainer or owner?

Linked context guidance

Link the issue, PR, discussion, maintainer request, or owner request that explains why this PR should exist. Maintainer context helps reviewers and automation distinguish intended work from drive-by churn.

Real behavior proof (required for external PRs)

  • Behavior or issue addressed:
  • Real environment tested:
  • Exact steps or command run after this patch:
  • Evidence after fix (screenshot, recording, terminal capture, console output, redacted runtime log, linked artifact, or copied live output):
  • Observed result after fix:
  • What was not tested:
  • Proof limitations or environment constraints:
  • Before evidence (optional but encouraged):
Real behavior proof guidance

External contributors must show after-fix evidence from a real OpenClaw setup. Unit tests, mocks, lint, typechecks, snapshots, and CI are supplemental only.

Screenshots are encouraged even for CLI, console, text, or log changes. Terminal screenshots, copied live output, redacted runtime logs, recordings, and linked artifacts count.

If your environment cannot produce the ideal proof, explain that under Proof limitations or environment constraints so reviewers and ClawSweeper can direct the next step properly.

Be mindful of private information like IP addresses, API keys, phone numbers, non-public endpoints, or other private details when providing evidence.

Tests and validation

Which commands did you run?

What regression coverage was added or updated?

What failed before this fix, if known?

If no test was added, why not?

Testing guidance

List focused commands, not every incidental check. CI is useful support, but external PRs still need real behavior proof above when behavior changes.

Risk checklist

Did user-visible behavior change? (Yes/No)

Did config, environment, or migration behavior change? (Yes/No)

Did security, auth, secrets, network, or tool execution behavior change? (Yes/No)

What is the highest-risk area?

How is that risk mitigated?

Risk guidance

Use this for author judgment that is not obvious from the diff. ClawSweeper can see touched files, but it cannot know which behavior you think is risky, why the risk is acceptable, or what mitigation reviewers should verify.

Current review state

What is the next action?

What is still waiting on author, maintainer, CI, or external proof?

Which bot or reviewer comments were addressed?

Review state guidance

Keep this as the durable state for review progress. If useful information appears in comments, fold the current next action or blocker back here so maintainers and ClawSweeper do not need to reconstruct state from comment history.

@openclaw-barnacle openclaw-barnacle Bot added the triage: needs-real-behavior-proof Candidate: external PR needs after-fix proof from a real setup. label May 27, 2026
@github-actions github-actions Bot added the dependencies-changed PR changes dependency-related files label May 27, 2026
@newbie-yu

Copy link
Copy Markdown
Author

Replaces the native <select> model dropdown with a grouped, collapsible panel organized by model family.

Features:

  • Models grouped by family: DeepSeek, GPT, Claude, GLM, Gemini, Qwen, Kimi, etc.
  • Collapsible group headers with toggle arrow
  • Expand/collapse all button in the default model row
  • Unknown model families auto-create new groups
  • Full dark/light theme support via CSS variables
  • Visual height/font consistency with adjacent native controls
  • SVG chevronDown icons matching agent select style
  • Default model option pinned at top outside any group

File changed: ui/src/ui/chat/session-controls.ts

@openclaw-barnacle openclaw-barnacle Bot added docs Improvements or additions to documentation channel: discord Channel integration: discord channel: googlechat Channel integration: googlechat channel: imessage Channel integration: imessage channel: line Channel integration: line channel: matrix Channel integration: matrix channel: mattermost Channel integration: mattermost channel: msteams Channel integration: msteams channel: nextcloud-talk Channel integration: nextcloud-talk channel: nostr Channel integration: nostr channel: signal Channel integration: signal channel: slack Channel integration: slack channel: telegram Channel integration: telegram channel: tlon Channel integration: tlon channel: whatsapp-web Channel integration: whatsapp-web channel: zalo Channel integration: zalo channel: zalouser Channel integration: zalouser app: android App: android app: ios App: ios app: macos App: macos gateway Gateway runtime security Security documentation docker Docker and sandbox tooling channel: feishu Channel integration: feishu channel: twitch Channel integration: twitch channel: irc extensions: acpx labels May 27, 2026
@clawsweeper

clawsweeper Bot commented May 27, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: found issues before merge. Reviewed June 29, 2026, 12:43 PM ET / 16:43 UTC.

Summary
The PR replaces the Control UI chat session-control module with a custom grouped, collapsible model-family picker.

PR surface: Source +1494. Total +1494 across 1 file.

Reproducibility: yes. for the PR review blockers: source comparison against current main shows the branch drops session-control options, combined speed/reasoning behavior, and selected-agent model scope. I did not run a browser repro because the merge blockers are visible from the PR-head and current-source comparison.

Review metrics: 2 noteworthy metrics.

  • Regression Coverage: 0 tests added. The PR changes a central Control UI selector but adds no coverage for grouping alongside existing selector contracts.
  • Current Selector Contracts At Risk: 3 contracts. Combined model/reasoning/speed selection, sidebar session-switcher options, and selected-agent scoped model patching must survive the redesign.

Stored data model
Persistent data-model change detected: serialized state: ui/src/ui/chat/session-controls.ts, unknown-data-model-change: ui/src/ui/chat/session-controls.ts. Confirm migration or upgrade compatibility proof before merge.

Merge readiness
Overall: 🧂 unranked krab
Proof: 🐚 platinum hermit ✨ media proof bonus
Patch quality: 🧂 unranked krab
Result: blocked by patch quality or review findings.

Overall follows the weaker of proof and patch quality, so missing proof can cap an otherwise strong patch.

Rank-up moves:

  • Rebuild grouping inside current main's combined model/reasoning/speed selector.
  • Preserve scoped-agent params in model patching and session refresh paths.
  • [P2] Add focused Control UI tests for grouping plus the existing scoped model, thinking, speed, and sidebar contracts.

Risk before merge

  • [P1] The branch narrows the session-control options while current main still passes sidebar-specific compact/session-switcher options.
  • [P1] The branch replaces the current combined model/reasoning/speed selector with a model-only grouped panel plus separate thinking select, dropping the current speed control path.
  • [P1] The model patch request omits selected-agent scope, so global-session model changes can affect the wrong agent/provider model context.
  • [P1] No focused tests were added for grouping alongside the existing sidebar, combined selector, speed, thinking, and scoped-agent contracts.

Maintainer options:

  1. Rebuild Against Current Selector (recommended)
    Carry the grouping UI into current main's combined model/reasoning/speed selector while keeping the sidebar and selected-agent contracts intact.
  2. Pause For UX Direction
    If maintainers have not chosen provider/family grouping versus search or another picker design, pause the branch until the Control UI direction is explicit.
  3. Track The Feature In The Open Issue
    Maintainers can close or replace this branch and keep the grouped model-picker direction tracked in Feature Request: Group model dropdown by provider #96882.

Next step before merge

  • [P2] The remaining action is UX/product direction and a substantial branch rebuild, not a narrow automated repair.

Security
Cleared: No concrete security or supply-chain concern was found in the one-file Control UI diff, and the live discussion reports no dependency changes.

Review findings

  • [P1] Preserve the session-control options — ui/src/ui/chat/session-controls.ts:57
  • [P1] Keep the combined reasoning and speed selector — ui/src/ui/chat/session-controls.ts:787-789
  • [P1] Pass scoped agent params when patching models — ui/src/ui/chat/session-controls.ts:1146-1149
Review details

Best possible solution:

Port grouped model browsing into current main's combined selector only after the Control UI UX is confirmed, preserving sidebar options, speed/reasoning controls, scoped-agent patching, and focused tests.

Do we have a high-confidence way to reproduce the issue?

Yes for the PR review blockers: source comparison against current main shows the branch drops session-control options, combined speed/reasoning behavior, and selected-agent model scope. I did not run a browser repro because the merge blockers are visible from the PR-head and current-source comparison.

Is this the best way to solve the issue?

No. The grouped-picker idea may be useful, but this branch is not the best implementation because it replaces stale selector structure instead of extending current main's combined selector and scoped-agent contracts.

Full review comments:

  • [P1] Preserve the session-control options — ui/src/ui/chat/session-controls.ts:57
    Current main calls renderChatSessionSelect with compact, sessionSwitcherOnly, and surface: "sidebar"; this signature accepts only surface, so the merged branch would break that caller or force full controls into the sidebar session switcher.
    Confidence: 0.91
  • [P1] Keep the combined reasoning and speed selector — ui/src/ui/chat/session-controls.ts:787-789
    Current main renders one combined model, reasoning, and speed menu. This branch replaces that path with a grouped model-only popover plus a separate thinking select and no speed option path, so the current composer speed/reasoning contract would be lost.
    Confidence: 0.93
  • [P1] Pass scoped agent params when patching models — ui/src/ui/chat/session-controls.ts:1146-1149
    Current main includes selected-agent params in sessions.patch; this branch sends only key and model, so model changes in a global session can apply to the wrong agent/provider scope.
    Confidence: 0.92

Overall correctness: patch is incorrect
Overall confidence: 0.94

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning high; reviewed against 6de357ad4772.

Label changes

Label justifications:

  • P2: This is a normal-priority Control UI feature PR with limited blast radius but clear merge-readiness blockers.
  • merge-risk: 🚨 compatibility: The branch does not preserve current main's combined selector and compact sidebar/session-switcher contracts.
  • merge-risk: 🚨 auth-provider: The branch omits selected-agent scope from model patching, which can affect provider/model choice for global-session agents.
  • rating: 🧂 unranked krab: Overall readiness is 🧂 unranked krab; proof is 🐚 platinum hermit and patch quality is 🧂 unranked krab.
  • status: ⏳ waiting on author: ClawSweeper has contributor-facing work open and is waiting for author action. Sufficient (screenshot): A screenshot comment directly shows the after-patch grouped Control UI picker; that is sufficient visual proof for the UI behavior but does not resolve the source-level regressions.
  • proof: sufficient: Contributor real behavior proof is sufficient. A screenshot comment directly shows the after-patch grouped Control UI picker; that is sufficient visual proof for the UI behavior but does not resolve the source-level regressions.
  • proof: 📸 screenshot: Contributor real behavior proof includes screenshot evidence. A screenshot comment directly shows the after-patch grouped Control UI picker; that is sufficient visual proof for the UI behavior but does not resolve the source-level regressions.
Evidence reviewed

PR surface:

Source +1494. Total +1494 across 1 file.

View PR surface stats
Area Files Added Removed Net
Source 1 1494 0 +1494
Tests 0 0 0 0
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 1 1494 0 +1494

What I checked:

Likely related people:

  • steipete: Peter Steinberger extracted the chat model resolution state, fixed selected global-agent model scoping, and authored the current composer-control selector work this PR must preserve. (role: recent selector contributor; confidence: high; commits: 9082795b108b, 4932391e8a78, 2b30951b8090; files: ui/src/ui/chat/session-controls.ts, ui/src/ui/chat-model-select-state.ts, ui/src/ui/chat-model-ref.ts)
  • Mulualem Eshetu: Authored the merged fix preserving configured model metadata in the picker, which is directly related to provider/model display behavior. (role: adjacent model-picker contributor; confidence: medium; commits: 4977c4ab8221; files: ui/src/ui/chat-model-ref.ts, ui/src/ui/chat-model-select-state.ts)
  • pick-cat: Recently restored provider usage quota behavior in the sidebar session switcher, an adjacent contract this grouped selector work must preserve. (role: recent sidebar/session-controls contributor; confidence: medium; commits: cf31689a03a7; files: ui/src/ui/chat/session-controls.ts, ui/src/ui/views/chat.test.ts)
  • Harjoth Khara: Recently touched the same session-controls selector area while restoring the provider usage pill in the desktop chat composer. (role: recent session-controls contributor; confidence: medium; commits: 5a9396ef6dba; files: ui/src/ui/chat/session-controls.ts)
What the crustacean ranks mean
  • 🦀 challenger crab: rare, exceptional readiness with strong proof, clean implementation, and convincing validation.
  • 🦞 diamond lobster: very strong readiness with only minor maintainer review expected.
  • 🐚 platinum hermit: good normal PR, likely mergeable with ordinary maintainer review.
  • 🦐 gold shrimp: useful signal, but proof or patch confidence is still limited.
  • 🦪 silver shellfish: thin signal; proof, validation, or implementation needs work.
  • 🧂 unranked krab: not merge-ready because proof is missing/unusable or there are serious correctness or safety concerns.
  • 🌊 off-meta tidepool: rating does not apply to this item.

Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics.

How this review workflow works
  • ClawSweeper keeps one durable marker-backed review comment per issue or PR.
  • Re-runs edit this comment so the latest verdict, findings, and automation markers stay together instead of adding duplicate bot comments.
  • A fresh review can be triggered by eligible @clawsweeper re-review comments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.
  • PR/issue authors and users with repository write access can comment @clawsweeper re-review or @clawsweeper re-run on an open PR or issue to request a fresh review only.
  • Maintainers can also comment @clawsweeper review to request a fresh review only.
  • Fresh-review commands do not start repair, autofix, rebase, CI repair, or automerge.
  • Maintainer-only repair and merge flows require explicit commands such as @clawsweeper autofix, @clawsweeper automerge, @clawsweeper fix ci, or @clawsweeper address review.
  • Maintainers can comment @clawsweeper explain to ask for more context, or @clawsweeper stop to stop active automation.
Review history (1 earlier review cycle)
  • reviewed 2026-06-21T09:01:15.607Z sha e5bddf5 :: found issues before merge. :: [P1] Preserve the session-control options | [P1] Keep the combined model selector | [P1] Pass scoped agent params when patching models

@clawsweeper clawsweeper Bot added rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. P2 Normal backlog priority with limited blast radius. merge-risk: 🚨 security-boundary 🚨 May affect sandboxing, authorization, credentials, or sensitive data. merge-risk: 🚨 automation 🚨 May affect CI, automerge, proof capture, label sync, or maintainer automation. labels May 27, 2026
@clawsweeper

clawsweeper Bot commented May 27, 2026

Copy link
Copy Markdown
Contributor

ClawSweeper PR egg

🎁 Pass real behavior proof to wake the egg and unlock a hatchable treat.

Where did the egg go?
  • The egg game starts only after the PR passes the real-behavior proof check.
  • Before that, no creature or rarity is rolled. The treat waits for real proof.
  • This is still just collectible flavor: proof affects review readiness, not creature quality.

@socket-security

socket-security Bot commented May 27, 2026 •

Copy link
Copy Markdown

No dependency changes detected. Learn more about Socket for GitHub.

👍 No dependency changes detected in pull request

@newbie-yu

Copy link
Copy Markdown
Author

Adds a custom model select panel that replaces the native <select> with grouped, collapsible options organized by model family.

Features:

  • Models grouped by family: DeepSeek, GPT, Claude, GLM, Gemini, Qwen, Kimi, etc.
  • Collapsible group headers with toggle arrow
  • Expand/collapse all button in the default model row
  • Unknown model families auto-create new groups (not fallback to Other)
  • Full dark/light theme support via CSS variables
  • Visual height/font consistency with adjacent native controls
  • SVG chevronDown icons matching agent select style
  • Default model option pinned at top outside any group

File changed: ui/src/ui/chat/session-controls.ts

Checklist:

  • Tested with 83 model aliases across 13 providers
  • Dark and light theme verified
  • Visual alignment with adjacent controls verified
  • Build passes (pnpm ui:build)
  • No breaking changes to existing functionality

@newbie-yu
newbie-yu force-pushed the feat/model-group-panel branch from f2a3426 to 5615634 Compare May 27, 2026 15:19
@github-actions github-actions Bot removed the dependencies-changed PR changes dependency-related files label May 27, 2026
@openclaw-barnacle openclaw-barnacle Bot removed docs Improvements or additions to documentation channel: discord Channel integration: discord channel: googlechat Channel integration: googlechat channel: imessage Channel integration: imessage channel: line Channel integration: line labels May 27, 2026
@newbie-yu

Copy link
Copy Markdown
Author

Here is what the grouped model selector looks like in the Control UI:

[uploaded screenshot]

  • Groups auto-collapse/expand with chevron toggles ✓
  • Default model pinned at top with "toggle all" button ✓
  • New unknown models auto-group by first word ✓
  • Dark & light theme compatible ✓
  • Tooltip shows full model id on hover ✓
  • Zero external dependencies ✓

Ready for review.

@newbie-yu

Copy link
Copy Markdown
Author
ScreenShot_2026-05-27_211338_905

@newbie-yu

Copy link
Copy Markdown
Author

Fixed the TypeScript parse error (missing semicolon before type declaration) and the unintended separator character. The grouped model selector is a deliberate replacement of the native <select> — that is the core feature of this PR.

Pushing the fix now. Screenshot showing the working picker will follow.

@openclaw-barnacle

Copy link
Copy Markdown

This pull request has been automatically marked as stale due to inactivity.
Please add updates or it will be closed.

@steipete

Copy link
Copy Markdown
Contributor

Closing per ClawSweeper review verdict abandoned_pr (decision packet 2026-07-21T20:26:18.345Z). This item was part of the audited close backlog (openclaw/clawsweeper#920) stranded by an apply-lane defect, drained manually after re-verification. If this is wrong, reopen and ClawSweeper will re-review.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

app: web-ui App: web-ui merge-risk: 🚨 auth-provider 🚨 May break OAuth, tokens, provider routing, model choice, or credentials. merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. P2 Normal backlog priority with limited blast radius. proof: 📸 screenshot Contributor real behavior proof includes screenshot evidence. proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. size: XL status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. triage: needs-pr-context Candidate: external PR body lacks required problem context or evidence.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants