Add 'Explain This' page, switch to Inter font, and surface dev/back-end availability messaging
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
Interto 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.tsxthat collects legal text, context, goal, and tone, builds a structured prompt, and starts a chat viahandleNewChator shows a backend-unavailable message. - Updated the assistant initial view (
InitialView.tsx) to include an "Explain This" action card, handle upload errors withuploadErrorstate, and grow the action grid to accommodate the new card. - Changed error copy in
draft/page.tsxandreview/page.tsxto a singleBACKEND_UNAVAILABLE_MESSAGEinforming users that the feature requires a connected backend. - Switched font strategy: added
@fontsource/intertofrontend/package.json, imported Inter inglobals.css, removednext/font/googleusage fromlayout.tsx, and updated CSS variables to use Inter as the default for--font-sansand--font-serif. - Small UX/copy changes including renaming the sidebar item label from "Assistant" to "Ask Gary" in
AppSidebar.tsxand displaying a dev auth bypass banner inlogin/page.tsxandsignup/page.tsxwhenNEXT_PUBLIC_GARY_SKIP_AUTHis set.
Testing
- Ran a local frontend build with
cd frontend && npm ci && npm run buildwhich completed successfully. - Ran linting with
cd frontend && npm run lintand no lint errors were reported.
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.