Repository navigation
Studio: add prompt queue controls and composer preferences - #10980
Conversation
This comment has been minimized.
This comment has been minimized.
|
@codex review |
|
Hold merge for one provider-routing regression. The hosted CPU A/B checks production queue functions with controlled transport between Same three prompts in each revision's actual queue component, with isolated state and identical viewport and theme. |
|
Verified the queue/composer changes and repaired the hosted-model routing regression. Current head:
Commands, versions, A/B scripts, and logs The screenshots use the actual queue and chat-settings components from separate frontend installs at merge base With identical dependencies, eager startup JavaScript changes from 5381.0 to 5384.0 KiB raw and 1609.0 to 1610.1 KiB compressed, with 84 eager chunks on both sides. The raw budget covers this measured increase; the compressed budget is unchanged. CI follow-up at 9e137a6Pre-commit was unable to apply formatting to Reverification passes 408 Python checks (4 skipped), 101 focused frontend checks, production/test TypeScript, production build, startup budget, and the pinned repository formatter. The same Chrome composer sequence passed 10 consecutive local runs. The earlier macOS Chrome failure remains visible above; this push starts a fresh compatibility matrix without relaxing its assertions. The previous head received a no-major-issues review. A fresh review is required for this head. The UI evidence remains applicable: the frontend trees are unchanged across both the base update and this follow-up. Queue form regression at 0739d85Confirmed that clicking a reorder handle submitted the enclosing composer form and cleared an unsent draft. The new browser regression fails on The complete queue browser suite passes in Chromium, Firefox, WebKit, Google Chrome and Microsoft Edge after the fix, including mouse and keyboard activation and rejected steering with an unsent draft. Also passed: 208 focused frontend tests, 25 Python guards, production/test TypeScript, production build, bundle budget, Ruff lint and pinned formatting. The component appearance is unchanged; the earlier screenshots still represent its layout. Pre-commit and all ten macOS browser suites passed at CompletedLatest-head review found no major issues on Squash-merged through GitHub without a protection bypass as |
|
@codex review |
|
pre-commit.ci run |
|
Codex Review: Didn't find any major issues. Breezy! Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
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". |
|
@codex review |
|
@codex review |
|
Codex Review: Didn't find any major issues. More of your lovely PRs please. Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
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". |
mahiatlinux
left a comment
There was a problem hiding this comment.
LGTM! Ready to merge, all manually checked.
The queue controls added in #10980 render hardcoded English while Settings > Chat > Composer ships translated Queue and Steer labels in all 12 locales, so a Japanese user reads 方向を変更 in Settings and "Steer" on the button next to it. - Route the queue list, reorder announcements, Suspense fallback and the composer send/queue labels through useT, and add 39 promptQueue keys to every locale, reusing each catalog's existing Queue/Steer wording. - Save a queued-prompt edit with the configured send shortcut instead of a hardcoded Cmd/Ctrl+Enter. This reuses composerSubmitIntent, which already covers the IME, repeat and Shift+Enter guards. - Keep the parked-send release synchronous and mark it, so thread.tsx stops reporting one more react-hooks/set-state-in-effect than before. Adds tests/studio/playwright_queue_localization.py, which fails on the current code for both behaviours and passes here.
The queue controls added in #10980 render hardcoded English while Settings > Chat > Composer ships translated Queue and Steer labels in all 12 locales, so a Japanese user reads 方向を変更 in Settings and "Steer" on the button next to it. - Route the queue list, reorder announcements, Suspense fallback and the composer send/queue labels through useT, and add 39 promptQueue keys to every locale, reusing each catalog's existing Queue/Steer wording. - Save a queued-prompt edit with the configured send shortcut instead of a hardcoded Cmd/Ctrl+Enter. This reuses composerSubmitIntent, which already covers the IME, repeat and Shift+Enter guards. - Keep the parked-send release synchronous and mark it, so thread.tsx stops reporting one more react-hooks/set-state-in-effect than before. Adds tests/studio/playwright_queue_localization.py, which fails on the current code for both behaviours and passes here.
…11117) * Studio: localize the prompt queue view and align its editor shortcut The queue controls added in #10980 render hardcoded English while Settings > Chat > Composer ships translated Queue and Steer labels in all 12 locales, so a Japanese user reads 方向を変更 in Settings and "Steer" on the button next to it. - Route the queue list, reorder announcements, Suspense fallback and the composer send/queue labels through useT, and add 39 promptQueue keys to every locale, reusing each catalog's existing Queue/Steer wording. - Save a queued-prompt edit with the configured send shortcut instead of a hardcoded Cmd/Ctrl+Enter. This reuses composerSubmitIntent, which already covers the IME, repeat and Shift+Enter guards. - Keep the parked-send release synchronous and mark it, so thread.tsx stops reporting one more react-hooks/set-state-in-effect than before. Adds tests/studio/playwright_queue_localization.py, which fails on the current code for both behaviours and passes here. * Studio: trim the queueing tooltip and tidy the queue controls - Shorten the queueing option tooltip in every locale. It now reads in two lines instead of four. - Drop the queue editor radius from 24px to 17.6px and move the resize grip out to the corner, stopping short of the radius so it stays visible. - Render the resume icon at 14px and centre its glyph. Also removes the stray leading space that pushed the Resume queue label out of line with the other menu items. - Use the standard arrow for the composer send button when follow-ups steer, instead of a separate corner arrow. * Studio: keep the queued-prompt draft when an IME consumes Escape Hoisting the Escape branch above the composition guard meant Escape pressed to close an IME candidate window cancelled the edit and dropped the draft. Check the native composition state first, as the handler did before, and cover it in the queue regression test. * Studio: gate the queue editor on composition state and localize Send - Track composition start and end in the queued-prompt editor. A candidate-confirming Enter can arrive with isComposing false and no key code 229, and composerSubmitIntent assumes the caller already guards that, so Enter as Save could commit the pre-edit text. Mirrors the composer's own gate. - Use the localized send label for the composer send buttons. aria-label overrides the tooltip text, so screen readers still read English while the visible tooltip was translated. * Studio: recover the queue editor from a stuck IME composition An IME that never sends compositionend left composingRef set, and every later Enter took the gate's early return, so the send shortcut could no longer save the edit. Arm a watchdog whenever composing is set, reset on blur, and do not re-arm from the gated Enter, since a candidate-confirming Enter follows its composition immediately.
…#10980) Add queue steering and reordering controls, composer preferences, and draft preview. Preserve explicit model selections during local loading and prevent row controls from submitting unsent drafts.
…nslothai#11117) * Studio: localize the prompt queue view and align its editor shortcut The queue controls added in unslothai#10980 render hardcoded English while Settings > Chat > Composer ships translated Queue and Steer labels in all 12 locales, so a Japanese user reads 方向を変更 in Settings and "Steer" on the button next to it. - Route the queue list, reorder announcements, Suspense fallback and the composer send/queue labels through useT, and add 39 promptQueue keys to every locale, reusing each catalog's existing Queue/Steer wording. - Save a queued-prompt edit with the configured send shortcut instead of a hardcoded Cmd/Ctrl+Enter. This reuses composerSubmitIntent, which already covers the IME, repeat and Shift+Enter guards. - Keep the parked-send release synchronous and mark it, so thread.tsx stops reporting one more react-hooks/set-state-in-effect than before. Adds tests/studio/playwright_queue_localization.py, which fails on the current code for both behaviours and passes here. * Studio: trim the queueing tooltip and tidy the queue controls - Shorten the queueing option tooltip in every locale. It now reads in two lines instead of four. - Drop the queue editor radius from 24px to 17.6px and move the resize grip out to the corner, stopping short of the radius so it stays visible. - Render the resume icon at 14px and centre its glyph. Also removes the stray leading space that pushed the Resume queue label out of line with the other menu items. - Use the standard arrow for the composer send button when follow-ups steer, instead of a separate corner arrow. * Studio: keep the queued-prompt draft when an IME consumes Escape Hoisting the Escape branch above the composition guard meant Escape pressed to close an IME candidate window cancelled the edit and dropped the draft. Check the native composition state first, as the handler did before, and cover it in the queue regression test. * Studio: gate the queue editor on composition state and localize Send - Track composition start and end in the queued-prompt editor. A candidate-confirming Enter can arrive with isComposing false and no key code 229, and composerSubmitIntent assumes the caller already guards that, so Enter as Save could commit the pre-edit text. Mirrors the composer's own gate. - Use the localized send label for the composer send buttons. aria-label overrides the tooltip text, so screen readers still read English while the visible tooltip was translated. * Studio: recover the queue editor from a stuck IME composition An IME that never sends compositionend left composingRef set, and every later Enter took the gate's early return, so the send shortcut could no longer save the edit. Arm a watchdog whenever composing is set, reset on blur, and do not re-arm from the gated Enter, since a candidate-confirming Enter follows its composition immediately.



Summary
Make queued follow-ups easier to manage and allow them to be added while a local model loads. Previously, loading rejected follow-ups until it finished, and queue controls offered limited editing and ordering actions.
Steer interrupts the current response and sends the chosen follow-up next while preserving other pending prompts. Comparison mode uses the send-shortcut and preview preferences; Queue/Steer applies to single chats. Settings labels cover all 12 locales.
Failure handling
Regression simulations reproduced and fixed these issues:
Shortcuts
Defaults remain Enter to send and Queue for follow-ups. Shift+Enter inserts a newline. Formatted preview preserves the submitted text and does not fetch draft images or activate links.
Validation
Local tests ran on macOS in an isolated Python environment under
temp/queue-validation:1811677f(0 of 3 follow-ups accepted) and passes on the updated code (3 of 3 accepted).The final visual adjustment was checked in the live preview, including reordering and computed border styles. Its production build, focused ESLint, and bundle budget checks pass.
The queueing-menu follow-up passes targeted action checks in Chromium, Firefox, and WebKit, plus TypeScript and focused lint checks. The checks cover preference persistence after reload, unchanged queue contents, paused-queue recovery, editing, steering, and reordering. Full suites were not rerun for this follow-up.
The Audio lifecycle review follow-up reproduces two failing assertions before the fix and passes 33 targeted checks afterward. These cover draft retention, legacy and explicit lifecycle phases, local/external isolation, stale boundaries, and chat auto-load on initial acquisition and retry. Production/test TypeScript and focused ESLint checks pass. Full suites were not rerun and hosted CI was not awaited.
The provider-switch follow-up reproduces immediate dispatch to the outgoing hosted provider before the fix. All 47 targeted checks pass afterward, including Queue/Steer during loading, failure retention, preparation, empty/local selections, existing external queues, lifecycle boundaries, and pending intent deduplication. Production/test TypeScript and focused ESLint checks pass. No full-suite or hosted-CI wait was used.
The suggested uncached pasted-text race does not occur on the current production path: the only factory registers the file and caches its text synchronously. All 96 production-path simulations preserve the latest follow-up intent with zero
File.text()calls, and unregistered text files cannot enter that fallback. No code change was made for that finding.The new Composer compatibility workflow runs the engine regressions and browser suites on Linux, macOS, and Windows, plus native Safari on macOS. Hosted validation is incomplete. Native Safari now passes the queue controls and drag sequence, but its composer test left the input empty after a modifier shortcut. The harness now explicitly focuses the input, releases Command after each shortcut, and captures input traces. Those harness changes pass through Chrome; native Safari and cross-platform results still need separate verification. Linux and Windows have not completed. Local native Safari automation is disabled, so WebKit results are not native Safari certification. Simulations use controlled runtime state and transport; live model inference and hardware performance were not tested.
Performance and scope
Queue controls load on demand. With identical dependencies, base
1811677fuses 5,374.5 KiB raw / 1,608.2 KiB compressed startup JavaScript; this branch uses 5,377.1 KiB / 1,609.2 KiB. The increase is about 2.6 KiB raw and 1.0 KiB compressed. The base already exceeded the raw budget; raise it by 10,000 bytes to cover that overage and this measured increase. The transfer budget is unchanged.Changes are confined to the Studio frontend, tests, and CI. No inference kernels, backend hardware paths, or model-serving implementations are changed. These results improve confidence but do not establish universal compatibility or zero regression risk.