V1 Web PWA · Surface walkthrough

Tara — teacher profile

A per-surface walkthrough of the V1 Web PWA customer surface: layout, states, interactions, data, and cross-references.

walked
9sections5 minread

On this page

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/teachersonSelectTeacher(id) navigates here
  • Tara hub — teacher byline links (verify in /tara) may route here
  • Direct URL / bookmark — yes; params.id flows directly into TaraTeacherProfilePage
  • Teacher switching from inside this viewonSelectTeacher is also passed in so the profile can navigate to another teacher

Layout regions#

page.tsx is a 'use client' thin wrapper that:

  1. Reads params.id via useParams<{ id: string }>()
  2. Renders <TaraTeacherProfilePage> with teacherId, onBack, and onSelectTeacher

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 via getSpecialtyColor(index))
  • Social profile iconsGlobe, Instagram, Youtube, Twitter
  • Teaching style — descriptive paragraph
  • Statistics row — total sessions, total students, average rating (Star)
  • Reviews sectionTeacherReview[]; star ratings + review text
  • Availability calendar — schedule view
  • Sessions by this teacher — meditation list (SIMULATED_MEDITATIONS filtered by teacher)
  • Courses by this teacher — course list (SIMULATED_COURSES filtered 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 Back affordance
  • 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: featureddata-tara-teacher-status="featured" renders for tara-teacher-001 with 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#

  • 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 ratingStar icon + numeric inside the same stats region

Reviews#

  • Review row — non-interactive; component test asserts all six data-tara-teacher-profile-review rows 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-day cells, and no booking control is emitted on this route

Sessions / courses lists#

  • Meditation row (Play icon) — display-only fixture row until simulated meditation ids map to real /tara/sit/<id> sittings; browser spec asserts data-tara-teacher-profile-session-row="tara-med-001" has no nested anchor rather than faking a player handoff
  • Course row (BookOpen) — real anchor data-tara-teacher-profile-course-link="tara-course-001" opens /domains/tara/courses/tara-course-001; browser spec follows it to data-tara-course-detail="tara-course-001"
  • ChevronRight — affordance hint

Direct teacher-switching#

  • Switch teacheronSelectTeacher(id) pushes /domains/tara/teachers/<id> (provided by the page wrapper)

Current E2E evidence#

  • apps/oshun/web/e2e/tara-teacher-pages.spec.tsteacher directory search routes into full teacher profiles searches the real teacher directory, lands on tara-teacher-001, verifies featured status, disabled social controls, display-only session rows, follows the course link to /domains/tara/courses/tara-course-001, asserts data-tara-course-detail="tara-course-001", then browser-backs to the profile.
  • apps/oshun/web/e2e/tara-teacher-pages-accessibility.spec.ts scans both the directory and profile under reduced motion with axe.
  • apps/oshun/web/src/components/domains/tara/__tests__/TaraTeacherProfile.test.tsx covers 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_TEACHERS from @/lib/tara/tara-simulation-data
    • SIMULATED_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_LABELS from @/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#

Open questions / known gaps#

  • Confirm the BFF endpoint for live teacher data — today SIMULATED_TEACHERS and generateReviews are 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/rel risk on this route
  • Confirm whether the profile should expose a "Follow teacher" affordance and where that state persists