Skip to content

fix(models) Discord model picker doesn't list all models#85138

Merged
sjf merged 2 commits into
mainfrom
sjf-my21-discord-picker
May 22, 2026
Merged

fix(models) Discord model picker doesn't list all models#85138
sjf merged 2 commits into
mainfrom
sjf-my21-discord-picker

Conversation

@sjf

@sjf sjf commented May 22, 2026

Copy link
Copy Markdown
Contributor

Add pagination to Discord model picker

Untitled.mov

Previously the Discord /models picker only showed the first page of providers and the first 25 models per provider — Discord component limits cap the provider grid at 25 buttons and each select menu at 25 options. Users with >25 providers or any provider with >25 models (openai, anthropic, etc.) couldn't see the rest of the catalog.

Adds a [◀ Prev | Page X/Y | Next ▶] row to both views when totalPages > 1:

  • Provider view: nav row appended below the button grid; footer shows page X/Y · N providers total.
  • Model view: nav row inserted between the model select and the trailing button row; detail lines include a provider: page X/Y · N models line.

Page indicator is a disabled informational button; prev/next disable at endpoints. Custom_id encodes the target page plus the surrounding state (selected provider, runtime, pending model) so flipping pages preserves the picker's selection. Row budget worst case is 5 in both views, within DISCORD_COMPONENT_MAX_ROWS.

@openclaw-barnacle openclaw-barnacle Bot added channel: discord Channel integration: discord size: S maintainer Maintainer-authored PR labels May 22, 2026
@clawsweeper

clawsweeper Bot commented May 22, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs changes before merge.

Latest ClawSweeper review: 2026-05-22 06:33 UTC / May 22, 2026, 2:33 AM ET.

Workflow note: Future ClawSweeper reviews update this same comment in place.

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.

Summary
The PR adds prev/next pagination state, rendering, and interaction handling for Discord /models provider and model picker pages, including opening the stored model on its containing page.

Reproducibility: yes. at source level: current main computes provider/model pages but exposes no nav controls, and the focused tests explicitly assert navigation is absent for over-limit provider counts. I did not run a live current-main Discord repro in this read-only review.

PR rating
Overall: 🦐 gold shrimp
Proof: 🐚 platinum hermit ✨ media proof bonus
Patch quality: 🦐 gold shrimp
Summary: The PR has useful real Discord proof and a plausible implementation, but stale focused tests block merge readiness.

Rank-up moves:

  • Update extensions/discord/src/monitor/model-picker.test.ts for provider/model pagination rows and preserved custom-id state.
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.

Real behavior proof
Sufficient (recording): The PR body attachment is a real Discord recording showing /models navigating to model page 2/2, selecting a later model, and applying the change; it does not separately show provider-grid pagination.

Mantis proof suggestion
A short visible proof of the provider grid and model picker pagination would materially help review because this is Discord component UI behavior. A maintainer can ask Mantis to capture proof by posting a new PR comment that starts with the OpenClaw Mantis account mention, followed by:

visual task: verify the Discord /models picker can navigate provider and model pages beyond the first 25 entries while preserving selected model/runtime state.

Risk before merge

  • Focused picker tests still encode the old behavior where provider pages never render nav custom IDs, so the branch needs test updates before CI can meaningfully protect the new contract.
  • The inspected Discord recording shows model-page pagination and model apply, but it does not show a provider grid with more than 25 providers.
  • The protected maintainer label means explicit maintainer handling is still required before merge.

Maintainer options:

  1. Decide the mitigation before merge
    Land the pagination fix after the focused Discord model picker tests cover provider and model navigation rows, preserved state, and the current-model initial-page behavior.
  2. Pause or close
    Do not merge this PR until maintainers decide whether the risk is worth taking.

Next step before merge
A repair worker can make the narrow test update without deciding product direction; maintainers still need to review before merge because the PR has a protected label.

Security
Cleared: The diff only changes Discord picker state/rendering/interaction code and does not touch security-sensitive or supply-chain surfaces.

Review findings

  • [P2] Update picker tests for pagination rows — extensions/discord/src/monitor/model-picker.view.ts:490
Review details

Best possible solution:

Land the pagination fix after the focused Discord model picker tests cover provider and model navigation rows, preserved state, and the current-model initial-page behavior.

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

