Skip to content

Greet new learners with a 3-tap walkthrough and a plan, not empty progress - #361

Draft
AQIB-NAWAB wants to merge 1 commit into
mainfrom
feat/first-run-walkthrough
Draft

AQIB-NAWAB wants to merge 1 commit into
mainfrom
feat/first-run-walkthrough

Conversation

@AQIB-NAWAB

Copy link
Copy Markdown
Collaborator

Why

A new learner who enrolled in two courses saw "In progress, 0%" cards under "Pick up where you left off" before opening any lesson. That is confusing, and it gives no direction. Enrolling set startedAt, so the home screen never showed "Ready to begin".

What changed

First-run walkthrough (home screen, new learners only)

  • 3 tap-only questions: why you are here, which area, where you are now. A tap moves on by itself; there is no Next button and no typing. The area step is skipped when the catalog has only one area.
  • One quick question from the chosen area (guess, then see the answer), so the learner learns something before any dashboard.
  • A plan: one course to start, with a reason ("Because you picked Tech and you are new to it") and one "Start lesson 1" button. Two other choices and "Go to my home" are small links. An optional daily pace (5, 10 or 20 min) becomes the study goal.
  • "Skip" and "Back" are always there. Skipping also marks it done.
  • Suggestions are simple rules in frontend/src/lib/first-run.ts: free first, then fit to level, then rating, then course size. One card per title. No AI call, so no AI credits.
  • Who sees it: firstRunAt is empty, no course begun, and no course from an invite, Pathment or an organization. Existing active learners never see it.

Server

  • User.firstRun (JSON) and User.firstRunAt, migration 20261203180000_first_run.
  • PUT /api/v1/learner/first-run: answers (strict enums) or { skipped: true }.
  • The dashboard model returns firstRun: { show }.

Labels

  • An enrolled course with no opened chapter is "Ready to begin" (button "Start").
  • On the first day, course cards drop the empty 0% bar and show "27 lessons · first lesson open". The badge says "Started", and the section text no longer says "Pick up where you left off".

Testing

  • Server and web typechecks pass. sync-shared --check passes.
  • Web: 5,130 tests pass, including new tests/unit/lib/first-run.test.ts.
  • Server: 1,729 pass. 3 fail locally, not from this change: the 2 dev-login tests need seed accounts, which the scratch test DB does not have. The realtime origin test expects port 3000, and the local .env used port 3061. It passes with APP_URL=http://localhost:3000.
  • New tests: the walkthrough show/save/hide flow through the API (it also sets the daily goal and rejects typed fields), eligibility rules, and "Ready to begin" vs "In progress".
  • Clicked through in a browser at 1280px and 390px wide: all steps, "Start lesson 1" opens lesson 1, and the home screen afterwards.

🤖 Generated with Claude Code

…gress

A new learner now answers three tap-only questions on the home screen (why
they are here, which area, where they are now), gets one quick question
from that area, then a plan: one course to start with a single "Start
lesson 1" button, two other choices, and an optional daily pace. Skip and
Back are always there. Answers are saved on the user (firstRun, firstRunAt)
through PUT /api/v1/learner/first-run, and the daily pace becomes the study
goal. Learners who already began a course, or who were given one by an
invite or an organization, never see it.

An enrolled course that nobody has opened now shows "Ready to begin"
instead of "In progress, 0%". On a learner's first day the course cards
drop the empty 0% bars and say how many lessons each course has.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@AQIB-NAWAB
AQIB-NAWAB marked this pull request as draft December 3, 2026 13:18

This branch has not been deployed

No deployments
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