workspaceToken (see Authentication)
and goes to the single GraphQL endpoint:
Leadsheets / Leadsheet / LeadsheetSheetIssue / LeadsheetFieldRow /
LeadsheetTrace field list, and for the DocumentMessage annotation and
thread APIs, see Leadsheets and review. For how to start
and poll the TAX_PREP task whose taskId you feed into this flow, see
Run tax prep end to end and Tasks.
1. Read the leadsheets for a completed run
A leadsheets tree is the output of aTAX_PREP (or TAX_REVIEW) background
task. Pass that task’s taskId to binder.leadsheets(taskId:) to read the
exact tree that run produced. The query below mirrors the web app’s
GetBinderLeadsheets document: it walks sheets, their issues and per-severity
counts, and the field rows with their traces and sources.
Leadsheets.issueCount for a quick “needs attention” number, drill into
Leadsheet.issueCount for per-severity counts, then page through
LeadsheetSheetIssue for per-issue detail. resolved is server-computed from
the document messages on the sheet, so refresh the query after every sign-off or
undo (see step 4).
There is no top-level
leadsheets query. Leadsheets belong to a client’s
binder, so you read them through
me { ... on WorkspaceUser { workspace { clients(filters: { ids: [$clientId] }) { binder { leadsheets(taskId: $taskId) { ... } } } } } }.
The workspaceToken already identifies the workspace. See
Leadsheets and review for the
full field list.2. Record a sign-off
A sign-off is acreateDocumentMessage call anchored to the subdocument path
you are signing off on. The anchorPoint carries the reviewer’s level and
user_role so the UI renders the sign-off with the right label.
id. You pass it to hideDocumentMessage in step 3 if you
ever need to undo the sign-off.
3. Undo a sign-off
Undoing a sign-off is a soft-hide of the sign-offDocumentMessage. The
sign-off row stays in history (with hiddenAt set), and the leadsheets query’s
resolved and issueCount recomputation backs it out.
4. Refetch the leadsheets query
LeadsheetSheetIssue.resolved and Leadsheet.issueCount (and the per-severity
Leadsheet.issueCount { critical high medium low } breakdown) are
server-computed from the document messages on the sheet. After any sign-off or
undo, refetch the GetClientLeadsheets query from step 1 so the server
recomputes them. The web app does exactly this: it refetches the leadsheets
query (and the missing-items query) whenever the review task ends or a sign-off
is toggled.
resolved: true, the
sheet’s issueCount drops by one, and the Leadsheets.issueCount total
reflects the new state. If you undo a sign-off, the same refetch backs the
issue out again.
See also
- Leadsheets and review for the full
Leadsheets,Leadsheet,LeadsheetSheetIssue,LeadsheetFieldRow, andLeadsheetTracetype definitions, plus theDocumentMessageannotation and thread APIs. - Document messages
for the broader
DocumentMessageAPI (annotations, flags, threads, update/unhide) that sign-offs are one use of. - Tasks for the polling mechanics behind the
TAX_PREPtask whosetaskIdyou feed intoleadsheets(taskId:). - Run tax prep end to end for the recipe that produces the review items this flow consumes.