Yes at source level: current main computes provider/model pages but exposes no nav controls, and the focused tests explicitly assert navigation is absent for over-limit provider counts. I did not run a live current-main Discord repro in this read-only review.

Is this the best way to solve the issue?

Yes directionally: adding Discord component pagination at the picker layer is the narrow maintainable fix for the 25-button/select-option limits. The implementation should not merge until the focused tests are updated to match and protect that new contract.

Label changes:

  • add proof: sufficient: Contributor real behavior proof is sufficient. The PR body attachment is a real Discord recording showing /models navigating to model page 2/2, selecting a later model, and applying the change; it does not separately show provider-grid pagination.
  • add proof: 🎥 video: Contributor real behavior proof includes video or recording evidence. The PR body attachment is a real Discord recording showing /models navigating to model page 2/2, selecting a later model, and applying the change; it does not separately show provider-grid pagination.
  • add rating: 🦐 gold shrimp: Current PR rating is 🦐 gold shrimp because proof is 🐚 platinum hermit, patch quality is 🦐 gold shrimp, and The PR has useful real Discord proof and a plausible implementation, but stale focused tests block merge readiness.
  • add status: ⏳ waiting on author: ClawSweeper has contributor-facing work open and is waiting for author action. Sufficient (recording): The PR body attachment is a real Discord recording showing /models navigating to model page 2/2, selecting a later model, and applying the change; it does not separately show provider-grid pagination.
  • remove rating: 🧂 unranked krab: Current PR rating is rating: 🦐 gold shrimp, so this older rating label is no longer current.
  • remove status: 📣 needs proof: Current PR status label is status: ⏳ waiting on author.

Label justifications:

  • P2: This is a normal-priority Discord picker usability bug with limited blast radius and a focused repair path.
  • rating: 🦐 gold shrimp: Current PR rating is 🦐 gold shrimp because proof is 🐚 platinum hermit, patch quality is 🦐 gold shrimp, and The PR has useful real Discord proof and a plausible implementation, but stale focused tests block merge readiness.
  • status: ⏳ waiting on author: ClawSweeper has contributor-facing work open and is waiting for author action. Sufficient (recording): The PR body attachment is a real Discord recording showing /models navigating to model page 2/2, selecting a later model, and applying the change; it does not separately show provider-grid pagination.
  • proof: sufficient: Contributor real behavior proof is sufficient. The PR body attachment is a real Discord recording showing /models navigating to model page 2/2, selecting a later model, and applying the change; it does not separately show provider-grid pagination.
  • proof: 🎥 video: Contributor real behavior proof includes video or recording evidence. The PR body attachment is a real Discord recording showing /models navigating to model page 2/2, selecting a later model, and applying the change; it does not separately show provider-grid pagination.

Full review comments:

  • [P2] Update picker tests for pagination rows — extensions/discord/src/monitor/model-picker.view.ts:490
    The branch now renders nav buttons for provider/model pagination, but extensions/discord/src/monitor/model-picker.test.ts still has the old over-limit provider test asserting no ;a=nav; custom IDs. Please update the focused picker tests to cover the new provider/model pagination rows and preserved state so CI exercises the new contract instead of the obsolete one.
    Confidence: 0.91

Overall correctness: patch is incorrect
Overall confidence: 0.84

Acceptance criteria:

  • node scripts/run-vitest.mjs extensions/discord/src/monitor/model-picker.test.ts extensions/discord/src/monitor/native-command.model-picker.test.ts
  • git diff --check

