Add 'Explain This' page, surface backend-unavailable messages, and UI/UX fixes

✅ merged · #13 · foolish-bandit/gary ← foolish-bandit/gary · opened 19d ago by foolish-bandit · merged 19d ago by foolish-bandit · self · +201-7 across 8 files · ↗ on GitHub

From the PR description

Motivation

  • Provide a new UI flow for explaining legal text in plain English so users can paste clauses and get an explanation.
  • Make it clear to users when certain flows depend on a connected backend by surfacing a consistent backend-unavailable message.
  • Fix small UI and state issues around the sidebar, upload error handling, and developer auth bypass visibility.

Description

  • Add a new client page ExplainThisPage (/explain) which builds a structured prompt from user input and starts a chat via handleNewChat.
  • Replace ambiguous error text in draft/page.tsx and review/page.tsx with a consistent "This will be available once GaryOSS is connected to the backend." message when chats cannot be started.
  • Update InitialView to add an "Explain This" action, handle upload errors with an uploadError state and message, and expand the action grid to lg:grid-cols-5 to accommodate the new card.
  • Fix sidebar persistence bug by writing sidebarOpenDesktop to localStorage in layout.tsx, rename the sidebar item label to Ask Gary in AppSidebar.tsx, and show a dev auth bypass notice on login and signup when NEXT_PUBLIC_GARY_SKIP_AUTH is true.

Testing

  • No automated tests were run for this change.

Codex Task

Our analysis

Add an Explain This flow and consistent backend-unavailable messaging — read the full analysis →

Think the analysis missed something the PR description covers?

Commits in this PR (1)

SHA Subject Author Date
b3287856 Add Explain This workflow shell Zack Brenner 2026-05-07 ↗ GitHub

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

⬇ Download capture-pull-13.md