Skip to content

AI Tutor — Chat Backlog Polish

Status: In progress (2026-06) Surfaces: apps/web AI Tutor / chat (B2B AITutorPage, B2C ChatPage), teacher home, learner nav.

A batch of chat-surface corrections raised from internal review. Most items are small IA/UX fixes; this doc exists because several change what users see and look for (a removed quick action, a removed page, a new sidebar tab, a resized widget) — all gate triggers.

Why this exists

The batch came from a working session reviewing the live AI Tutor against what users actually need. The honest source for most items is self-initiated product review by Bhanu, not an external ticket — flagged here so we don't overclaim validation.

  1. Who asked for it? Bhanu, during a chat walkthrough. Self-initiated hypotheses, not user interviews.
  2. What user pain? A trainer opening the home composer sees "Create content" (a vague near-duplicate of the other intents). A B2B learner sees "Test Prep", a B2C-only flow that doesn't belong in an institutional account. Past conversations have titles but no way to reopen them by name. A generated presentation renders oversized and gives no sense of what was produced.
  3. Cost of not doing it? Low individually, compounding together: a cluttered, slightly-wrong chat surface that erodes trust on both B2B and B2C.
  4. Validated or guess? Guess / heuristic. These are correctness-of-surface fixes, not bets on new value — the risk of being wrong is low because we are mostly removing or tidying, not adding net-new behavior.
  5. How we'll know it worked? Removed items: no support confusion about "Create content" or learner-side Test Prep. History tab: users reopen prior chats by title instead of starting over. Sean Ellis counterfactual — if we pulled the history tab a week later, returning users who rely on prior chats would notice and complain.

What we're building

# Item Change Trigger
10 Test Prep not in B2B Wizard gate + /test-preps route + learner nav now B2C-only (ROLES.B2C_USER). LEARNER_ROLES unchanged. IA / gating
2 Remove "Create content" quick action Dropped the differentiate teacher intent (mapped to create_content) from home composer + hero chips. create_content LearningMode kept for other flows. IA removal
5 Presentation standard-sized + preview Bubble width max-w-[90%]max-w-[75%] (standard); PresentationCard gains a contained faux-slide preview (title + subject + slide-stack visual, derived only from TPresentationDonePayload). UX
6 Save history with names Surface saved conversations (by title) in the AI Tutor sidebar via the existing ConversationList; open/delete/active-highlight wired to useConversationLifecycle. New surface
3 Remove "Learner feedback" Deleted the learner-facing feedback page (student/FeedbackPage) + route + lazy import + learner nav entry. Trainer/admin FeedbackInboxPage + services/feedback kept. IA removal

Already correct (verified, no change)

These were on the list but the code already does the right thing — kept here so we don't redo them:

  • Clear input after sending — all three submit paths clear the composer: standard useChatHandlers.handleSubmit:153, research :83, presentation usePresentationHandler (setValue(FIELD.message, '')). No draft cache exists.
  • Loading on send for Presentation + Deep ResearchComposer.SendPill pipes isBusy → Button loading; both flows set aiTutorStore.isLoading, so the send button already spins.
  • User name + type in B2CUserCard renders first_name last_name + roleLabel; DashboardLayout.getRoleLabel resolves B2C user_type (creator/learner/operator) and B2B terminology. Already shown in the sidebar.
  • Persist ongoing chat across re-entryNewChatRoute resumes the most recent conversation within a 24h window (#1061). Messages + form context restored on re-entry; in-flight streaming / scroll intentionally not.

Audit-only (no code change)

  • Chat upload limits (trainer vs learner) — Chat: 3 files × 10MB, FE (AITutorPage/types.ts) and BE (attachment_context.py, MAX_ATTACHMENTS_PER_REQUEST=3) in sync. B2B learner is intentionally blocked from chat upload (canUploadChatAttachments, roles.ts:30); instructor + B2C allowed. Test Prep wizard allows 4 files (separate flow). Confirmed intended (Bhanu) — documented, not changed.

Non-goals

  • Not building assignment/exam chat widgets (item 8) — deferred; only MockTestCard exists today, this is greenfield and needs its own doc.
  • Not adding draft-text persistence, scroll restoration, or in-flight stream resume to the re-entry flow.
  • Not changing the create_content learning mode or its backend.
  • Not touching trainer/admin feedback (grading feedback, FeedbackInboxPage, feedback_360).
  • Not removing orphaned feedback.* i18n keys — shared with the kept inbox page.

Rejected alternatives

  • Hide Test Prep in B2B with CSS / feature flag — rejected; the route was also reachable directly. Gated at the route + nav + wizard for a complete fix.
  • Full slide-image thumbnail in the presentation preview — rejected; the done payload carries no image/slide URLs, only metadata. A faux slide-stack derived from real fields avoids inventing data.
  • A brand-new history sidebar — rejected; ConversationList already exists. Wire it into the mounted tree rather than build a parallel surface.

Changelog

  • 2026-06-16 — Doc created alongside implementation. Batch triaged from 11 raw items: 5 built, 4 verified already-correct, 1 audit-only, 1 (assignments/exams widget) deferred.