What I checked:

  • Current main paginates data but renders no navigation: Current main has provider/model page helpers, but renderDiscordModelPickerProvidersView only builds provider rows and returns a footer saying all providers are shown, with no navigation row for later pages. (extensions/discord/src/monitor/model-picker.view.ts:503, d0a74dbfbe4d)
  • PR adds pagination rows: The PR head adds buildPaginationRow, inserts model navigation after the model select, and appends provider navigation when there is more than one page. (extensions/discord/src/monitor/model-picker.view.ts:296, 8ce7db9fa41a)
  • PR handles navigation interactions: The PR head handles nav actions for provider and model views, preserving provider page, runtime, and pending model index through rerendering. (extensions/discord/src/monitor/native-command-model-picker-interaction.ts:261, 8ce7db9fa41a)
  • Tests still assert old rendering contract: The focused picker test still has does not render navigation buttons even when provider count exceeds one page and expects no ;a=nav; custom IDs, while the PR intentionally adds those controls. (extensions/discord/src/monitor/model-picker.test.ts:399, d0a74dbfbe4d)
  • PR changes no tests: The branch changes five Discord model picker production files and no test files, so the old assertions remain untouched on the PR diff. (8ce7db9fa41a)
  • Real Discord proof inspected: The PR body attachment downloaded as a 26.95s QuickTime recording and the contact sheet shows Discord /models on model page 2/2, prev/next controls, selecting a later OpenAI model, and applying the model switch.

Likely related people:

  • Peter Steinberger: The current main Discord picker state/view/test files were added in commit e2c92be, and Peter also carried an earlier model picker refactor in commit 4629ab3. (role: introduced current implementation and recent area contributor; confidence: high; commits: e2c92be90b06, 4629ab3d8af5; files: extensions/discord/src/monitor/model-picker.state.ts, extensions/discord/src/monitor/model-picker.view.ts, extensions/discord/src/monitor/model-picker.test.ts)
  • Vincent Koc: Commit 3a7d093 recently touched extensions/discord/src/monitor/model-picker.test.ts and model-picker.ts to keep the Discord model picker provider runtime lazy. (role: recent adjacent test contributor; confidence: medium; commits: 3a7d0938c629; files: extensions/discord/src/monitor/model-picker.test.ts, extensions/discord/src/monitor/model-picker.ts)
  • Tak Hoffman: Commits 67fba9c and ae2b1ae fixed model picker provider compatibility and alias regressions in the shared model picker flow path. (role: adjacent model picker regression contributor; confidence: medium; commits: 67fba9c5e173, ae2b1aef10c4; files: src/flows/model-picker.ts, src/commands/model-picker.test.ts, src/agents/reply/directive-handling.model-picker.ts)
  • Sarah Fortune: The author also has merged current-main work on the related /models provider-auth pre-warm path in commit 55cfe00, which is adjacent to the picker data surface. (role: recent adjacent /models contributor; confidence: medium; commits: 55cfe00a3a40; files: src/agents/auth-profiles-watcher.ts, src/gateway/server-startup-post-attach.ts)

Codex review notes: model gpt-5.5, reasoning high; reviewed against d0a74dbfbe4d.

@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. labels May 22, 2026
@clawsweeper

clawsweeper Bot commented May 22, 2026

Copy link
Copy Markdown
Contributor

ClawSweeper PR egg

🔥 Warming up: real-behavior proof passed; findings, security review, or rank-up moves are still in progress.

Hatch command

Comment @clawsweeper hatch when this PR is hatchable.

Hatchability rules:

  • Merged PRs are hatchable.
  • Open PRs are hatchable when they are status: 👀 ready for maintainer look, status: 🚀 automerge armed, or labeled clawsweeper:automerge.
  • Closed unmerged PRs are hatchable only when one of those hatchable labels is still present in the durable record.
What is this egg doing here?
  • Eggs appear after the PR passes real-behavior proof. It is here for vibes, not verdicts: it does not change labels, ratings, merge decisions, or automation.
  • The shell reacts to review momentum: open follow-up work warms it up, re-review makes it wobble, and a clean final review lets it hatch.
  • Hatchability usually comes from sufficient real-behavior proof, no blocking P0/P1/P2 findings, no security attention needed, and clean correctness. A merged PR is already final, so merge makes the egg hatchable independently.
  • The hatch is seeded from this repository and PR number, so the same PR keeps the same creature; the reviewed head SHA can only change safe visual details.
  • Rarity is just collectible sparkle: 🥚 common, 🌱 uncommon, 💎 rare, ✨ glimmer, and 🌈 legendary.

@sjf sjf force-pushed the sjf-my21-discord-picker branch from 93a6272 to 3111e87 Compare May 22, 2026 05:37
@sjf sjf changed the title Add pagination to the discord model picker fix(models) Fix model list is truncated in picker in discord May 22, 2026
@sjf sjf changed the title fix(models) Fix model list is truncated in picker in discord fix(models) Discord model picker doesn't list all models May 22, 2026
@sjf

