Repository navigation
feat(gui): add suggested combos to the existing workspace - #8914
Conversation
Co-authored-by: Andrew (agent) <wsy1731095638@gmail.com>
|
Caution Review failedThe pull request is closed.
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. |
|
✅ Deterministic PR hygiene checks passed. |
Co-authored-by: Andrew (agent) <wsy1731095638@gmail.com>
Co-authored-by: Andrew (agent) <wsy1731095638@gmail.com>
…tions Co-authored-by: Andrew (agent) <wsy1731095638@gmail.com>
Co-authored-by: Andrew (agent) <wsy1731095638@gmail.com>
Co-authored-by: Andrew (agent) <wsy1731095638@gmail.com>
Co-authored-by: Andrew (agent) <wsy1731095638@gmail.com>
Co-authored-by: Andrew (agent) <wsy1731095638@gmail.com>
Co-authored-by: Andrew (agent) <wsy1731095638@gmail.com>
Re-read persisted policy after every exclusion write outcome and keep suggestion actions gated until the read succeeds. Co-authored-by: Andrew (agent) <wsy1731095638@gmail.com>
Co-authored-by: Andrew (agent) <wsy1731095638@gmail.com>
The dashboard-session denial test covered only the raw admin token. Add enrolled and resumed remembered-admin sessions, which derive from the admin token, and assert 403 with config.json unchanged for the exclusion PUT and both suggestion saves (append, create) plus the policy read. Co-authored-by: Andrew (agent) <wsy1731095638@gmail.com>
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
Maintainer integration record: squash-merged on exact head 16f9410 with all 33 required checks green, same-reviewer approval (F28 confirm), and |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 16f9410023
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| const family = (window.label ?? "").toLowerCase().split(/[\s(]/)[0]; | ||
| const matches = window.modelId | ||
| ? window.modelId.toLowerCase() === model.toLowerCase() | ||
| : !family || window.labelKey !== undefined || model.toLowerCase().startsWith(family); | ||
| return matches && window.percent !== undefined ? [window.percent] : []; |
There was a problem hiding this comment.
Match quota windows by scope rather than display-label prefixes
For providers with account-wide custom quota windows, this predicate discards valid quota measurements because their display labels do not start with the model name. For example, fetchMinimaxQuota in src/providers/quota/vendor-probes-key.ts emits Coding Plan 5-hour and Coding Plan weekly; neither matches a MiniMax-* model, so the suggestion receives no remaining percentage despite having fresh quota data. Consequently, same-tier suggestions retain catalog order instead of quota order and can put an exhausted provider ahead of an available one. Distinguish account-wide windows from explicitly model-scoped windows rather than inferring scope from arbitrary display labels.
Useful? React with 👍 / 👎.
Summary
Carries the suggested-combos part of feat(gui): Combos overview with suggested combos, provider exclusion and a latest-per-family filter #8739 per the owner's November 15 decision, originally based on
79a85fc97aa18a016b36965515d33f615b77a8c6and now merged withdevat9646ad3e4b. The existing Combos workspace now includes Generate, Add to combo, and browser-local dismissals.Exclude providers filters both creation and extension suggestions. The dashboard-only GET and PUT endpoints persist
comboSuggestionExcludedProvidersinconfig.json. Existing targets stay in place.Carries applicable review fixes for metered targets, generated ID length, distinct provider/model targets, exclusion state on proxy changes, and unsaved edits. Scope excludes the overview and Advanced navigation changes, the row editor, and Latest per family.
Every suggestion can incur paid credits or usage. Generate requires explicit consent to save, and Add to combo requires stored consent. The dashboard-only save route checks consent and exclusions under the config lock and marks every added target as metered.
Consistency contract
The server is authoritative.
src/server/management/combo-suggestion-routes.tsenforces the dashboard session, explicit Generate consent, stored consent for Add to combo, provider exclusions under the persisted-config lock, andmetered: trueon every suggested target. Dashboard gating is advisory: the workspace can briefly offer an action the server then refuses (for example after a remount, or after a change from another tab or the CLI). The server answers 409, and the workspace recovers by re-reading the suggestion policy and combos and showing a message. Client-side staleness windows are accepted as long as the server cannot be bypassed, so this PR adds no further client race hardening. The contract is documented instructure/dashboard-and-usage.md,structure/gui-and-management-api.md, and the English and Spanish combo guides.Verification
Run on head
9c597f3f8b:6dd143e31band passed after the fix.--isolate: core/Lab boundary, file-size ratchet, test layout, test-layout tooling, and Spanish localization.git diff --check, GUI lint, i18n lint, GUI build, and docs-site build passed.Checklist
Co-authored-by: Andrew (agent) wsy1731095638@gmail.com