Skip to content

feat(ai): mobile UI for Tutor + Librarian agents (AI-Agent-2/3)#400

Merged
mrviduus merged 1 commit into
mainfrom
feat/mobile-agent-ui
Jun 26, 2026
Merged

feat(ai): mobile UI for Tutor + Librarian agents (AI-Agent-2/3)#400
mrviduus merged 1 commit into
mainfrom
feat/mobile-agent-ui

Conversation

@mrviduus

Copy link
Copy Markdown
Owner

Mobile (Expo/RN) parity for the two agent UIs shipped on web (frontend port → adversarial QA). Brings both shipped agents to full web+mobile parity.

What

  • Tutor "Smart session" — Vocabulary tab → /tutor: plan view (rationale + per-item exercise badge / difficulty / why + reading nudge) → study via the existing mobile FlashCard rendered straight from the enriched plan item (no vocab re-fetch) → HITL feedback re-plan → summary.
  • Librarian "Ask the librarian" — Search tab → /librarian: NL query → reasoning + ranked cards. library recs tap through to /book/[slug]; open_library recs are dashed "Suggestion — not in your library yet" cards with no navigation; usedExternal note.
  • Faithful port of the web hardening: mounted-guard + AbortController, same-session feedback retry, MAX_ROUNDS=8 cap, clamped LLM text, unknown-exerciseType fallback.
  • agents.ts (DTO types + authFetch API + pure helpers), useTutorSession/useLibrarian hooks, TutorPlanView + librarian/* components, screens app/tutor.tsx + app/librarian.tsx. Strings via shared t() (keys → packages/shared/src/i18n/en.json); colors via useTheme() (dark mode); haptics/TTS wired.

QA (adversarial) — 0 blockers / 0 should-fixes

The two web→mobile regression risks confirmed correct: the library card routes to the existing /book/[slug] with null-slug guard; external recs are plain non-navigable Views. State-machine fidelity (abort/retry/round-cap), theming, i18n keys (46 referenced, 0 missing), and the auth gate all verified.

Verify

npx tsc --noEmit clean · 52 mobile vitest green (14 new pure-helper tests). No new network processor (first-party /me/tutor/* + /me/librarian; Play Data Safety unaffected).

On-device verification owed (Expo Go limits)

Nav to book + back-stack, Android keyboard-avoid on the librarian input, haptics/TTS on hardware, dark mode on both screens.

Deferred

SSE streaming, external-book ingest, admin replay, tablet layout.

🤖 Generated with Claude Code

Expo/RN parity for the two agent UIs. Tutor "Smart session" (Vocabulary tab ->
/tutor): plan view (rationale + per-item why + nudge), study via existing
FlashCard from the enriched plan (no vocab re-fetch), HITL re-plan -> summary.
Librarian "Ask the librarian" (Search tab -> /librarian): reasoning + ranked
recs; library -> /book/[slug], open_library -> marked suggestion, no nav.

Ports web hardening: mounted/abort guard, same-session feedback retry,
MAX_ROUNDS=8 cap, clamped LLM text, unknown-exerciseType fallback. agents.ts
(types + authFetch API + pure helpers), useTutorSession/useLibrarian hooks,
TutorPlanView + librarian/* components. Strings via shared t(); colors via
useTheme(); haptics/TTS wired. No new network processor.

tsc clean; 52 mobile vitest green (14 new). QA: 0 blockers (book route + external
no-nav both confirmed). On-device verification owed.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@mrviduus mrviduus merged commit 8a47f5c into main Jun 26, 2026
5 checks passed
@mrviduus mrviduus deleted the feat/mobile-agent-ui branch June 26, 2026 15:17
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