Context. surface customer · domain tara · route /domains/tara/teachers/[id] · auth signed-in · source apps/oshun/web/src/app/domains/tara/teachers/[id]/page.tsx
Last walked. 2026-05-29 automated runtime walk (Playwright headless) — render, /v1 data (2xx), console/page-errors, expected content, screenshot verified; live screen-reader, touch, offline, and telemetry-delivery checks pending a manual AT pass. Evidence: WALKTHROUGH/results/runtime-sweep-2026-05-29.md; content re-verified 2026-06-03 against current source
Purpose#
Full Tara teacher profile. Renders one teacher identified by the URL segment with bio, photo, credentials, specialties, status, statistics, availability, teaching style, reviews, and "Sessions by this teacher" / "Courses by this teacher" lists.
Entry points#
- Teacher directory —
/domains/tara/teachers→onSelectTeacher(id)navigates here - Tara hub — teacher byline links (verify in
/tara) may route here - Direct URL / bookmark — yes;
params.idflows directly intoTaraTeacherProfilePage - Teacher switching from inside this view —
onSelectTeacheris also passed in so the profile can navigate to another teacher
Layout regions#
page.tsx is a 'use client' thin wrapper that:
- Reads
params.idviauseParams<{ id: string }>() - Renders
<TaraTeacherProfilePage>withteacherId,onBack, andonSelectTeacher
Inside TaraTeacherProfilePage (TaraTeacherProfile.tsx, line 1074):
- Header — back button, teacher name; status badge
(
STATUS_CONFIG[active|inactive|featured|guest]) - Identity panel — photo, full bio, credentials with type badges
- Specialties — colored chips using
SPECIALTY_COLORS(24 colors cycling viagetSpecialtyColor(index)) - Social profile icons —
Globe,Instagram,Youtube,Twitter - Teaching style — descriptive paragraph
- Statistics row — total sessions, total students, average rating (Star)
- Reviews section —
TeacherReview[]; star ratings + review text - Availability calendar — schedule view
- Sessions by this teacher — meditation list (
SIMULATED_MEDITATIONSfiltered by teacher) - Courses by this teacher — course list (
SIMULATED_COURSESfiltered by teacher)
States#
- Teacher found — full layout renders; browser spec lands on
data-tara-teacher-profile="tara-teacher-001"from the real directory search flow - Teacher missing (unknown id) — component test verifies the friendly
"Teacher not found" state and
Go Backaffordance - Status: active — ok-coloured chip; fixture logic supports it but the browser spec currently covers the featured fixture
- Status: inactive — muted chip; no current fixture path returns this branch
- Status: featured —
data-tara-teacher-status="featured"renders fortara-teacher-001with the Sparkles affordance - Status: guest — alert-coloured chip; no current fixture path returns this branch
- Reviews empty — generated reviews always return six fixture reviews today, so no empty branch is reachable
- Specialties: many — chip wrap behavior; colors cycle through 24
SPECIALTY_COLORS - Reduced motion — accessibility spec emulates reduced motion and scans the profile route for route-level violations
Interactions#
Header#
- Back (button) — component test drives
onBack; browser profile test also uses browser back after the course handoff to restore the profile
Bio panel#
- Read full bio — no expand affordance exists; the full fixture bio is rendered inline in the profile hero/body
Social icons#
- Globe — disabled until real teacher website URLs exist;
aria-label="Website profile not connected"is asserted in component and browser specs - Instagram / Youtube / Twitter — disabled until real teacher social URLs exist; no unsafe external anchors are emitted
Specialty chips#
- Specialty chip — filters meditations/courses by specialty (verify whether this surface routes to the directory with the filter applied)
Statistics row#
- Total sessions / followers — non-interactive numbers inside
data-tara-teacher-profile-stats - Average rating —
Staricon + numeric inside the same stats region
Reviews#
- Review row — non-interactive; component test asserts all six
data-tara-teacher-profile-reviewrows render - Pagination / "See more" — no pagination affordance exists in source
Availability calendar#
- Calendar cell click — display-only availability cells; component
coverage asserts all seven
data-tara-teacher-profile-availability-daycells, and no booking control is emitted on this route
Sessions / courses lists#
- Meditation row (
Playicon) — display-only fixture row until simulated meditation ids map to real/tara/sit/<id>sittings; browser spec assertsdata-tara-teacher-profile-session-row="tara-med-001"has no nested anchor rather than faking a player handoff - Course row (
BookOpen) — real anchordata-tara-teacher-profile-course-link="tara-course-001"opens/domains/tara/courses/tara-course-001; browser spec follows it todata-tara-course-detail="tara-course-001" -
ChevronRight— affordance hint
Direct teacher-switching#
- Switch teacher —
onSelectTeacher(id)pushes/domains/tara/teachers/<id>(provided by the page wrapper)
Current E2E evidence#
apps/oshun/web/e2e/tara-teacher-pages.spec.ts—teacher directory search routes into full teacher profilessearches the real teacher directory, lands ontara-teacher-001, verifies featured status, disabled social controls, display-only session rows, follows the course link to/domains/tara/courses/tara-course-001, assertsdata-tara-course-detail="tara-course-001", then browser-backs to the profile.apps/oshun/web/e2e/tara-teacher-pages-accessibility.spec.tsscans both the directory and profile under reduced motion with axe.apps/oshun/web/src/components/domains/tara/__tests__/TaraTeacherProfile.test.tsxcovers unknown-teacher fallback, lineage/no-lineage branches, disabled external-profile controls, availability/review row counts, display-only session rows, course hrefs, and featured-teacher switching.
Data & contracts#
- Reads:
SIMULATED_TEACHERSfrom@/lib/tara/tara-simulation-dataSIMULATED_MEDITATIONS(filter by teacher)SIMULATED_COURSES(filter by teacher)- Generated reviews via
generateReviews(teacherId)(in-file) - Content types:
TaraTeacher,TaraMeditation,TaraCourse,MeditationCategory,MEDITATION_CATEGORY_LABELS,VOICE_STYLE_LABELSfrom@/lib/tara/content-types
- Writes: None.
- Realtime: None.
- Caching: client-only
- Auth/role check: shell middleware
- Route param:
params.id: string— no decode in the page wrapper
Cross-references#
- Sibling Tara routes:
- Component sources:
apps/oshun/web/src/components/domains/tara/TaraTeacherProfile.tsx(TaraTeacherProfilePageline 1074)
- Feature spec:
V1/features.md#tara
Open questions / known gaps#
- Confirm the BFF endpoint for live teacher data — today
SIMULATED_TEACHERSandgenerateReviewsare local fixtures - Document the booking / scheduling integration for the availability calendar — none is emitted today; the cells are display-only
- Verify external-link safety on social icons — no external anchors are
emitted until real URLs exist, so there is no
target/relrisk on this route - Confirm whether the profile should expose a "Follow teacher" affordance and where that state persists