Skip to content

fix(web): show the open question card again after returning to a project - #202

Closed
TheGreatAxios wants to merge 7 commits into
mainfrom
cl-12168-show-the-coordinators-open-question-card-again-after
Closed

TheGreatAxios wants to merge 7 commits into
mainfrom
cl-12168-show-the-coordinators-open-question-card-again-after

Conversation

@TheGreatAxios

Copy link
Copy Markdown
Contributor

What changed

When the coordinator asks you a question, it shows a card to answer. If you left the project and came back, or reloaded, the card was gone: the coordinator's "choose on the card below" was there with nothing to answer, and the project was stuck. Now the card comes back, and you can answer it.

Before: no card. After: the card is back

Why: the card only ever came from the live stream, so a page opened later had nothing to draw it from. The hub's conversation read now includes the question the coordinator is still waiting on, and the page draws the card from it when it didn't see the question live. Once answered, it doesn't come back.

Verification

  • Main, 4 runs: the card is gone after coming back or reloading (reloaded).
  • This branch, 2 runs: the card stays after coming back and after reloading (reloaded). Answering works and the coordinator carries on (answered). Once answered, no card comes back after a reload (screenshot).
  • A new question with no new coordinator text doesn't show up as already answered (2 runs each way).
  • New hub test. Lint, format, typecheck, tests, pins and vendor checks pass.

Closes CL-12168

The question card came only from the live run stream, so a page opened
later showed the coordinator's reply with nothing to answer. The
conversation read now attaches the ask_questions call the coordinator
waits on, since the person's last message, to its open input park, and
the page draws the card from it when it did not watch the ask.
@linear-code

linear-code Bot commented Nov 6, 2026

Copy link
Copy Markdown

CL-12168

@corbits-triage corbits-triage Bot left a comment •

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Triage requests changes:

  • Conventions: added code matches a code pattern
    • apps/web/src/pages/workspace/index.tsx:690 empty-list-fallback: Invented fallback `?? []`; handle the missing value instead.

@corbits-triage
corbits-triage Bot dismissed their stale review November 6, 2026 04:03

Nothing triage asked to change still fails, so this request no longer stands.

Comment thread apps/web/src/pages/workspace/index.tsx Resolved
corbits-triage[bot]
corbits-triage Bot previously approved these changes Nov 6, 2026
A run that ends on a bare ask_questions call keeps that call on the
uncommitted live turn. The restored card only checked committed steps,
so a watching page drew the same card twice: on the live turn and on
the last committed reply. Count the live turn as already drawn.
When the mirror holds no person turn yet, every later ask is open; say
so directly instead of standing in an invented earliest time.
Validate the park question with a schema rather than casting it, type
the restored card as a ConversationPart, and say where the card goes:
on the coordinator's latest reply.
Comment thread apps/web/src/pages/workspace/index.tsx Resolved
corbits-triage[bot]
corbits-triage Bot previously approved these changes Nov 6, 2026
The page reads an approval decision's note as a person turn, so it also
counted as the answer to an open ask_questions call. Declining another
card with a note dropped the question card on reload. Only the person's
own message answers the questions.
A new message run drops a bare ask from the live turn while the page
still holds the open ask from its last read. The card was put back in
the steps map, but the memoized turns did not depend on that, so it
stayed hidden until the next read.
Comment on lines +165 to +168
const answer = mapMirrorConversationTurns(
asked.filter((turn) => !isApprovalDecision(turn)),
"note",
).findLast((turn) => turn.role === "person");

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 · Hub's specialist-ended notice counts as the person's answer and hides the open card

lastOpenAsk treats any mapped person turn as the answer. mapMirrorConversationTurns leaves out only workflow-run mail and approval decisions. The hub's specialist-ended notice reaches the coordinator as the person's message and is kept as a person turn (personTurnText only trims it). So an ask_questions call made before that notice is treated as answered. After a reload the card does not come back while the coordinator is still waiting for answers, and the project is stuck again.

The coordinator calls ask_questions while a specialist is running. The specialist fails, so the hub sends its "Status update: …" notice. The coordinator acknowledges it and parks for input again. The person then reloads the page.

Resolve this comment. Triage will not finish while it is open.

corbits-triage[bot]
corbits-triage Bot previously approved these changes Nov 6, 2026
@TheGreatAxios
TheGreatAxios marked this pull request as draft November 6, 2026 05:40
@corbits-triage
corbits-triage Bot dismissed their stale review November 6, 2026 05:41

This pull request is no longer ready to approve, so this approval no longer stands.

@TheGreatAxios

Copy link
Copy Markdown
Contributor Author

Replaced by #212, which keeps the questions card by making the question wait for the person's answer as the call's result, instead of inferring it from the chat history.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant