Skip to content

feat(ui): redesign every module page to the HiFi design system + add Doctor page - #131

Merged
antosubash merged 2 commits into
mainfrom
feature/great-liskov-674388
May 6, 2026
Merged

feat(ui): redesign every module page to the HiFi design system + add Doctor page#131
antosubash merged 2 commits into
mainfrom
feature/great-liskov-674388

Conversation

@antosubash

Copy link
Copy Markdown
Owner

Summary

Implements the SimpleModulePython HiFi design (emerald + teal palette, Sora display font, glass cards) across the full UI surface — public landing, all auth flows, and every authenticated module page. Adds a new Doctor admin page mirroring sm doctor. Surfaces module-page consistency through a small set of shared packages/ui primitives.

Also fixes a handful of real bugs surfaced during the implementation pass — see Bug fixes below.

What changed

Design system (packages/ui)

  • New primitives: StatCard, SectionTitle, FilterPills
  • Refreshed: PageShell, AuthCardShell (glass card + emerald mesh blobs), ErrorScreen (gradient HTTP numerals + accent badge), PublicLayout (light surface + simple_module/python lockup)
  • Shared TONE map at packages/ui/src/lib/tone.ts — single source of truth for semantic badge / chrome class triplets
  • Globals: emerald primary scale (oklch hue 158), Sora display font swapped in for Outfit, JetBrains Mono code font

Pages redesigned

Page Highlights
Landing Mesh blobs, gradient hero, terminal CTA, 6-feature grid, quickstart split, gradient CTA strip
Login / Register / Forgot / Reset / AcceptInvite / VerifyEmail Light glass card on emerald mesh, simple_module/python lockup
Dashboard Home 4 stat cards (Members / Active / Modules / Health), full-width System module grid; demo Activity / Attention / Team panels gated to import.meta.env.DEV
Doctor (new) /dashboard/doctor, admin-only — stat cards, static checks, recent migrations, dev server status, sm CLI runner, env vars, installed modules grid
Users Index Aggregate stat cards (workspace-wide), search + filters, avatar table with status badges; Roles tab with role cards
Users Edit / Invite Section cards with gradient accent bars, role pill picker, AlertDialog on Disable + reset-link
Permissions UserEdit / RoleEdit 3 stat cards (Roles / Direct / Effective), filter, per-module switch grid, gradient progress bar
Settings Browse / Create / Edit / ModulesEdit Uniform PageShell + Card forms; left-rail module navigator with search
Profile Gradient avatar, verified badge, role pills
Error (403 / 404 / 500) Gradient HTTP numerals, accent badge per status

Backend additions

  • UserService.count_user_states() — workspace-wide active/unverified counts served as new aggregates prop on /users/admin
  • Dashboard module registers Doctor in ADMIN_SIDEBAR; doctor route slimmed to send only system_info + module_count

Bug fixes from the simplify pass

  • Reset-link generation now requires confirmation (was firing on a single click — destructive action)
  • Active / Pending invites stat cards now reflect workspace totals (were filtering the current page slice → wrong counts on page 2+)
  • Demo placeholder data on Dashboard gated to dev mode (was hardcoded fake data shipping to prod)
  • Anti-enumeration WHY comment restored in ForgotPassword so future devs don't "fix" the always-show-confirmation behaviour
  • Grid border off-by-one corrected for odd-length permission lists in UserEdit / RoleEdit
  • Manage permissions link from User Edit now points to /edit (was 405)
  • Vite dev port corrected to 5050 in README

Performance / cleanups

  • useMemo for Set constructions and groups.reduce / filter in permission editors (was rebuilt per keystroke)
  • Lookup table replaces ternary chains in Doctor CheckRow
  • TONE map deduplicated across Home.tsx and doctor-data.ts
  • PublicLayout, AuthCardShell, Doctor slimmed below the 300-line cap by extracting DemoPlaceholders and AccountStatusCard siblings

