From 68517796a9ab6fc664833d76f167b45cc7372abb Mon Sep 17 00:00:00 2001 From: adilallo <39313955+adilallo@users.noreply.github.com> Date: Sat, 25 Apr 2026 17:57:58 -0600 Subject: [PATCH] Profile page UI and functionality implemented --- .cursor/rules/coding-guidelines.mdc | 2 +- .cursor/rules/create-flow.mdc | 2 +- .cursor/rules/routes.mdc | 5 +- app/(app)/create/SignedInDraftHydration.tsx | 27 +- .../components/FinalReviewChipEditModal.tsx | 2 +- .../create/screens/CreateFlowScreenView.tsx | 2 +- .../card/CommunicationMethodsScreen.tsx | 2 +- .../screens/card/ConflictManagementScreen.tsx | 2 +- .../screens/card/MembershipMethodsScreen.tsx | 2 +- .../screens/completed/CompletedScreen.tsx | 127 +- .../right-rail/DecisionApproachesScreen.tsx | 2 +- .../screens/select/CoreValuesSelectScreen.tsx | 2 +- app/(app)/layout.tsx | 6 +- app/(app)/profile/ProfilePageClient.tsx | 273 +++- .../profile/_components/ProfilePage.view.tsx | 489 ++++++++ app/(app)/profile/layout.tsx | 19 + app/(dev)/components-preview/page.tsx | 1110 +++-------------- app/api/rules/[id]/duplicate/route.ts | 58 + app/api/rules/[id]/route.ts | 52 +- app/api/rules/me/route.ts | 31 + app/api/user/me/route.ts | 43 + app/components/asset/Icon.tsx | 81 +- app/components/asset/icon/chevron_right.svg | 6 + app/components/asset/icon/content_copy.svg | 6 + app/components/asset/icon/edit.svg | 6 + app/components/asset/icon/log_out.svg | 6 + app/components/asset/icon/mail.svg | 6 + app/components/asset/icon/warning.svg | 6 + app/components/asset/index.tsx | 2 +- app/components/asset/logo/Logo.tsx | 10 +- .../cards/RuleCard/RuleCard.container.tsx | 16 +- .../cards/RuleCard/RuleCard.types.ts | 24 +- .../cards/RuleCard/RuleCard.view.tsx | 161 ++- app/components/cards/RuleCard/index.tsx | 5 +- .../TemplateChipDetailModal.tsx | 2 +- .../TextInput/TextInput.container.tsx | 2 + .../controls/TextInput/TextInput.types.ts | 1 + .../controls/TextInput/TextInput.view.tsx | 2 + app/components/layout/List/List.container.tsx | 17 + app/components/layout/List/List.types.ts | 29 + app/components/layout/List/List.view.tsx | 47 + app/components/layout/List/index.tsx | 3 + .../layout/ListEntry/ListEntry.container.tsx | 17 + .../layout/ListEntry/ListEntry.types.ts | 27 + .../layout/ListEntry/ListEntry.view.tsx | 173 +++ app/components/layout/ListEntry/index.tsx | 3 + app/components/layout/listSizeLayout.ts | 69 + .../modals/Create/Create.container.tsx | 82 +- app/components/modals/Create/Create.types.ts | 13 +- app/components/modals/Create/Create.view.tsx | 111 +- .../modals/Create/CreateModalFrame.view.tsx | 69 + .../modals/Create/useCreateModalA11y.ts | 82 ++ .../modals/Dialog/Dialog.container.tsx | 50 + app/components/modals/Dialog/Dialog.types.ts | 37 + app/components/modals/Dialog/Dialog.view.tsx | 68 + app/components/modals/Dialog/index.tsx | 2 + app/components/navigation/Footer.tsx | 259 ++-- .../navigation/Link/Link.container.tsx | 58 + app/components/navigation/Link/Link.types.ts | 61 + app/components/navigation/Link/Link.view.tsx | 192 +++ app/components/navigation/Link/index.tsx | 7 + .../navigation/TopNav/TopNav.view.tsx | 14 +- .../HeaderLockup/HeaderLockup.container.tsx | 2 + .../type/HeaderLockup/HeaderLockup.types.ts | 5 + .../type/HeaderLockup/HeaderLockup.view.tsx | 2 + .../utility/Divider/Divider.container.tsx | 17 + .../utility/Divider/Divider.types.ts | 19 + .../utility/Divider/Divider.view.tsx | 46 + app/components/utility/Divider/index.tsx | 6 + app/tailwind.css | 20 + docs/create-flow.md | 4 +- docs/guides/backend-linear-tickets.md | 48 +- docs/guides/backend-roadmap.md | 6 +- lib/create/api.ts | 210 ++++ lib/create/lastPublishedRule.ts | 4 +- lib/server/publishedRules.ts | 41 + lib/server/responses.ts | 4 + lib/server/validation/createFlowSchemas.ts | 2 +- .../create/reviewAndComplete/completed.json | 71 +- messages/en/pages/profile.json | 52 +- next.config.mjs | 14 + stories/asset/Icon.stories.js | 4 +- stories/layout/List.stories.js | 97 ++ stories/layout/ListEntry.stories.js | 63 + stories/modals/Create.stories.js | 4 +- stories/navigation/Link.stories.js | 106 ++ stories/pages/CompletedPage.stories.js | 38 +- stories/utility/Divider.stories.js | 74 ++ tests/components/CompletedPage.test.tsx | 80 +- tests/components/Create.test.tsx | 4 +- tests/components/Dialog.test.tsx | 60 + tests/components/HeaderLockup.test.tsx | 8 + tests/components/TextInput.test.tsx | 7 + tests/components/layout/List.test.tsx | 90 ++ tests/components/layout/ListEntry.test.tsx | 84 ++ tests/components/navigation/Link.test.tsx | 75 ++ tests/components/utility/Divider.test.tsx | 53 + tests/unit/createFlowValidation.test.ts | 7 + tests/unit/rulesByIdDeleteRoute.test.ts | 94 ++ tests/unit/rulesByIdRoute.test.ts | 59 +- tests/unit/rulesDuplicateRoute.test.ts | 105 ++ tests/unit/rulesMeRoute.test.ts | 75 ++ tests/unit/userMeDeleteRoute.test.ts | 65 + 103 files changed, 4439 insertions(+), 1476 deletions(-) create mode 100644 app/(app)/profile/_components/ProfilePage.view.tsx create mode 100644 app/(app)/profile/layout.tsx create mode 100644 app/api/rules/[id]/duplicate/route.ts create mode 100644 app/api/rules/me/route.ts create mode 100644 app/api/user/me/route.ts create mode 100644 app/components/asset/icon/chevron_right.svg create mode 100644 app/components/asset/icon/content_copy.svg create mode 100644 app/components/asset/icon/edit.svg create mode 100644 app/components/asset/icon/log_out.svg create mode 100644 app/components/asset/icon/mail.svg create mode 100644 app/components/asset/icon/warning.svg create mode 100644 app/components/layout/List/List.container.tsx create mode 100644 app/components/layout/List/List.types.ts create mode 100644 app/components/layout/List/List.view.tsx create mode 100644 app/components/layout/List/index.tsx create mode 100644 app/components/layout/ListEntry/ListEntry.container.tsx create mode 100644 app/components/layout/ListEntry/ListEntry.types.ts create mode 100644 app/components/layout/ListEntry/ListEntry.view.tsx create mode 100644 app/components/layout/ListEntry/index.tsx create mode 100644 app/components/layout/listSizeLayout.ts create mode 100644 app/components/modals/Create/CreateModalFrame.view.tsx create mode 100644 app/components/modals/Create/useCreateModalA11y.ts create mode 100644 app/components/modals/Dialog/Dialog.container.tsx create mode 100644 app/components/modals/Dialog/Dialog.types.ts create mode 100644 app/components/modals/Dialog/Dialog.view.tsx create mode 100644 app/components/modals/Dialog/index.tsx create mode 100644 app/components/navigation/Link/Link.container.tsx create mode 100644 app/components/navigation/Link/Link.types.ts create mode 100644 app/components/navigation/Link/Link.view.tsx create mode 100644 app/components/navigation/Link/index.tsx create mode 100644 app/components/utility/Divider/Divider.container.tsx create mode 100644 app/components/utility/Divider/Divider.types.ts create mode 100644 app/components/utility/Divider/Divider.view.tsx create mode 100644 app/components/utility/Divider/index.tsx create mode 100644 stories/layout/List.stories.js create mode 100644 stories/layout/ListEntry.stories.js create mode 100644 stories/navigation/Link.stories.js create mode 100644 stories/utility/Divider.stories.js create mode 100644 tests/components/Dialog.test.tsx create mode 100644 tests/components/layout/List.test.tsx create mode 100644 tests/components/layout/ListEntry.test.tsx create mode 100644 tests/components/navigation/Link.test.tsx create mode 100644 tests/components/utility/Divider.test.tsx create mode 100644 tests/unit/rulesByIdDeleteRoute.test.ts create mode 100644 tests/unit/rulesDuplicateRoute.test.ts create mode 100644 tests/unit/rulesMeRoute.test.ts create mode 100644 tests/unit/userMeDeleteRoute.test.ts diff --git a/.cursor/rules/coding-guidelines.mdc b/.cursor/rules/coding-guidelines.mdc index edd317f..3119783 100644 --- a/.cursor/rules/coding-guidelines.mdc +++ b/.cursor/rules/coding-guidelines.mdc @@ -3,7 +3,7 @@ description: Behavioral guidelines to reduce common LLM coding mistakes. Use whe alwaysApply: true --- -# Karpathy behavioral guidelines +# Coding behavioral guidelines Behavioral guidelines to reduce common LLM coding mistakes. Merge with project-specific instructions as needed. diff --git a/.cursor/rules/create-flow.mdc b/.cursor/rules/create-flow.mdc index fb76949..caa10b8 100644 --- a/.cursor/rules/create-flow.mdc +++ b/.cursor/rules/create-flow.mdc @@ -31,7 +31,7 @@ Reach for these before writing new markup: | Mid-paragraph "expand / see all" link button | `app/components/buttons/InlineTextButton` | | Help-icon + label above a control | `app/components/utility/InputLabel` (`helpIcon` prop) | | Toggle chip (dim-but-clickable) | `Chip` with `state="Disabled" disabled={false}` | -| Card-click → structured creation modal | `Create` with `backdropVariant="loginYellow"` | +| Card-click → structured creation modal | `Create` with `backdropVariant="blurredYellow"` | If a screen grows a 2nd inline copy of any pattern above, **extract a shared component** rather than duplicate. Local section components inside a screen diff --git a/.cursor/rules/routes.mdc b/.cursor/rules/routes.mdc index 1f9d9dd..9d253ed 100644 --- a/.cursor/rules/routes.mdc +++ b/.cursor/rules/routes.mdc @@ -15,7 +15,7 @@ the file tree without affecting URLs. | Group | URL surface | Audience | Chrome | |---|---|---|---| | `app/(marketing)/` | `/`, `/learn`, `/blog`, `/templates`, future public pages | Public, indexable | TopNav (via root) + marketing `