Skip to content

Run page: show the questions a run asked and answer them there - #241

Merged
nambok merged 1 commit into
mainfrom
feat/run-questions
Oct 27, 2026
Merged

nambok merged 1 commit into
mainfrom
feat/run-questions

Conversation

@nambok

@nambok nambok commented Oct 27, 2026

Copy link
Copy Markdown
Collaborator

Summary

When a run stops at "Needs your answer", the run page now lists exactly what Coderhelm asked and takes the answer there, so nobody has to open the ticket to find out what's missing. Pairs with CoderHelm/coderhelm-platform#330, which stores the questions, adds POST /api/runs/{run_id}/answer and continues the run with the answers.

Changes

  • New RunQuestions banner for a needs_input run that has questions:
    • Each question in plain words, numbered when there are several, with its "why" muted underneath.
    • Offered answers as buttons. A notice's two choices (for example "Work on #10: Remove strikethrough style from completed run tasks #12" / "Open my own") show under "Choose:".
    • One answer box per question; blank boxes stay open.
    • "Send answer and continue" (or "Send answers…").
    • "See it on the ticket", linking the posted comment.
    • Retry, kept for when the ticket was edited directly.
  • Handling around the banner:
    • People without the runs capability see the questions but no boxes or Retry.
    • Sending with every box empty shows an inline error and focuses the first box.
    • A 409 (the run moved on) shows the server's sentence and reloads the run.
    • Ctrl/Cmd+Enter sends.
  • After answering, the old run shows "Answered. Coderhelm is continuing in a new run.", with each question, answer and author, a link to the run that continued, and a link to the reply on the ticket.
  • A run that asked only in prose keeps the old prompt and Retry.
  • lib/api.ts: RunQuestion, RunAnswer, api.answerRun. openapi-fields.ts is regenerated with npm run openapi:fields at the platform branch head, and api-contract.ts checks the new types.
  • API docs: the runs scope lists the answer endpoint, with an idempotency row for it.

Verification

  • npm run typecheck, npm run lint, npm run check:openapi (at platform a28e873) and npm run build all pass.
  • e2e/run-questions.spec.ts (9 tests), run with close-runs, audit-runs and api-keys: 45 passed.
    • The questions and their "why" show, the ticket link is right, and Retry is kept.
    • An empty send is refused, then the answers are sent with exactly the right body and the answered state shows.
    • One question gets one box and Ctrl+Enter sends.
    • A run that moved on gets the 409 message and the page refreshes.
    • The open-PR choice sends "Open my own".
    • A viewer sees no boxes; a prose-only run keeps the old prompt.
    • No sideways scroll at 390px and 1440px.
  • I reviewed the 390px and 1440px screenshots: questions, answered and open-PR choice states.

A run waiting on a person lists its questions in plain words, each with
why it matters muted underneath, a link to the comment on the ticket, and
one answer box per question (offered answers and choices as buttons).
Send answer and continue posts the answers on the ticket as a reply from
the person and continues the work; Retry stays for a ticket edited
directly. Viewers see the questions without the boxes; blank answers and
a run that moved on are handled. An answered run shows what was asked and
answered, with links to the run that continued and the reply.

Dashboard types follow the platform's API (openapi fields regenerated);
the API docs list the answer endpoint.
@nambok
nambok merged commit cfcba87 into main Oct 27, 2026
5 checks passed
@nambok
nambok deleted the feat/run-questions branch October 27, 2026 16:00
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