Add 'Explain This' page, switch to Inter font, and surface dev/back-end availability messaging

⛔ closed · #14 · foolish-bandit/gary ← foolish-bandit/gary · opened 19d ago by foolish-bandit · closed 19d ago · self · +210-22 across 11 files · ↗ on GitHub

From the PR description

Motivation

  • Introduce a lightweight "Explain This" workflow for breaking down legal language and surface UI messaging when the backend or dev bypass is not available.
  • Replace the custom Google font handling with Inter to simplify font loading and ensure consistent sans-serif/serif fallbacks.
  • Improve user feedback for document uploads and feature availability, and make the sidebar wording clearer for end users.

Description

  • Added a new page at src/app/(pages)/explain/page.tsx that collects legal text, context, goal, and tone, builds a structured prompt, and starts a chat via handleNewChat or shows a backend-unavailable message.
  • Updated the assistant initial view (InitialView.tsx) to include an "Explain This" action card, handle upload errors with uploadError state, and grow the action grid to accommodate the new card.
  • Changed error copy in draft/page.tsx and review/page.tsx to a single BACKEND_UNAVAILABLE_MESSAGE informing users that the feature requires a connected backend.
  • Switched font strategy: added @fontsource/inter to frontend/package.json, imported Inter in globals.css, removed next/font/google usage from layout.tsx, and updated CSS variables to use Inter as the default for --font-sans and --font-serif.
  • Small UX/copy changes including renaming the sidebar item label from "Assistant" to "Ask Gary" in AppSidebar.tsx and displaying a dev auth bypass banner in login/page.tsx and signup/page.tsx when NEXT_PUBLIC_GARY_SKIP_AUTH is set.

Testing

  • Ran a local frontend build with cd frontend && npm ci && npm run build which completed successfully.
  • Ran linting with cd frontend && npm run lint and no lint errors were reported.

Codex Task

Our analysis

Add Explain This workflow and tighten frontend UX — read the full analysis →

Think the analysis missed something the PR description covers?

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-14.md from inside the repo you want the changes in.

⬇ Download capture-pull-14.md