Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions apps/web/src/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -709,8 +709,6 @@ export const wording = {
actions: {
design_app: {
approve: "Start the design",
/** Later design starts in this project's run go ahead without a card. */
approveAlways: "Start designs without asking",
deny: "Not yet",
},
} as Record<
Expand Down
13 changes: 1 addition & 12 deletions apps/web/src/pages/workspace/document-decision.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,6 @@ import type { ApprovalOutcome, DocumentApproval } from "./transcript.tsx";
const text = wording.approval;
const INSTRUCTION_ASKS = new Set(["instruct_coder"]);
const FOLDED_INSTRUCTION_ASKS = new Set(["design_app"]);
// Asks that record no approval of document versions, where the native standing
// grant only lets later calls in the run go ahead. Every other card records an
// approval of the exact versions shown, so it hides the library's Approve always.
const STANDING_ASKS = new Set(["design_app"]);

function shortName(approval: DocumentApproval): string | undefined {
const { document } = approval;
Expand Down Expand Up @@ -118,7 +114,6 @@ export function DocumentDecision({
disabled = false,
error,
onYes,
onAlways,
onNo,
countdown,
}: {
Expand Down Expand Up @@ -149,10 +144,8 @@ export function DocumentDecision({
};
const instruction = approval.instruction;
const tool = approval.toolName ?? "";
const standing = STANDING_ASKS.has(tool);
const decide = (decision: ToolApprovalDecision) => {
if (decision.outcome === "rejected") onNo();
else if (standing && decision.scope === "always") onAlways();
else onYes();
};
const sources = approval.sources ?? [];
Expand Down Expand Up @@ -184,11 +177,7 @@ export function DocumentDecision({
);
return (
<ToolApproval
className={
standing
? "document-decision"
: "document-decision document-decision-once"
}
className="document-decision document-decision-once"
part={approvalToolPart(approval.approvalId, approval.outcome)}
onDecide={decide}
disabled={disabled}
Expand Down
14 changes: 14 additions & 0 deletions apps/web/src/pages/workspace/transcript.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,20 @@ describe("conversation transcript", () => {
expect(html).not.toContain("sha256");
});

test("a design start does not offer to go ahead without asking", () => {
const html = renderToStaticMarkup(
<DocumentDecision
approval={{ approvalId: "appr-1", toolName: "design_app" }}
onYes={() => {}}
onAlways={() => {}}
onNo={() => {}}
/>,
);
expect(html).toContain("document-decision-once");
expect(html).toContain(">Start the design<");
expect(html).not.toContain("Start designs without asking");
});

test("Not yet denies the approval and then takes the person to the composer", () => {
const calls: string[] = [];
const thread = RoomThread({
Expand Down
2 changes: 0 additions & 2 deletions docs/USER_MANUAL.md
Original file line number Diff line number Diff line change
Expand Up @@ -246,8 +246,6 @@ Before any designer starts, a card asks **Ready to start the design?** and lists
the **Design concepts to compare** it will make.

- **Start the design** lets it begin.
- **Start designs without asking** also lets later design starts in this
project go ahead without a card.
- **Not yet** stops it so you can say what to change.

If you asked to explore, you get as many concepts as **Design concepts to
Expand Down