Skip to content

design system 100% - #46

Open
samuelxanda wants to merge 142 commits into
mainfrom
feat/design-system-100
Open

samuelxanda wants to merge 142 commits into
mainfrom
feat/design-system-100

Conversation

@samuelxanda

Copy link
Copy Markdown
Owner
  • feat(staff): secure one-time staff-invite onboarding flow (feat(staff): secure one-time staff-invite onboarding flow #22)
  • feat(staff): add InviteStaffDialog (one-time invite link UI)
  • feat(staff): add "Invite staff" action to UsersTab
  • feat(staff): expose invite status on the users list
  • refactor(staff): extract reusable InviteLinkPanel
  • feat(staff): manage pending invites from UsersTab
  • feat(staff): add Invite staff action to the staff roster page
  • feat(staff): link a Staff roster record when inviting stylists/receptionists
  • feat(staff): keep invited staff inactive on the roster until they accept
  • fix(appointments): hide '+ Book one now' CTA from roles that can't book
  • feat(staff): make Invite staff the primary action on /staff
  • feat(staff): one owner-provisioned onboarding flow; retire self-service invite
  • docs(activity-log): spec + handoff for Phase 2 activity log
  • feat(activity-log): add ActivityLog model + Salon back-relation
  • feat(activity-log): add logActivity helper + ACTIVITY_ACTIONS
  • feat(activity-log): add canViewActivityLog permission (admin-only)
  • feat(activity-log): record appointment, payment, user & staff mutations
  • feat(activity-log): add GET /api/activity (admin-only, cursor-paginated)
  • feat(activity-log): Activity page, feed view + admin-only nav entry
  • refactor(staff): drop Linked staff picker; stylists auto-provision a slot
  • refactor(staff): close direct staff-create path (onboarding is the only door)
  • fix(staff): auto-provision roster slot when a user is promoted to stylist
  • fix(staff): mirror user rename to linked roster slot
  • feat(auth): make OneTimeToken subject-agnostic (ownerId|userId)
  • feat(auth): add root-staff + staff-exchange token helpers
  • feat(auth): POST /api/staff/login — apex staff auth across salons
  • feat(auth): staff select (mint handoff) + me (restore picker)
  • feat(auth): handle staff handoff in /api/auth/exchange
  • feat(auth): apex login falls back to staff; picker hands off per subject
  • feat(design-system): canonical type scale + lint guardrail + normalize UI

Summary

Changes

Testing

Checklist

  • Branched off main
  • One focused change (small PR)
  • Commits include a Co-authored-by: trailer where applicable
  • Verified locally (no npm run build while the dev server is running)

samuelxanda and others added 30 commits June 5, 2026 18:26
feat(ui): standardize dark theme and improve UX consistency
fix: resolve Tailwind v4 CSS minification errors for Vercel deployment
Updated dependencies to fix Next.js and React CVE vulnerabilities.

The fix-react2shell-next tool automatically updated the following packages to their secure versions:
- next
- react-server-dom-webpack
- react-server-dom-parcel  
- react-server-dom-turbopack

All package.json files have been scanned and vulnerable versions have been patched to the correct fixed versions based on the official React advisory.

Co-authored-by: Vercel <vercel[bot]@users.noreply.github.com>
- Add stripe dependency and lazy initialization helper
- Update Salon model with stripeCustomerId and stripeSubscriptionId
- Create billing API endpoints (checkout and webhook)
- Update billing page with Stripe checkout flow
- Add success/error state handling for payment flow
samuelxanda and others added 27 commits June 15, 2026 12:03
The empty-day EmptyState showed a '+ Book one now' action to every role. For
stylists (canCreateAppointment: false) the QuickBookingForm is already hidden,
so the CTA scrolled to nothing — a dead-end create affordance. Gate the action
behind canCreateAppointment so only bookers (admin/receptionist/owner) see it.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
fix(appointments): hide '+ Book one now' from non-booking roles
…-staff-page

feat(staff): invite staff from /staff + link roster records
Replace the 'Add staff' button (roster-only, no login) with 'Invite staff' as
the single primary action, and point the empty-state CTA at the invite flow too.
The edit dialog is retained for editing existing members; direct roster-only
creation is dropped from the UI in favour of the invite link flow.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…-staff-page

feat(staff): make Invite staff the primary action on /staff
…ce invite

Standardize onboarding on owner-provisioned accounts (Add user) + forced
password reset on first login (mustResetPassword, already enforced in AppShell),
so every worker is an accountable identity and the owner provisions in one step.

- api/users POST: auto-create + link a Staff roster slot when a stylist is added
  with no existing link, so they're bookable the moment they're provisioned. No
  anonymous roster entries, no separate 'add staff' step.
- StaffView (/staff): drop Invite + Add staff buttons and the create CTA; the page
  is now roster display + manage (view, activate, edit) only. Stylists appear here
  automatically when their account is created.
- UsersTab (Settings): remove the Invite staff button, rotate/revoke actions, and
  pending/expired badges. 'Add user' is the single creation flow.
- api/users GET: drop inviteStatus from the response.

The self-service invite link backend (routes, accept page) is left dormant in the
tree, not deleted.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…d-onboarding

# Conflicts:
#	src/components/salon/StaffView.tsx
…ed-onboarding

feat(staff): one owner-provisioned onboarding flow; retire self-service invite
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…slot

The picker only existed to attach a login to a pre-existing orphan Staff row.
Under the owner-provisioned model no orphan roster entries exist, so it had
nothing legitimate to point at. Stylists get their slot auto-created on create.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…ly door)

Remove POST /api/staff and the dead create branch in StaffView so no bookable
roster entry can exist without a provisioned worker — no ghost staff.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…list

PATCH only created the Staff slot on initial create; promoting receptionist to
stylist via edit left them bookable-less. Now mirrors onboarding in a transaction.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Editing a user's name now propagates to their Staff record in the same
transaction, so the calendar and reports stay in sync with the account
(removes the User/Staff name-drift smell).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Prepares the cross-domain handoff nonce to carry a staff User subject as well
as an Owner, for apex staff login. Exactly one of ownerId/userId is set.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Parallel to the owner tokens; owner path untouched. root-staff carries the
password-verified {userId,salonId} pairs; staff-exchange is the single-use
cross-domain handoff for the staff session.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Adds a staff-exchange branch (consume nonce, re-verify active User, mint staff
session) above the unchanged owner branch; shares subdomain/salon resolution.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Apex submit tries owner login then staff login; the salon picker tracks whether
to select as owner or staff; reload-restore checks owner/me then staff/me.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Activity log + staff-model cleanup + apex staff login
…e UI

Make the UI 100% driven by the design-system source of truth (no drift):
- Named fontSize roles (micro/caption/body/subtitle/title) in tailwind.config,
  documented in DESIGN_SYSTEM.md as the single source of truth.
- scripts/check-design.mjs (npm run lint:design): fails CI on arbitrary text-[Npx]
  and raw hex/rgb/hsl colors; exempts vendored ui/ + the no-JS fallback.
- Normalized all 83 violations across 15 components/screens to the scale
  (text-[13px]->text-body, etc.) and removed a stray rgba() tooltip shadow.

npm run lint:design now passes clean. tsc clean. Zero intended visual change.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@vercel

vercel Bot commented Jun 19, 2026

Copy link
Copy Markdown
Contributor

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

Project Deployment Actions Updated (UTC)
salon-pro Ready Ready Preview, Comment Jun 19, 2026 7:05am
salon-pro-ql6q Error Error Jun 19, 2026 7:05am
salonpro-operator Ready Ready Preview, Comment Jun 19, 2026 7:05am

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.

2 participants