Skip to content

feat(tutor): viewport-centred lesson grounding + quiz/summarize chips#204

Merged
heznpc merged 1 commit into
mainfrom
feat/tutor-grounding
Jun 10, 2026
Merged

feat(tutor): viewport-centred lesson grounding + quiz/summarize chips#204
heznpc merged 1 commit into
mainfrom
feat/tutor-grounding

Conversation

@heznpc

@heznpc heznpc commented Jun 10, 2026

Copy link
Copy Markdown
Owner

Item 4a of the learning-companion deepening ("번역기 → AI 코스 학습 동반자").

Viewport-centred grounding

getPageContext used to send the first 2,000 chars of the lesson — questions about anything past the fold had no grounding. Now it sends a short lesson opening (global context) + the text from the block the user is currently viewing, and the heading map marks the current section with . Hard-capped at 2,000 chars total, so the privacy policy's "≤2,000 chars of lesson context" disclosure keeps holding. Exam-page behavior unchanged.

New chips (12 UI languages)

"Quiz me on this lesson" and "Summarize this lesson" — the two highest-value actions a lesson-grounded tutor can serve. (Kept "key takeaways", rotated out the redundant third example to keep the row tight.)

Gates: 527 unit · full E2E 19/19 · lint · prettier — green.

🤖 Generated with Claude Code

Item 4a of the learning-companion deepening:

- getPageContext now grounds the tutor in what the user is ACTUALLY reading.
  Long lessons used to send only the first 2,000 chars, so questions about
  anything past the fold had no grounding. The context now carries a short
  lesson opening (global context) + the text from the block currently in the
  viewport, and the heading map (up to 8) marks the current section with "▶".
  Hard-capped at 2,000 chars total — the privacy policy's "≤2,000 chars of
  lesson context" disclosure holds regardless of how the pieces combine.
  Exam-page behavior unchanged.

- Two new suggestion chips in all 12 UI languages: "Quiz me on this lesson"
  and "Summarize this lesson" — the two highest-value learning actions the
  grounded tutor can serve ("key takeaways" chip kept; the redundant third
  example rotated out to keep the chip row tight).

Gates: 527 unit tests, full E2E 19/19, lint, prettier — green.
@heznpc heznpc enabled auto-merge (squash) June 10, 2026 06:53
@heznpc heznpc merged commit 6ca5a66 into main Jun 10, 2026
9 checks passed
@heznpc heznpc deleted the feat/tutor-grounding branch June 10, 2026 06:55
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