sjf commented May 22, 2026

Copy link
Copy Markdown
Contributor Author

@clawsweeper review please

@clawsweeper

clawsweeper Bot commented May 22, 2026

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper assist is taking a look at your question.

I queued a lightweight read-only assist pass. It will post a separate answer comment and will not edit the durable ClawSweeper review comment or trigger close, merge, repair, label, or branch changes.

Request: review please

@sjf

sjf commented May 22, 2026

Copy link
Copy Markdown
Contributor Author

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented May 22, 2026

Copy link
Copy Markdown
Contributor

ClawSweeper assist: This asks for a full correctness review, so use @clawsweeper review; a newer @clawsweeper re-review comment is already present on #85138 and should trigger the normal review path.

Evidence:

Suggested next action: Wait for the @clawsweeper re-review result, or use @clawsweeper review again if no durable review comment updates.


Source: #85138 (comment)
Assist model: gpt-5.5, reasoning low.

@clawsweeper

clawsweeper Bot commented May 22, 2026

Copy link
Copy Markdown
Contributor

🦞🧹
ClawSweeper re-review requested.

I asked ClawSweeper to review this item again.
Action: item re-review queued (workflow sweep.yml, event repository_dispatch).
Result: the existing ClawSweeper review comment will be edited in place when the review finishes.

Re-review progress:

@clawsweeper clawsweeper Bot added proof: sufficient ClawSweeper judged the real behavior proof convincing. proof: 🎥 video Contributor real behavior proof includes video or recording evidence. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. and removed 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. labels May 22, 2026
@sjf sjf merged commit 49e3f8c into main May 22, 2026
137 of 145 checks passed
@sjf sjf deleted the sjf-my21-discord-picker branch May 22, 2026 06:50
SebTardif pushed a commit to SebTardif/openclaw that referenced this pull request May 24, 2026
)

* Add pagination to the discord model picker

* Ensure current model is shown as selected in the picker when its first loaded
SebTardif pushed a commit to SebTardif/openclaw that referenced this pull request May 24, 2026
)

* Add pagination to the discord model picker

* Ensure current model is shown as selected in the picker when its first loaded
SebTardif pushed a commit to SebTardif/openclaw that referenced this pull request May 24, 2026
)

* Add pagination to the discord model picker

* Ensure current model is shown as selected in the picker when its first loaded
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request May 24, 2026
)

* Add pagination to the discord model picker

* Ensure current model is shown as selected in the picker when its first loaded
galiniliev pushed a commit to galiniliev/openclaw that referenced this pull request May 25, 2026
)

* Add pagination to the discord model picker

* Ensure current model is shown as selected in the picker when its first loaded
SebTardif pushed a commit to SebTardif/openclaw that referenced this pull request May 26, 2026
)

* Add pagination to the discord model picker

* Ensure current model is shown as selected in the picker when its first loaded
SebTardif pushed a commit to SebTardif/openclaw that referenced this pull request May 26, 2026
)

* Add pagination to the discord model picker

* Ensure current model is shown as selected in the picker when its first loaded
SebTardif pushed a commit to SebTardif/openclaw that referenced this pull request May 26, 2026
)

* Add pagination to the discord model picker

* Ensure current model is shown as selected in the picker when its first loaded
jameslcowan pushed a commit to jameslcowan/openclaw that referenced this pull request Jun 2, 2026
)

* Add pagination to the discord model picker

* Ensure current model is shown as selected in the picker when its first loaded
SYU8384 pushed a commit to SYU8384/openclaw that referenced this pull request Jun 3, 2026
)

* Add pagination to the discord model picker

* Ensure current model is shown as selected in the picker when its first loaded
sablehead pushed a commit to sablehead/openclaw that referenced this pull request Jun 10, 2026
)

* Add pagination to the discord model picker

* Ensure current model is shown as selected in the picker when its first loaded
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

channel: discord Channel integration: discord maintainer Maintainer-authored PR P2 Normal backlog priority with limited blast radius. proof: sufficient ClawSweeper judged the real behavior proof convincing. proof: 🎥 video Contributor real behavior proof includes video or recording evidence. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. size: S status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant