feat: DAH-4205 Add profile page - #3034
Open
cliu02 wants to merge 16 commits into
Open
Conversation
alulabeshue-sfgov
temporarily deployed
to
dahlia-webap-dah-4205-a-gmpgrn
August 18, 2026 18:49
Inactive
Wiz Scan Summary
To detect these findings earlier in the dev lifecycle, try the Wiz Code extension for VS Code, JetBrains, or Visual Studio. |
cliu02
requested review from
a team,
jimlin-sfgov and
josh-chou
and removed request for
a team
August 18, 2026 18:50
cliu02
marked this pull request as ready for review
August 18, 2026 18:50
Contributor
There was a problem hiding this comment.
Pull request overview
Adds a new “Add Profile” step to the Clerk-based account creation flow and introduces backend support for creating/retrieving a Salesforce Contact ID tied to the Clerk user.
Changes:
- Add new
/add-profilefrontend route + page to collect legal name and DOB, then create/fetch the user profile and route into My Account with a success toast. - Add new Clerk-authenticated API endpoints (
GET/POST /api/v1/account/profile) and aClerkServiceto read/update Clerk private metadata for the Salesforce contact ID. - Wire Clerk bearer-token authentication into Rails middleware, update routing, and extend shared account UI components/translations.
Reviewed changes
Copilot reviewed 20 out of 21 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| Gemfile.lock | Adds clerk-sdk-ruby (and dependencies) to the lockfile. |
| Gemfile | Adds clerk-sdk-ruby dependency (require: false). |
| config/routes.rb | Adds /api/v1/account/profile API routes and /add-profile page route. |
| config/application.rb | Initializes Clerk middleware and bearer-token-only authentication behavior. |
| app/views/auth/add_profile.html.slim | Adds Slim view to mount the React app for the profile step. |
| app/services/clerk_service.rb | New service wrapper for Clerk user lookup + metadata storage/retrieval. |
| app/javascript/util/routeUtil.ts | Adds localized path + app page enum entry for “add profile”. |
| app/javascript/pages/account/components/NameFieldset.tsx | Adds optional note support on the name fieldset. |
| app/javascript/pages/account/add-profile.tsx | New “Add Profile” page (form, Clerk token usage, API calls, navigation). |
| app/javascript/pages/account/add-profile.module.scss | Adds styling for the new profile page. |
| app/javascript/pages/account/add-password.tsx | Routes users from “Add Password” to “Add Profile” (save or skip). |
| app/javascript/pages/account/account.tsx | Adds an “account ready” success toast on first entry after profile completion. |
| app/javascript/packs/react_application.tsx | Registers the new React route for /add-profile. |
| app/javascript/authentication/withAuthentication.tsx | Updates Clerk auth gate to require a loaded profile and redirect to add-profile if missing. |
| app/javascript/authentication/user.ts | Broadens User.id type to support Clerk string IDs. |
| app/javascript/authentication/context/UserProvider.tsx | Loads Clerk profile into UserContext when Clerk auth flag is enabled. |
| app/javascript/api/authApiService.ts | Adds Clerk-authenticated createProfile + getProfile(sessionToken) API helpers. |
| app/javascript/tests/pages/account/add-password.test.tsx | Updates tests to expect navigation to /add-profile. |
| app/controllers/auth_controller.rb | Adds Rails action to render the add-profile React view. |
| app/controllers/api/v1/account_controller.rb | Adds Clerk-authenticated profile/create_profile endpoints and custom auth/current_user handling. |
| app/assets/json/translations/react/en.json | Adds new strings for “finish setting up”, legal name note, toast, etc. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Adds frontend page for user to fill in their profile information and backend service to create a Salesforce contact ID for the Clerk user.
Jira ticket
https://sfgovdt.jira.com/browse/DAH-4205
Before requesting eng review
Version Control
angularif it contains updates to Angular codetype: TICKET-NUMBER Descriptionformat, useDAH-000if it does not need a ticketurgent: Descriptionformat if it is urgent and does not need a ticketCode quality
Code conventions
.scssstylesheets andui-seedstokens, rather than inline styles or TailwindReview instructions
Request eng review
needs reviewlabelHousing Enggroup to automatically assign reviewers, and/or assign specific engineersBefore merging
Request product acceptance (PA) testing
needs product acceptancelabel)