foolish-bandit/gary: /explain page and consistent backend-unavailable messaging
Commit `b3287856` adds a 159-line `/explain` page that wraps pasted legal text into a structured prompt and hands off to the assistant chat. It also standardises the error strings across draft and review flows and adds a handful of sidebar and auth-screen fixes.
The /explain page takes a required legal text textarea and three optional fields: context/document type, goal, preferred tone. On submit it builds an array of prompt parts, filters out empty optional fields, joins them with double newlines, and hands the assembled string to useAssistantChat.handleNewChat. The fixed structure line at the end -- "Use this structure: What it says, Why it matters, What could go wrong, Possible revision." -- is the only opinionated piece and is defined inline in the function, not as a named constant in this version.
The draft and review pages previously showed "Could not start the draft/review. Try again." when handleNewChat returned no chat ID. Both now share BACKEND_UNAVAILABLE_MESSAGE: "This will be available once GaryOSS is connected to the backend." That single string makes the frontend-without-backend state visible rather than suggesting a transient failure.
Other fixes in the same commit: the initial view gains an uploadError state so upload failures surface to the user instead of dropping to the console. Desktop sidebar open/closed state is routed through a single variable. The sidebar's chat link becomes "Ask Gary." Login and signup screens display a visible banner when NEXT_PUBLIC_GARY_SKIP_AUTH is set.
The PR was opened and merged within seconds -- consistent with a self-merge by foolish-bandit. No automated test run was reported.
Spotted something wrong? Or know the PR text has fresher detail than the writeup above?