Skip to content

Commit 18beca5

Browse files
improve(control-ui): attach the message queue to the composer (#127823)
* improve(control-ui): align attached composer queue with current main * fix(ui): preserve attached queue state * improve(ui): refine composer interactions * fix(ui): stabilize composer skill references * fix(ui): restore composer queue and override states * fix(ui): refine composer model and permission pickers * fix(ui): unify composer stack borders and underlaps * fix(ui): merge context compaction control * fix(ui): polish new-session composer states * fix(ui): retire removed composer contracts * test(ui): assert model trigger loading skeleton * fix(ui): complete composer review round two * fix(ui): bound transcript under composer stack * fix(ui): keep model picker open during refresh * Revert "fix(ui): bound transcript under composer stack" This reverts commit 4cffa43. * revert(ui): restore transcript clip above composer * fix(ui): lightly underlap transcript behind composer * fix(ui): fade transcript beneath composer stack * fix(ui): surface dictation failures in composer * fix(ui): deepen transcript underlap safely * fix(ui): move voice availability alerts into picker * fix(ui): span transcript fade beneath stack corners * fix(ui): consume dictation hold click tail * test(ui): cover unavailable dictation hold tail * fix(ui): anchor microphone hover reveal * fix(ui): keep microphone picker stable during hold * fix(ui): align dictation actions with composer send * fix(ui): release dictation composer before remote close * fix(ui): stabilize model picker during catalog refresh * fix(ui): unify switch accent colors * fix(ui): accelerate hold to dictate * feat(ui): shimmer dictation listening status * fix(ui): make dictation shimmer seamless * fix(ui): reconcile composer stack with current main * test(ui): drop obsolete reasoning reset expectation * fix(ui): reconcile queue rebase with current main * test(ui): align composer controls with current main * fix(ui): reconcile composer rebase checks * style(ui): format dictation control test * fix(ui): keep model catalog state acyclic * fix(ui): align composer e2e contracts * test(ui): align full composer e2e suite * test(ui): align remaining composer e2e contracts * fix(ui): stabilize queued message editing * test(ui): select queued edit text with a portable chord Control+A is caret-to-line-start on macOS textareas, so the edit tests inserted at position 0 and saved concatenated text on Mac rigs while Linux CI selected-all and passed. ControlOrMeta+A selects on every platform. --------- Co-authored-by: Peter Steinberger <[email protected]>
1 parent 776986f commit 18beca5

100 files changed

Lines changed: 5746 additions & 3325 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"startupJsGzipBytes": 340901,
3-
"reason": "refresh after cumulative current-main UI fixes exhausted the startup tolerance",
2+
"startupJsGzipBytes": 341489,
3+
"reason": "composer queue stack rebased onto current main",
44
"updatedAt": "2026-08-26"
55
}

‎ui/src/components/icons.ts‎

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,11 @@ export const icons = {
1010
messageSquare: strokeIcon(svg` <path
1111
d="M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z"
1212
/>`),
13+
messageCircleOff: strokeIcon(svg` <path d="m2 2 20 20" />
14+
<path
15+
d="M4.93 4.929a10 10 0 0 0-1.938 11.412 2 2 0 0 1 .094 1.167l-1.065 3.29a1 1 0 0 0 1.236 1.168l3.413-.998a2 2 0 0 1 1.099.092 10 10 0 0 0 11.302-1.989"
16+
/>
17+
<path d="M8.35 2.69A10 10 0 0 1 21.3 15.65" />`),
1318
layoutGrid: strokeIcon(svg` <rect width="7" height="7" x="3" y="3" rx="1" />
1419
<rect width="7" height="7" x="14" y="3" rx="1" />
1520
<rect width="7" height="7" x="14" y="14" rx="1" />
@@ -181,6 +186,35 @@ export const icons = {
181186
/>
182187
<path d="M9.1 9a3 3 0 0 1 5.82 1c0 2-3 3-3 3" />
183188
<path d="M12 17h.01" />`),
189+
shield: strokeIcon(svg` <path
190+
d="M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z"
191+
/>`),
192+
shieldEllipsis: strokeIcon(svg` <path
193+
d="M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z"
194+
/>
195+
<path d="M8 12h.01" /><path d="M12 12h.01" /><path d="M16 12h.01" />`),
196+
shieldLock: strokeIcon(svg` <path
197+
d="M20 9.807V6a1 1 0 0 0-1-1c-2 0-4.49-1.19-6.24-2.72a1.17 1.17 0 0 0-1.52 0C9.5 3.8 7 5 5 5a1 1 0 0 0-1 1v7c0 3.88 2.107 6.254 5 7.796"
198+
/>
199+
<path d="M19 17v-2a2 2 0 0 0-4 0v2" />
200+
<rect x="13" y="17" width="8" height="5" rx="1" />`),
201+
shieldCog: strokeIcon(svg` <path d="m10.929 14.467-.383.924" />
202+
<path d="M10.929 8.923 10.546 8" />
203+
<path d="M13.225 8.923 13.608 8" />
204+
<path d="m13.607 15.391-.382-.924" />
205+
<path d="m14.849 10.547.923-.383" />
206+
<path d="m14.849 12.843.923.383" />
207+
<path
208+
d="M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z"
209+
/>
210+
<path d="m9.305 10.547-.923-.383" />
211+
<path d="m9.305 12.843-.923.383" />
212+
<circle cx="12.077" cy="11.695" r="3" />`),
213+
shieldAlert: strokeIcon(svg` <path
214+
d="M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z"
215+
/>
216+
<path d="M12 8v4" />
217+
<path d="M12 16h.01" />`),
184218

185219
// UI icons
186220
menu: strokeIcon(svg` <line x1="4" x2="20" y1="12" y2="12" />
@@ -189,6 +223,10 @@ export const icons = {
189223
x: strokeIcon(svg` <path d="M18 6 6 18" />
190224
<path d="m6 6 12 12" />`),
191225
check: strokeIcon(svg`<path d="M20 6 9 17l-5-5" />`),
226+
info: strokeIcon(
227+
svg`<circle cx="12" cy="12" r="10" /><path d="M12 16v-4" /><path d="M12 8h.01" />`,
228+
),
229+
square: strokeIcon(svg`<rect width="18" height="18" x="3" y="3" rx="2" />`),
192230
play: strokeIcon(svg`<polygon points="6 3 20 12 6 21 6 3" />`),
193231
pause: strokeIcon(svg` <rect x="14" y="4" width="4" height="16" rx="1" />
194232
<rect x="6" y="4" width="4" height="16" rx="1" />`),

‎ui/src/components/session-progress-card.test.ts‎

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ const progressCard: ProgressCard = {
1818
};
1919

2020
describe("renderSessionProgressCard", () => {
21-
it.each(["board", "composer", "dock", "hovercard", "rail"] as const)(
21+
it.each(["board", "composer", "hovercard", "rail"] as const)(
2222
"shows the last activity time for %s cards with and without checklist steps",
2323
(placement) => {
2424
const container = document.createElement("div");
@@ -154,6 +154,22 @@ describe("renderSessionProgressCard", () => {
154154
expect(card?.querySelectorAll(".session-progress-card__step")).toHaveLength(3);
155155
});
156156

157+
it("keeps the collapsed counter in the summary action column", () => {
158+
const container = document.createElement("div");
159+
render(renderSessionProgressCard(progressCard, "composer"), container);
160+
161+
const summary = container.querySelector(".session-progress-card__summary");
162+
const count = summary?.querySelector(".session-progress-card__summary-count--collapsed");
163+
expect(count?.textContent?.trim()).toBe("2/3");
164+
expect(count?.parentElement).toBe(summary);
165+
expect(count?.previousElementSibling?.classList).toContain(
166+
"session-progress-card__summary-collapsed",
167+
);
168+
expect(count?.nextElementSibling?.classList).toContain(
169+
"session-progress-card__summary-expanded",
170+
);
171+
});
172+
157173
it("starts completed composer progress collapsed", () => {
158174
const container = document.createElement("div");
159175
render(

‎ui/src/components/session-progress-card.ts‎

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import { formatTimeMs } from "../lib/format.ts";
77
import { icons } from "./icons.ts";
88
import { toSanitizedMarkdownHtml } from "./markdown.ts";
99

10-
type SessionProgressCardPlacement = "board" | "composer" | "dock" | "hovercard" | "rail";
10+
type SessionProgressCardPlacement = "board" | "composer" | "hovercard" | "rail";
1111

1212
const STATUS_LABEL_KEYS: Record<ProgressCardStep["status"], Parameters<typeof t>[0]> = {
1313
completed: "sessionProgressCard.status.completed",
@@ -197,12 +197,13 @@ export function renderSessionProgressCard(
197197
</span>
198198
<span class="session-progress-card__summary-collapsed">
199199
<span class="session-progress-card__current">${stepLabel}</span>
200-
${counts
201-
? html`<span class="session-progress-card__summary-count"
202-
>${currentPosition}/${counts.total}</span
203-
>`
204-
: nothing}
205200
</span>
201+
${counts
202+
? html`<span
203+
class="session-progress-card__summary-count session-progress-card__summary-count--collapsed"
204+
>${currentPosition}/${counts.total}</span
205+
>`
206+
: nothing}
206207
<span class="session-progress-card__summary-expanded">
207208
<span class="session-progress-card__summary-title"
208209
>${t("sessionProgressCard.composerTitle")}</span

‎ui/src/e2e/browser-dictation-status.e2e.test.ts‎

Lines changed: 93 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,75 @@ const suite = createControlUiE2eSuite({
1515
});
1616

1717
suite.define(() => {
18-
it("keeps dictation activity, elapsed time, Stop, and Send visible", async () => {
18+
it("keeps the hold-to-dictate switch interactive without closing the microphone picker", async () => {
19+
await suite.withPage({ permissions: ["microphone"] }, async ({ page }) => {
20+
await installMockGateway(page, {
21+
methodResponses: {
22+
"talk.catalog": {
23+
transcription: { ready: true, providers: [] },
24+
realtime: { ready: true, providers: [] },
25+
speech: { providers: [] },
26+
modes: [],
27+
transports: [],
28+
brains: [],
29+
},
30+
},
31+
});
32+
await installTalkBrowserFixtures(page);
33+
await page.goto(`${suite.server.baseUrl}chat`);
34+
35+
const voice = page.getByRole("button", { name: "Start voice input" });
36+
await voice.hover();
37+
await page.getByRole("button", { name: "Microphone input" }).click();
38+
const picker = page.locator("wa-dropdown.chat-talk-input-picker");
39+
const toggle = page.locator('.chat-talk-input-picker__preference [role="switch"]');
40+
await expect.poll(() => picker.getAttribute("open")).not.toBeNull();
41+
await expect.poll(() => toggle.getAttribute("aria-checked")).toBe("true");
42+
43+
await toggle.click();
44+
45+
await expect.poll(() => toggle.getAttribute("aria-checked")).toBe("false");
46+
await expect.poll(() => picker.getAttribute("open")).not.toBeNull();
47+
await captureComposerProof(page, "microphone-picker-hold-toggle.png");
48+
await page.screenshot({
49+
animations: "disabled",
50+
path: ".artifacts/control-ui-e2e/voice-controls/microphone-picker-hold-toggle-full.png",
51+
});
52+
});
53+
});
54+
55+
it("gates unavailable voice capabilities in the microphone picker", async () => {
56+
await suite.withPage({ permissions: ["microphone"] }, async ({ page }) => {
57+
await installMockGateway(page, {
58+
methodResponses: {
59+
"talk.catalog": {
60+
transcription: { ready: false, providers: [] },
61+
realtime: { ready: false, providers: [] },
62+
speech: { providers: [] },
63+
modes: [],
64+
transports: [],
65+
brains: [],
66+
},
67+
},
68+
});
69+
await installTalkBrowserFixtures(page);
70+
await page.goto(`${suite.server.baseUrl}chat`);
71+
72+
await page.getByRole("button", { name: "Start voice input" }).click();
73+
const unavailable = page.locator('[data-status="unavailable"]');
74+
await expect.poll(() => unavailable.count()).toBe(2);
75+
await expect
76+
.poll(() => unavailable.getByRole("button", { name: "Configure" }).count())
77+
.toBe(2);
78+
await captureComposerProof(page, "microphone-picker-capability-gating.png");
79+
await page.screenshot({
80+
animations: "disabled",
81+
path: ".artifacts/control-ui-e2e/voice-controls/microphone-picker-capability-gating-full.png",
82+
});
83+
});
84+
});
85+
86+
it("keeps dictation activity and the insert/discard actions visible", async () => {
1987
await suite.withPage(
2088
{ permissions: ["microphone"], viewport: { width: 390, height: 844 } },
2189
async ({ page }) => {
@@ -50,27 +118,40 @@ suite.define(() => {
50118
microphoneBox.y + microphoneBox.height / 2,
51119
);
52120
await page.mouse.down();
121+
await page.waitForTimeout(350);
122+
await expect
123+
.poll(() => microphone.getAttribute("class"))
124+
.toContain("chat-send-btn--dictation-arming");
125+
await page.screenshot({
126+
animations: "allow",
127+
path: ".artifacts/control-ui-e2e/voice-controls/dictation-hold-ring.png",
128+
});
53129
await gateway.waitForRequest("talk.session.create");
130+
await page.mouse.up();
54131

55132
const composer = page.locator(".agent-chat__input--dictating");
56-
const activity = composer.locator(
57-
".agent-chat__dictation-wave .agent-chat__voice-activity",
58-
);
59-
const elapsed = composer.locator(".agent-chat__dictation-elapsed");
60-
const stop = composer.getByRole("button", { name: "Stop dictation" });
61-
const send = composer.getByRole("button", { name: "Send message" });
62-
await expect.poll(() => activity.isVisible()).toBe(true);
63-
expect(await activity.locator(".agent-chat__voice-activity-bar").count()).toBe(48);
64-
await expect.poll(() => elapsed.textContent()).toBe("0:01");
133+
const phase = composer.locator(".agent-chat__dictation-phase");
134+
const stop = composer.getByRole("button", { name: "Stop and keep text" });
135+
const send = composer.getByRole("button", { name: "Send", exact: true });
136+
await expect.poll(() => phase.isVisible()).toBe(true);
137+
await expect
138+
.poll(() => phase.textContent().then((text) => text?.trim()))
139+
.toBe("Listening…");
140+
expect(await composer.locator(".agent-chat__dictation-wave").count()).toBe(0);
141+
expect(await composer.locator(".agent-chat__dictation-elapsed").count()).toBe(0);
65142
await expect.poll(() => stop.isVisible()).toBe(true);
66143
await expect.poll(() => send.isVisible()).toBe(true);
67-
await captureComposerProof(page, "dictation-waveform-timer-actions.png");
144+
await captureComposerProof(page, "dictation-status-actions.png");
145+
await page.screenshot({
146+
animations: "disabled",
147+
path: ".artifacts/control-ui-e2e/voice-controls/dictation-latched-after-release.png",
148+
});
68149
const composerBox = await composer.boundingBox();
69150
expect(composerBox).not.toBeNull();
70151
if (!composerBox) {
71152
throw new Error("expected active dictation composer layout box");
72153
}
73-
for (const control of [activity, elapsed, stop, send]) {
154+
for (const control of [phase, stop, send]) {
74155
const box = await control.boundingBox();
75156
expect(box).not.toBeNull();
76157
if (!box) {

‎ui/src/e2e/browser-talk-start-stop.e2e.test.ts‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -522,6 +522,7 @@ suite.define(() => {
522522
entry.method.startsWith("talk."),
523523
);
524524
expect(talkRequests.map((entry) => entry.method)).toEqual([
525+
"talk.catalog",
525526
"talk.catalog",
526527
"talk.client.create",
527528
]);
@@ -664,6 +665,7 @@ suite.define(() => {
664665
entry.method.startsWith("talk."),
665666
);
666667
expect(talkRequests.map((entry) => entry.method)).toEqual([
668+
"talk.catalog",
667669
"talk.catalog",
668670
"talk.client.create",
669671
]);

‎ui/src/e2e/browser-talk-start-stop.fixtures.ts‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ export function videoTalkCatalog(activeProvider: "google" | "openai") {
1919
return {
2020
realtime: {
2121
activeProvider,
22+
ready: true,
2223
providers: [{ id: activeProvider, label: activeProvider, supportsVideoFrames: true }],
2324
},
2425
};

‎ui/src/e2e/browser-talk-start-stop.webrtc-sdp.e2e.test.ts‎

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,9 @@ suite.define(() => {
3636
await installWebRtcSdpFailureFixture(page);
3737

3838
await page.goto(`${suite.server.baseUrl}chat`);
39+
await expect
40+
.poll(() => page.locator('[data-chat-talk-capability="realtime"]').count())
41+
.toBe(0);
3942
await page.getByRole("button", { name: "Start voice input" }).click();
4043
await gateway.waitForRequest("talk.client.create");
4144

@@ -82,6 +85,9 @@ suite.define(() => {
8285
await installOversizedWebRtcSdpFixture(page);
8386

8487
await page.goto(`${suite.server.baseUrl}chat`);
88+
await expect
89+
.poll(() => page.locator('[data-chat-talk-capability="realtime"]').count())
90+
.toBe(0);
8591
await page.getByRole("button", { name: "Start voice input" }).click();
8692
await gateway.waitForRequest("talk.client.create");
8793

‎ui/src/e2e/chat-composer-capability-menu.e2e.test.ts‎

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -212,10 +212,10 @@ suite.define(() => {
212212

213213
await page.goto(`${suite.server.baseUrl}chat`);
214214
await gateway.waitForRequest("chat.startup");
215-
const pill = page.locator(".agent-chat__session-overrides-pill");
215+
const attachTrigger = page.getByRole("button", { name: "Add attachment" });
216216
await expect
217-
.poll(async () => (await pill.textContent())?.replace(/\s+/g, " ").trim())
218-
.toBe("4 session overrides");
217+
.poll(() => attachTrigger.getAttribute("class"))
218+
.toContain("agent-chat__input-btn--has-overrides");
219219

220220
let composer = await openMenu(page);
221221
const dropdown = composer.locator("wa-dropdown.agent-chat__capability-menu");
@@ -232,6 +232,8 @@ suite.define(() => {
232232
expect.stringContaining("Manage plugins"),
233233
]),
234234
);
235+
const clearOverrides = dropdown.getByRole("menuitem", { name: /4 overrides/ });
236+
await expect.poll(() => clearOverrides.isVisible()).toBe(true);
235237
await expect.poll(() => webSearchItem(dropdown).isVisible()).toBe(true);
236238
const skillsRoot = dropdown.getByRole("menuitem", { name: /^Skills/ });
237239
await skillsRoot.focus();
@@ -260,9 +262,13 @@ suite.define(() => {
260262
.poll(() => page.locator(".agent-chat__file-input").getAttribute("data-proxied"))
261263
.toBe("true");
262264

263-
await pill.getByRole("button", { name: "Clear session overrides" }).click();
265+
composer = await openMenu(page);
266+
const reopenedMenu = composer.locator("wa-dropdown.agent-chat__capability-menu");
267+
await reopenedMenu.locator('wa-dropdown-item[value="clear-overrides"]').click();
264268
await expect.poll(() => latestToolOverrides(gateway)).toEqual(null);
265-
await expect.poll(() => pill.count()).toBe(0);
269+
await expect
270+
.poll(() => attachTrigger.getAttribute("class"))
271+
.not.toContain("agent-chat__input-btn--has-overrides");
266272

267273
composer = await openMenu(page);
268274
const menu = composer.locator("wa-dropdown.agent-chat__capability-menu");
@@ -583,7 +589,7 @@ suite.define(() => {
583589
await page.goto(`${suite.server.baseUrl}chat`);
584590
const composer = await openMenu(page);
585591
const menu = composer.locator("wa-dropdown.agent-chat__capability-menu");
586-
const clear = composer.getByRole("button", { name: "Clear session overrides" });
592+
const clear = menu.locator('wa-dropdown-item[value="clear-overrides"]');
587593
await expect.poll(() => clear.isDisabled()).toBe(true);
588594
await expect.poll(() => clear.getAttribute("title")).toContain("operator.admin access");
589595
await expect.poll(() => webSearchItem(menu).isDisabled()).toBe(true);

0 commit comments

Comments
 (0)