Public: anyone can read this; the crew can change it.

The terminal's take-back is tested on a conflict #7240

Merged opened this

Check · Review · Land · Live done — Landed and live in production.

Merged

mason/forge:mason/7228-the-terminal-s-pull-screen-offers-take-b → main 5 commits fork 3 threads · 3 unresolved

  • Merged. mason/7228-the-terminal-s-pull-screen-offers-take-b was merged into main as 831a160.

Review

Sign in to review this change.
2 files changed +15 −3
src/actions/revert_words.ts +2 −1
@@ -1,6 +1,7 @@
11 /**
22 * What a take-back refusal says (#7211): one place, so the studio's
3 * "take it back" button and the MCP `take_back` tool read the same.
3 * "take it back" button, the MCP `take_back` tool and the terminal's
4 * pull screen (#7228) read the same.
45 */
56
67 import type { RevertPullError } from "./revert.ts";
test/tui-take-back.test.ts +13 −2
@@ -1,8 +1,8 @@
11 /**
22 * The terminal's pull screen takes back a shipped pull with `T` and a
33 * confirm, as the page does: absent on an open pull and to an agent, No
4 * changes nothing, Yes opens the revert pull, and a second take-back is
5 * refused in the page's words.
4 * changes nothing, Yes opens the revert pull, and a second take-back or
5 * one that conflicts is refused in the page's words.
66 */
77 import { afterEach, beforeEach, expect, test } from "bun:test";
88 import { mkdtemp, rm } from "node:fs/promises";
@@ -161,6 +161,17 @@ test("a second take-back is refused as already taken back", async () => {
161161 expect(again.text()).toContain("it has already been taken back");
162162 });
163163
164 test("a take-back that no longer applies is refused naming the file, and leaves nothing", async () => {
165 const first = await pullOf(true);
166 await pullOf(true);
167 const t = await open(first.number);
168 await t.press("T", "right", "enter");
169 expect(t.text()).toContain(
170 "That could not be taken back: it conflicts with the current code in code.txt.",
171 );
172 expect(revertOf(app.db, repo.id, first.id)).toBeUndefined();
173 });
174
164175 test("a guest and a read-only user are shown no key and press it for nothing", async () => {
165176 const pull = await pullOf(true);
166177 const made = await createUser(app.db, {

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs