Skip to content

feat: ask to choose a design through an approval card - #186

Closed
TheGreatAxios wants to merge 2 commits into
mainfrom
cl-12142-ask-to-confirm-a-design-through-an-approval-card-not-a
Closed

TheGreatAxios wants to merge 2 commits into
mainfrom
cl-12142-ask-to-confirm-a-design-through-an-approval-card-not-a

Conversation

@TheGreatAxios

@TheGreatAxios TheGreatAxios commented Nov 5, 2026 •

Copy link
Copy Markdown
Contributor

The coordinator now asks the person to choose a design with a new choose_design tool, declared as a native approval, so the choice shows on the existing approval card with its own buttons and, while the card is pending and the concept's tab is open to it, a link to the concept's mockup. The separate Confirm prompt under the coordinator's reply, its component, its client call, its styles and its wording are removed, and the design-choice route is now called only by the coordinator's tool.

A choose_design approval covers the concept, not one version, so a look tweak the person saves while the card is open is filed with the design instead of failing the choice. The hub locks the approval, files the concept's newest option as the design and records the approval against both the option and design versions in one transaction, so a failure leaves the approval unused and nothing filed. Each approval chooses once; reusing one is refused with approval_already_used, and an approval of another concept with approval_not_resolved. When the hub refuses a choice, the tool result tells the coordinator that no design was filed and to ask the person again. The settled card says "Approved" only once the hub has recorded the filed design; until then it reads "Chosen · the X design, not filed yet". The seed script still imports its fixture projects, chosen design included, as the person's own import, and the import approval table comment now says so.

The recorded replay's coordinator exchanges 23 and 24 were edited by hand rather than re-recorded: re-recording needs the original live-model run's stored workflow runs, which are not available here. test/e2e/support/extract.ts is updated so a regeneration emits the same choose_design call and its result check.

Verified with lint, format:check, typecheck, bun run test, pins:verify, vendor:verify and the full e2e suite against a throwaway Postgres. A new e2e test, design-choice.test.ts, covers an approval that cannot be reused, a refused wrong concept, and a tweak saved while the card is open being filed. Unit tests cover the card's link and settled line and the coordinator's ask-again refusal. The recorded pipeline replay approves choose_design and the build plan still waits on the approved design.

Before After
before after
before, 420px after, 420px

Closes CL-12142

The coordinator now asks for the design with choose_design, a native approval, and the existing approval card carries the buttons. The separate Confirm prompt, its client call and its wording are removed.
@linear-code

linear-code Bot commented Nov 5, 2026

Copy link
Copy Markdown

CL-12142

A choose_design approval covers the concept, so a look tweak saved while
the card is open is filed with the design. The approval lock, the design
write and both approval records share one transaction, and a reused
approval is refused as approval_already_used. A refused choice tells the
coordinator to ask again, and the card says approved only once the design
is recorded. The concept link shows only while the card is pending and
the concept has a tab.
@TheGreatAxios
TheGreatAxios marked this pull request as ready for review November 5, 2026 00:45
@corbits-triage

corbits-triage Bot commented Nov 5, 2026 •

Copy link
Copy Markdown

Triage: Unsure

Asking a maintainer about:

  • changes sensitive paths: auth: apps/hub/src/auth/agent-token-bridge.ts

@TheGreatAxios

Copy link
Copy Markdown
Contributor Author

Closing for now while today's merges are stabilised.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant