Keep the composer under a pending approval, and no working line meanwhile
The approval sits above the message box rather than replacing it, so a message can still go with a decline, as in the web.
This commit is contained in:
1 parent
5b55f2ff30
commit
ac903fdcba
2 files changed
+8
-8
No files matched your search
@@ -181,14 +181,15 @@ describe("live status", () => {
|
||||
});
|
||||
|
||||
describe("approvals", () => {
|
||||
test("the request shows in the composer's place, with its buttons, and not in the timeline", async () => {
|
||||
test("the request shows above the composer, with its buttons, and not in the timeline", async () => {
|
||||
const app = await open({ session: fakeSession({ projection: withApproval() }) });
|
||||
const frame = app.frame();
|
||||
expect(frame).toContain("Command approval");
|
||||
expect(frame).toContain("Deletes dist/ and rebuilds it.");
|
||||
// Only the composer block names the command; its timeline row is hidden.
|
||||
expect(frame.split("rm -rf dist && bun run build")).toHaveLength(2);
|
||||
expect(frame).not.toContain("Press i to type");
|
||||
// The composer stays below it, so a message can still go with a decline.
|
||||
expect(app.find("Command approval").y).toBeLessThan(app.find("gpt-5.4").y);
|
||||
const approve = app.find("Approve");
|
||||
await app.click(approve.x, approve.y);
|
||||
expect(app.calls("respond").map((call) => call.args[2])).toEqual(["accept"]);
|
||||
|
||||
Reference in new issue
Block a user