Test plan

  • npx biome ci — clean (1 pre-existing warning in ModuleForm.tsx, unrelated)
  • tsc --noEmit -p host/client_app/tsconfig.json — clean
  • scripts/check_file_size.py — under 300 lines
  • scripts/check_hardcoded_strings.py — clean
  • Smoke test — all sidebar / UI-linked routes (/dashboard/, /file-storage, /users/admin, /feature_flags, /admin/background-tasks, /settings, /dashboard/doctor, /users/me, /users/admin/invite, /users/admin/<id>, /permissions/users/<id>/edit, /permissions/roles/<id>/edit, /users/login, /users/forgot-password) return 200
  • Verify reset-link AlertDialog blocks token generation until "Generate" is clicked
  • Verify users stat cards show correct totals on page 2+ of a paginated workspace
  • Confirm demo placeholder cards on Dashboard don't render in production builds

…ystem

Implements the emerald + teal design system from the Claude Design HiFi mock
across the full surface — public, auth, and authenticated pages — and adds a
new admin Doctor page that mirrors `sm doctor`.

Design system primitives in packages/ui:

- StatCard, SectionTitle, FilterPills (new)
- PageShell, AuthCardShell, ErrorScreen (refreshed)
- TONE map at packages/ui/src/lib/tone.ts — single source for semantic
  badge / chrome class triplets
- Globals: emerald primary scale (oklch hue 158), Sora display font

Pages redesigned:

- Landing — mesh blobs, gradient hero, terminal CTA, 6-feature grid,
  quickstart split with terminal, gradient CTA strip, light footer
- Auth (Login / Register / Forgot / Reset / AcceptInvite / VerifyEmail) —
  light glass card on emerald mesh blobs, simple_module / python lockup
- Dashboard Home — 4 stat cards, system module grid, demo activity panels
  gated to `import.meta.env.DEV`
- Doctor (NEW, /dashboard/doctor) — admin-only page with stat cards, static
  checks, recent migrations, dev server, sm CLI runner, env vars,
  installed modules. Wired into AdminLayout sidebar
- Users Index — workspace-wide aggregate stat cards (active/pending), search
  + filters, avatar table with status badges; Roles tab with role cards
- Users Edit / Invite — section cards with gradient accent bars, role
  pill picker, alert-dialog confirmation on Disable + reset-link
- Permissions UserEdit / RoleEdit — 3 stat cards, search, per-module switch
  grid with proper grid borders for odd-length lists
- Settings Browse / Create / Edit / ModulesEdit — uniform PageShell + Card
  forms; module navigator with search
- Profile — gradient avatar, verified badge, role pills
- Error (403/404/500) — gradient HTTP numerals + accent badge per status

Backend additions:

- UserService.count_user_states() — workspace-wide active/unverified counts
  served as `aggregates` prop so stat cards reflect totals not the page slice
- Dashboard module registers Doctor in ADMIN_SIDEBAR; doctor route slimmed to
  only system_info + module_count

Notable fixes from the simplify pass:

- Reset-link generation requires AlertDialog confirmation (was firing on click)
- ForgotPassword keeps anti-enumeration WHY comment
- useMemo Sets / reduce / filter in permission editors (was rebuilt per
  keystroke in the search box)
- Lookup table replaces ternary chains in Doctor CheckRow
- Grid border math corrected for odd-length permission lists
- Manage permissions link from User Edit now goes to /edit (was 405)
- Vite dev port reflected as 5050 in README
@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented May 6, 2026

Copy link
Copy Markdown

Deploying simple-module-python with  Cloudflare Pages  Cloudflare Pages

Latest commit: e8ba4bb
Status: ✅  Deploy successful!
Preview URL: https://661a6c84.simple-module-python.pages.dev
Branch Preview URL: https://feature-great-liskov-674388.simple-module-python.pages.dev

View logs

The public landing nav and login form both relabeled in the redesign:
- Public nav: "Get Started" → "Log in" / "Sign up"
- Login form submit: "Sign in" → "Log in"

Update the e2e _login helper to match the new role-based selectors.
@antosubash
antosubash merged commit 554c8fc into main May 6, 2026
12 checks passed
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