Add Gary-mode home: four action cards on the assistant empty state

✅ merged · #6 · foolish-bandit/gary ← foolish-bandit/gary · opened 19d ago by foolish-bandit · merged 19d ago by foolish-bandit · self · +143-6 across 2 files · ↗ on GitHub

From the PR description

Summary

Reframes /assistant (the auth-gated home) for a non-technical lawyer. Adds four action cards above the existing chat input, all wired to existing routes/APIs:

  • Ask Gary - "Ask Gary questions and check the cited sources." → focuses the chat input.
  • Upload Document - "Upload a legal document to get started." → triggers a file picker, uploads via the existing /single-documents endpoint, and attaches the resulting doc as a chip on the chat input. Spinner during upload.
  • Review Contract - "Review a contract for key terms, risks, and missing clauses."router.push("/tabular-reviews") (existing route).
  • Draft Something - "Draft letters, emails, memos, clauses, and summaries."router.push("/workflows") (existing route; built-in assistant-type workflows produce summaries / docx drafts).

Hides the model dropdown only on this empty state via a new hideModelToggle prop on ChatInput. The dropdown still appears on the in-chat ChatView and the picker remains at /account/models, so functionality is preserved.

ChatInputHandle (already a forwardRef handle for addDoc) now also exposes focus(), used by the Ask Gary card.

What was deliberately not changed

  • No backend changes - git diff main..HEAD -- backend/ is empty.
  • No new routes, no auth/billing/teams/roles, no new AI workflows, no provider logic.
  • Sidebar nav (Assistant / Projects / Tabular Review / Workflows) and ChatView are untouched.
  • License unchanged (AGPL-3.0-only).

Technical surfaces still visible (reported, not removed)

Per the brief - flag where technical/provider language remains:

  • Sidebar (AppSidebar.tsx): items labeled "Tabular Review" and "Workflows" use feature jargon. Left as-is to keep existing routes intact.
  • Chat input on ChatView (in-chat): still shows the ModelToggle (e.g. "Claude Opus 4.7", "Gemini 3.1 Pro") and an AlertCircle indicator if the API key is missing. Hidden on the home empty state but kept inside an active conversation so users can switch models mid-thread.
  • /account/models ("Models & API Keys" tab): exposes API-key inputs by provider. This is the existing settings/advanced UI, untouched.
  • AssistantWorkflowModal / AddDocumentsModal: still reachable from the chat input. Unchanged.

Files changed

  • frontend/src/app/components/assistant/InitialView.tsx - add four-card grid, hidden file input, refs to ChatInput / file input, useRouter wiring.
  • frontend/src/app/components/assistant/ChatInput.tsx - extend ChatInputHandle with focus(); add hideModelToggle prop.

Build / lint / tests

  • npm run lint - 108 problems before, 108 problems after (identical baseline; none in the two changed files). All errors/warnings predate this PR.
  • npx tsc --noEmit - clean, no type errors.
  • npm run build - fails identically on main and on this branch with the sandbox blocking fonts.googleapis.com (next/font Google download). Not a code issue. Cloudflare Workers Builds will run a real build on push.
  • No test scripts in frontend/package.json or backend/package.json.

Test plan

  • Workers Build for this PR succeeds.
  • On the preview Worker URL, log in and confirm the home shows the greeting, the four cards, and the chat input.
  • Click Ask Gary → chat textarea is focused.
  • Click Upload Document, pick a small PDF or DOCX → spinner shows, file appears as a chip on the chat input.
  • Click Review Contract → lands on /tabular-reviews.
  • Click Draft Something → lands on /workflows.
  • Confirm model dropdown is gone on the empty state but reappears once a chat is started (i.e. on ChatView).

https://claude.ai/code/session_019pRkhcGDRKQWHjzAnV5yCL


Generated by Claude Code

Our analysis

Reframe the assistant home around four lawyer-facing action cards — read the full analysis →

Think the analysis missed something the PR description covers?

Commits in this PR (1)

SHA Subject Author Date
d761a8da Add four action cards to assistant home for Gary mode Claude 2026-05-07 ↗ GitHub
commit body
Replaces the bare 'Hi, {name}' empty state with a 2x2/4-up grid of
lawyer-friendly action cards above the existing chat input:

- Ask Gary - focuses the chat input
- Upload Document - uploads via existing /single-documents route and
  attaches the doc as a chip on the chat input
- Review Contract - routes to /tabular-reviews
- Draft Something - routes to /workflows

Hides the model dropdown only on the empty state (still available on
in-chat ChatInput and at /account/models). No new routes, no backend
changes, no removed functionality. ChatInputHandle gains a focus()
method and ChatInput gains a hideModelToggle prop.

https://claude.ai/code/session_019pRkhcGDRKQWHjzAnV5yCL

Capture this PR into my fork

Download a Markdown prompt that tells Claude how to port every commit in this PR into your working tree. Run it via claude -p < capture-pull-6.md from inside the repo you want the changes in.

⬇ Download capture-pull-6.md