zgbrenner makes Gary's task suggestions clickable

A column that used to just suggest a next step now launches it.

workflowchat-ui

When Gary builds a review table over a set of documents, one column proposes a saved legal task for each row - contract review, discovery summary, and the like. Until now that was read-only advice. zgbrenner turned it into a button: click the cell, confirm in a modal that previews the exact prompt, and you land in the assistant with the task selected, the document attached, and the prompt filled in. Nothing sends on its own - you read it, edit it, then submit.

Two sensible guardrails. The button only appears when the suggestion matches one of eight recognised tasks, so Gary's frequent misclassifications don't offer a dead-end action. And because the prefilled prompt is built from values Gary extracted - which can carry a wrong date or party name - the prompt itself tells Gary to treat the row as unverified. A mitigation, the owner is candid, not a fix.

So what Worth a look for anyone running document-review tables who wants the suggested next step to be one click away - with the AI-extracted inputs treated as draft, not gospel.

View this fork on GitHub →

Spotted something wrong? Or know the PR text has fresher detail than the writeup above?

Commits in this thread

1 commit from zgbrenner/gary, oldest first. Source extracted verbatim from the harvested git log.

SHA Subject Author Date
b01092b7 feat: run a Saved Legal Task from a Review Table row Claude 2026-05-20 ↗ GitHub
commit body
Make the "Suggested Saved Legal Task" column actionable. When Gary
suggests a recognized task for a document, a lawyer can launch that
task in the assistant prefilled with the row's context.

- suggestedTask.ts: maps the eight recognized task names to built-in
  Saved Legal Task ids. Matching tolerates whitespace, case, tag
  brackets, and trailing punctuation but is never fuzzy - an
  unrecognized value resolves to null rather than guessing. Also
  builds the row-context prompt (task name, matter, document name,
  extracted fields, and attorney-review safety language).
- RunSuggestedTaskModal.tsx: a simple "Run Saved Legal Task?"
  confirmation with a prompt preview and Open in Assistant / Cancel.
- TRSidePanel: shows a "Run Suggested Task" action - only on the
  Suggested Saved Legal Task column's cell, and only when the value
  resolves to a recognized task and the cell has finished generating.
- TabularReviewView: resolves the row's suggested task, builds the
  row-context prompt from the row's other cells, and on confirm
  creates a chat, prefills an assistant draft, and opens it.
- Prefill, not auto-run: a new newChatDraft channel on
  ChatHistoryContext carries a draft (content + workflow + attached
  document) that ChatInput seeds its initial state from. The lawyer
  reviews and sends manually - nothing is auto-submitted. ChatView
  renders an empty-with-draft chat instead of the loading skeleton.
- The row's document is attached via the existing chat file
  mechanism; the document_id rides in the attachment, never in the
  visible prompt text. No raw internal ids appear in the prompt.
- Safety: the prompt instructs Gary to treat the row as draft and
  unverified, use the uploaded document, not invent facts / dates /
  legal authorities / deadlines / parties, and flag uncertainty.
- Docs: add "Running a Saved Legal Task from a Review Table" to the
  U.S. lawyer guide; add a terminology-map entry.
- Tests: suggestedTask.test.ts covers the eight-task mapping (and
  that each id is a real assistant built-in), match tolerance, the
  no-fuzzy-match guarantee, blank/Unknown/None handling, the prompt's
  attorney-review language, Unknown fallbacks, and the absence of raw
  internal ids and legacy terminology.

Capture this thread into my fork

Download a single Markdown prompt that tells Claude how to port every commit above into your working tree — adapting paths and structure to match your repo. Run it via claude -p < capture-thread-569.md from inside the repo you want the changes in.

⬇ Download capture-thread-569.md