Skip to content

Studio: add prompt queue controls and composer preferences - #10980

Merged
mahiatlinux merged 21 commits into
mainfrom
feat/prompt-queue-actions
Sep 15, 2026
Merged

mahiatlinux merged 21 commits into
mainfrom
feat/prompt-queue-actions

Conversation

@shimmyshimmer

@shimmyshimmer shimmyshimmer commented Sep 15, 2026 •

Copy link
Copy Markdown
Member

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.

  • Add inline Steer and delete controls, with Edit, Copy, and a Turn on/off queueing preference in the three-dot menu. The toggle changes how new follow-ups are submitted without interrupting the response or changing pending prompts. Resume is offered only for an already paused queue.
  • Reorder with smooth mouse and touch dragging, or keyboard arrows, Home, and End. The dragged prompt fades without an added background, border, or shadow. Queue controls stay borderless on hover, with background highlights for keyboard focus. Commit the order on drop and handle cancellation, live queue changes, and reduced motion.
  • Add persistent plain-text/formatted-preview, context-usage visibility, send-shortcut, and Queue/Steer preferences in Settings > Chat > Composer and the composer menu.
  • Preserve prompt settings while loading and dispatch follow-ups in order after the current response ends.

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:

  • Model-switch preparation could accept a prompt before a later cleanup deleted it. Keep the draft until the final loading boundary.
  • Audio load/eject dialogs used the legacy lifecycle default, allowing local drafts to clear before the later queue cleanup. Default lifecycle ownership to preparation; chat auto-load explicitly permits queueing, including when it retries after another load.
  • Switching from a hosted provider to a local model could classify new follow-ups using the outgoing provider and send them immediately. Classify the pending load using its selected model, defer dispatch until loading finishes, and retain local failure protection. Existing hosted-provider queue targets retain their captured provider.
  • A failed initial load could delete accepted follow-ups. Retain them paused and editable.
  • A failed or cancelled manual load could let local follow-ups run on a restored model. Require an explicit resume for those prompts, while external-provider responses can continue.
  • Finishing IME composition could prematurely save a queued-message edit. Ignore composition and repeated Enter events.
  • Resuming a blocked local follow-up could invalidate an external prompt's pending document check and strand the queue. Invalidate only the failed local attempt.
  • CSS zoom made dragged rows move farther than the pointer. Normalize drag, scroll, and settling coordinates to keep movement aligned.
  • Opening the queue menu in a scaled right-to-left layout could select Edit on pointer release. Require a separate click on a menu item.
  • Changing Queue/Steer or the active-response state during settings hydration could reserve the same draft twice. Keep one reservation per thread and prompt, updating its intent without starting another hydration request.

Shortcuts

Send setting Send Opposite Queue/Steer behavior for one message
Enter Enter Cmd/Ctrl+Enter
Cmd/Ctrl+Enter Cmd/Ctrl+Enter Cmd/Ctrl+Shift+Enter

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:

  • The same loading assertion fails on base 1811677f (0 of 3 follow-ups accepted) and passes on the updated code (3 of 3 accepted).
  • Earlier full validation passed 7,595 frontend tests and 23 Python queue contract checks, including 202 focused queue/composer tests. The review follow-up passes 16 targeted regressions and production/test TypeScript checks; full suites were not rerun.
  • Typecheck, production build, locale parity, focused ESLint, Python lint, and workflow syntax checks pass.
  • Queue and composer simulations pass in Chromium, Firefox, WebKit, installed Chrome, and a temporary extracted Edge build.
  • Coverage includes delayed hydration, local/external queue isolation, load failures, rollback, cancellation, stale dispatch attempts, settings capture, menu editing, IME, keyboard/pointer races, touch dragging, RTL, zoom, narrow layouts, reduced motion, and edge scrolling.
  • Drag measurements cover 3, 25, 100, and 500 prompts. No row-style updates continue after the drag and settling animations finish.

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 1811677f uses 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.

@chatgpt-codex-connector

This comment has been minimized.

chatgpt-codex-connector[bot]

This comment was marked as resolved.

chatgpt-codex-connector[bot]

This comment was marked as resolved.

chatgpt-codex-connector[bot]

This comment was marked as resolved.

chatgpt-codex-connector[bot]

This comment was marked as resolved.

@shimmyshimmer

Copy link
Copy Markdown
Member Author

@codex review

chatgpt-codex-connector[bot]

This comment was marked as resolved.

@Imagineer99

Copy link
Copy Markdown
Member

Hold merge for one provider-routing regression. The hosted CPU A/B checks production queue functions with controlled transport between 1811677f and 564e9d2. Loading-time follow-ups improve from 0/3 accepted to 3/3 with ordered dispatch, but explicitly selecting a hosted model during a pending local load incorrectly makes new follow-ups local. Preserve the latest explicit model selection before merging. Native Safari passes the unchanged interaction suite after a 27-second cold start, pointing to the original 10-second readiness timeout rather than a queue interaction failure.

