Skip to content

feat(web): wire Study Buddy into the reader (AI-038b)#330

Merged
mrviduus merged 1 commit into
mainfrom
ai-038b-studybuddy-wiring
Jun 15, 2026
Merged

feat(web): wire Study Buddy into the reader (AI-038b)#330
mrviduus merged 1 commit into
mainfrom
ai-038b-studybuddy-wiring

Conversation

@mrviduus

Copy link
Copy Markdown
Owner

Phase 6 AI-038, slice b — the panel is now reachable end-to-end: select a passage in the reader → "Help me understand this" → the agent investigates live (steps stream in, answer at the top).

Changes

  • SelectionToolbar gains a "Help me understand this" action (sparkles icon) next to Explain, rendered only when onStudyBuddy is wired (catalog editions).
  • ReaderHighlights passes the whole selected passage up via a new onStudyBuddy(passage) prop, then clears the selection.
  • ReaderPage holds the passage state and renders StudyBuddyPanel (catalog editions only — same gate as Ask), threading the current chapter number so get_chapter/get_chapter_summary have context. Selecting a new passage re-runs the agent.
  • i18n: reader.selectionToolbar.studyBuddy.

Verification

  • tsc --noEmit + pnpm build clean; full web suite green (517 — the AI-038a hook/panel/api unit tests already cover the behaviour).
  • Confirmed no e2e clicks the selection toolbar by positional index (the AI-026a top-bar lesson), so the new button can't shift another test's target.
  • The live agent run (key + corpus) is verified on prod after deploy; closes the visible half of Phase 6's Study Buddy.

🤖 Generated with Claude Code

SelectionToolbar gains a 'Help me understand this' action (sparkles) next to
Explain; ReaderHighlights hands the selected passage up via onStudyBuddy;
ReaderPage renders StudyBuddyPanel (catalog editions) with the current chapter
number threaded for the agent's chapter tools. i18n added.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@mrviduus mrviduus merged commit b808959 into main Jun 15, 2026
5 checks passed
@mrviduus mrviduus deleted the ai-038b-studybuddy-wiring branch June 15, 2026 14:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant