Skip to content

View as role: let administrators pick themselves as a student - #90

Merged
miguelr-dev merged 1 commit into
mainfrom
view-as-myself
Oct 28, 2026
Merged

miguelr-dev merged 1 commit into
mainfrom
view-as-myself

Conversation

@miguelr-dev

Copy link
Copy Markdown
Owner

Summary

Problem: in View as role → Student, an administrator couldn't pick themselves. Admin accounts are created without a student record, and that list only shows students who have one.

Fix:

  • The student list now starts with Me. The first time, it reads "Me · create my student record", which adds a blank student record under your own ID (logged in the transaction log), links it to your account, and switches you to viewing as yourself. After that it shows "Me · ".
  • Choosing Student now defaults to your own record when you have one.
  • Your new record starts blank, so you get the Getting started steps: complete your record, then an outline, then registration, exactly like a new student.
  • Your admin view doesn't change: the dashboard and Search courses only use an account's student record while acting as a student, so as yourself you still land on Search courses as before.

Test plan

  • npm run typecheck, npm test (158 pass), npm run build
  • Local build, signed in as an admin with no student record: "Me · create my student record" was offered, it created the record and switched to it, the dashboard showed the getting-started steps, Return to my account restored the normal admin view, and the list then showed "Me · " first, with Student defaulting to it.
  • Not tried on the live site yet. After merging: View as role → Student → "Me · create my student record".

🤖 Generated with Claude Code

Administrator accounts are created without a student record, so the role
switcher's student list never included the signed-in admin. The list now
leads with "Me". The first time it reads "Me · create my student record",
which adds a blank record under the admin's own ID (logged), links it to the
account, and switches to viewing as that student. The record starts with the
getting-started steps like any new student. Choosing Student now defaults to
your own record when you have one.

The dashboard and Search courses only use an account's linked student record
while acting as a student, so an administrator's own view is unchanged after
creating one.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@miguelr-dev miguelr-dev self-assigned this Oct 28, 2026
@vercel

vercel Bot commented Oct 28, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
signmeup Ready Ready Preview Oct 28, 2026 6:45am UTC

@miguelr-dev
miguelr-dev merged commit 4ad5404 into main Oct 28, 2026
5 checks passed

This branch was successfully deployed

1 active deployment
Preview — 840fc540 Deployed Oct 28, 2026 by vercel[bot]
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