Same three prompts in each revision's actual queue component, with isolated state and identical viewport and theme.

BEFORE and AFTER queue controls

@mahiatlinux

mahiatlinux commented Sep 15, 2026 •

Copy link
Copy Markdown
Contributor

Verified the queue/composer changes and repaired the hosted-model routing regression. Current head: 0739d854ccc496393fac1a99827b2ef908741b25.

  • An explicit hosted-model selection during a local load now owns subsequent follow-ups, including after local-load failure. Queue and Steer both fail the new regression on 564e9d2f and pass after the fix. Store checks cover switching away and back to the original provider.
  • Merged 0ab40fee and resolved the bundle-budget conflict. Fixed the bounded apt installation, CI suite discovery, stale queue contracts, and cold-start readiness waits.
  • The same production queue-engine A/B accepts 0/3 loading-time follow-ups on both base revisions and 3/3 on the original head, prospective merge, and repair, then dispatches them in order. Transport and runtime state are controlled in this experiment.
  • Local validation: 7,667 frontend tests, 321 focused Python checks, 67 focused queue/store checks, and 34 pasted-text checks pass. Production build, production/test TypeScript, locale parity, Python lint/format, and startup budget pass. ESLint reports the same 62 existing diagnostics on original head and repair, with no additions.
  • Chromium 151, Firefox 153, Google Chrome 153, Microsoft Edge 153, and WebKit 26.5 pass the local queue and composer browser suites. Native Safari 26.6.2 passes on macOS. Coverage includes keyboard/pointer reordering, touch, cancellation, IME, RTL, zoom, preview, preferences, and persistence.

Commands, versions, A/B scripts, and logs

The screenshots use the actual queue and chat-settings components from separate frontend installs at merge base 0ab40fee and repair 6673a5b5, with the same deterministic state and a 1000×750 Chromium viewport. They show component behavior without model inference. Before has no Steer buttons or Composer settings; after has three Steer buttons and the new settings section.

Queue controls before and after

Composer settings before and after

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 9e137a6

Pre-commit was unable to apply formatting to tests/python/test_installer_differential_comparer.py, newly added on main after the first review pass. Reproduced the five-line formatting change against CI's exact merge. Merged f7ab2098 and applied that mechanical fix; no frontend files changed from 6673a5b5.

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 0739d85

Confirmed that clicking a reorder handle submitted the enclosing composer form and cleared an unsent draft. The new browser regression fails on 9e137a6c with one unexpected submission. The three direct row controls now use type="button"; the menu trigger already receives that type from Radix. Radix intentionally leaves the tooltip trigger type unset.

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 9e137a6c, resolving the earlier intermittent Chrome typing failure without changing its assertion. A fresh review is required for 0739d854cc.

Completed

Latest-head review found no major issues on 0739d854ccc496393fac1a99827b2ef908741b25. Final approval was recorded on that exact head. Pre-commit passed; no checks were failing and no review threads remained unresolved at approval. Other CI jobs were pending, and GitHub reported no required checks.

Squash-merged through GitHub without a protection bypass as f4958cee8.

@mahiatlinux

Copy link
Copy Markdown
Contributor

@codex review

@mahiatlinux

Copy link
Copy Markdown
Contributor

pre-commit.ci run

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Breezy!

Reviewed commit: 6673a5b5d2

ℹ️ 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".

@mahiatlinux

Copy link
Copy Markdown
Contributor

@codex review

chatgpt-codex-connector[bot]

This comment was marked as resolved.

@mahiatlinux

Copy link
Copy Markdown
Contributor

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. More of your lovely PRs please.

Reviewed commit: 0739d854cc

ℹ️ 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".

@mahiatlinux
mahiatlinux self-requested a review September 15, 2026 23:09

@mahiatlinux mahiatlinux left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! Ready to merge, all manually checked.

@mahiatlinux
mahiatlinux merged commit f4958ce into main Sep 15, 2026
42 of 43 checks passed
@mahiatlinux
mahiatlinux deleted the feat/prompt-queue-actions branch September 15, 2026 23:09
shimmyshimmer added a commit that referenced this pull request Sep 16, 2026
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.
shimmyshimmer added a commit that referenced this pull request Sep 16, 2026
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.
shimmyshimmer added a commit that referenced this pull request Sep 16, 2026
…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.
shaojun pushed a commit to shaojun/unsloth that referenced this pull request Sep 29, 2026
…#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.
shaojun pushed a commit to shaojun/unsloth that referenced this pull request Sep 29, 2026
…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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants