Skip to content

Commit b1eaa6e

Browse files
committed
Use agent-oriented status messages for questions
1 parent 8131f0c commit b1eaa6e

2 files changed

Lines changed: 7 additions & 4 deletions

File tree

‎test/browser/review.spec.ts‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -144,9 +144,10 @@ test('acknowledges the first Ask agent click immediately and prevents duplicate
144144
await page.getByLabel('Question about this item').fill('Does one click submit this?');
145145
await page.getByRole('button',{name:'Ask agent',exact:true}).click();
146146
await expect(page.locator('#save-note')).toBeDisabled();
147-
await expect(page.locator('#saved')).toHaveText('Saving question…');
147+
await expect(page.locator('#saved')).toHaveText('Asking agent…');
148148
} finally {release();}
149149
await expect(page.getByText('Does one click submit this?',{exact:true})).toBeVisible();
150+
await expect(page.locator('#saved')).toHaveText('Question submitted. Follow the agent’s response in Conversation.');
150151
await expect(page.getByText('Single-click answer',{exact:true})).toBeVisible({timeout:10000});
151152
await expect(page.getByRole('button',{name:'Ask agent',exact:true})).toBeEnabled();
152153
expect(submissions).toBe(1);expect(calls).toBe(1);expect(app.service.store.getReviewNotes(config.identity)).toHaveLength(1);

‎web/public/app.js‎

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -364,7 +364,7 @@ $("composer").onsubmit = async (event) => {
364364
kind = mode;
365365
const attached = attachments.get(`${item}:${kind}`);
366366
if (attached && (attached.head !== data.snapshot.head || attached.base !== data.snapshot.base)) return;
367-
$("saved").textContent = kind === "change" ? "Saving change request…" : "Saving question…";
367+
$("saved").textContent = kind === "change" ? "Saving change request…" : "Asking agent…";
368368
if (await act({ action: "note", item, kind, text: $("message").value, ...(attached ? {reference:{key:attached.key,start:attached.start,end:attached.end}} : {}) })) {
369369
$("notes").lastElementChild?.scrollIntoView({ block: "nearest" });
370370
drafts.delete(`${item}:${kind}`);
@@ -374,9 +374,11 @@ $("composer").onsubmit = async (event) => {
374374
$("saved").textContent =
375375
kind === "change"
376376
? "Saved for the next revision."
377-
: "Question saved. See agent status in Conversation.";
377+
: "Question submitted. Follow the agent’s response in Conversation.";
378378
} else {
379-
$("saved").textContent = "Could not save. Your draft is preserved; refresh and try again.";
379+
$("saved").textContent = kind === "change"
380+
? "Could not save. Your draft is preserved; refresh and try again."
381+
: "Could not ask the agent. Your question is preserved; refresh and try again.";
380382
}
381383
};
382384
$("conversation-toggle").onclick = () => {

0 commit comments

Comments
 (0)