Skip to content

feat: Clarify HITL inbox in Studio#6

Merged
mroops0111 merged 3 commits into
masterfrom
feat/studio-clarify-inbox
May 25, 2026
Merged

feat: Clarify HITL inbox in Studio#6
mroops0111 merged 3 commits into
masterfrom
feat/studio-clarify-inbox

Conversation

@mroops0111
Copy link
Copy Markdown
Owner

@mroops0111 mroops0111 commented May 25, 2026

Summary

Closes the second HITL gate for Braid. Skills already emitted ClarifyTickets and the backend persisted them, but nothing in Studio consumed the SSE stream — pending tickets were a dead-letter queue. This PR ships the user-facing surface plus the missing answer-side flexibility.

  • Studio Clarify page (list + detail, mirroring Proposals): status filter via PageActions, pending badge in sidebar + tab, cross-tab focusProposal chip on applied tickets.
  • Inline rationale: anchored under the selected candidate in every status — editable textarea when pending, read-only quote when answered/applied. Skipped tickets keep the reason in the footer (no candidate to anchor to).
  • Custom answer (+ Add my own answer): HITLService.answerClarifyTicket now takes options including selection: { kind: 'custom', description }; server appends the new candidate via ClarifyTicket.appendCandidate and marks it answered in one transaction. Follows the documented zero-ops resolution path (braid-clarify SKILL.md:151) so it interoperates with the existing skill.
  • New question form: humans can file open questions via the UI; candidates are description-only (zero ops).
  • Server projection: GET /clarify/:id surfaces answerNote / skipReason derived from the latest matching Decision — keeps the detail pane single-fetch.

mroops0111 and others added 3 commits May 24, 2026 18:53
- core: ClarifyTicket.appendCandidate; HITLService.answerClarifyTicket
  refactored to options object with `customCandidate` and `note` paths.
- server: AnswerBodySchema accepts customCandidate XOR candidateId with
  optional note; GET /clarify/:id projects answerNote / skipReason from
  the latest Decision so the detail pane needs one fetch.
- studio: new Clarify page (list+detail, status filter via PageActions,
  sidebar pending badge), inline rationale anchored under the selected
  candidate (editable on pending, read-only on terminal states),
  "+ Add my own answer" inline form, "+ New question" modal, cross-tab
  focusProposal sweep across statuses.
- tests: domain coverage for appendCandidate; service coverage for note
  + customCandidate; route coverage for XOR body schema and answerNote
  projection; helper unit tests for summarizeOps / formatOpsSummary /
  questionExcerpt / candidateLetter.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
- server: CreateBodySchema accepts candidates with optional `id`; the
  route mints via newClarifyCandidateId when missing. Removes the
  client-side `crypto.randomUUID() as ClarifyCandidateId` cast that
  broke the "no inline brand cast" rule.
- studio: summarizeOps / collectNodeIds switches gain the `never`
  sentinel so adding a 13th GraphOperation discriminant compile-errors
  here.
- core: trim HITLService.answerClarifyTicket JSDoc to one paragraph
  per the project's comment convention.
- tests: add route coverage for the server-mint candidate id path.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@mroops0111 mroops0111 merged commit 72d3dbc into master May 25, 2026
5 checks passed
@mroops0111 mroops0111 deleted the feat/studio-clarify-inbox branch May 25, 2026 16:41
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