Fourth revision: OpenRouter, live tool stages, Explain layout, share sections
All checks were successful
Verify and publish V2 container / build-and-push (push) Successful in 29s

- Interactive blocks are encouraged by default; Explain gets a reduced library
  and never writes practice questions.
- Assistant tool steps breathe while running, show live stages from generation
  and the Python check, and read in the past tense when done.
- The assistant asks before searching the web when class materials do not
  cover a question; clarifying questions list every class's exams and never
  ask about format (always NCLEX).
- Explain opens beside the question from 900px wide, moving the question left
  while open and back on the next one.
- Generate dialog drops the practice set/exam switch (presets cover it) and the
  Generate buttons lose their icon.
- Python check notes are green when every check passed, applied fixes neutral.
- Share pages group by exam, then Quizzes, Flashcards, Notes, Class Materials,
  hiding empty groups; the class page uses the same order. "Documents" is now
  "Class Materials".
- OpenRouter provider replaces the Ollama type; migration 6 turns Ollama
  connections into OpenAI-compatible ones at /v1.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Elijah 2026-11-15 21:54:39 -07:00
parent c595e0ff2c
commit 25bc03ea75
45 changed files with 663 additions and 329 deletions

View file

@ -214,6 +214,9 @@ export function QuizRunner(p: RunnerProps) {
const confirm = useConfirm();
const [elapsed, setElapsed] = useState(p.elapsedSec);
const [navOpen, setNavOpen] = useState(false);
// Room the Explain panel needs on the right on smaller screens (0 = question stays centred).
const [explainReserve, setExplainReserve] = useState(0);
const explainSide = useMemo(() => ({ reserve: setExplainReserve }), []);
const topRef = useRef<HTMLDivElement>(null);
const tick = useLatest(p.onTick);
const finish = useLatest(p.onFinish);
@ -367,7 +370,11 @@ export function QuizRunner(p: RunnerProps) {
<ProgressBar value={answeredCount / total} tone="ink" className="h-[3px] rounded-none" label="Progress" />
</header>
<main className="mx-auto w-full max-w-3xl flex-1 px-4 pt-6 pb-32 sm:px-5 sm:pt-9">
<main
className="mx-auto w-full max-w-3xl flex-1 px-4 pt-6 pb-32 transition-[transform,max-width] duration-300 ease-out motion-reduce:transition-none sm:px-5 sm:pt-9"
// Explain open on a smaller screen: the question moves left and narrows to make room.
style={explainReserve ? { maxWidth: Math.min(768, window.innerWidth - explainReserve - 40), transform: `translateX(-${explainReserve / 2}px)` } : undefined}
>
<div ref={topRef} className="scroll-mt-20" />
<div key={question.id} className="animate-in">
<div className="mb-3 flex flex-wrap items-center gap-2">
@ -398,7 +405,7 @@ export function QuizRunner(p: RunnerProps) {
<Markdown className="text-[15px]">{question.rationale}</Markdown>
</div>
)}
<ExplainSideContext.Provider value>{p.renderExtra?.(question, answerTexts(question, selected))}</ExplainSideContext.Provider>
<ExplainSideContext.Provider value={explainSide}>{p.renderExtra?.(question, answerTexts(question, selected))}</ExplainSideContext.Provider>
</div>
)}
</div>