Skip to content

Feat/account creation hook#363

Open
joshwanf wants to merge 6 commits intomainfrom
feat/account-creation-hook
Open

Feat/account creation hook#363
joshwanf wants to merge 6 commits intomainfrom
feat/account-creation-hook

Conversation

@joshwanf
Copy link
Copy Markdown
Collaborator

Resolves #273

Create an account action follows this flow:

  1. "Sign up" or "Register with Google" is clicked.
  2. Firebase Auth handles account creation and resolves promise.
  3. .then() calls backend's POST /api/account-hooks with an array of side-effect hooks to run. If Google sign in was used, .then() checks for userCredential.operationType as link or reauthenticate.
  4. Web app layout <ProtectedRoute> checks for an isProvisioningAccount signal to sync loading AFTER backend finishes.

Currently, AccountHookAction is an enum of only "add example screener." A Map connects an AccountHookAction to a function, so new hooks can be added.

@joshwanf joshwanf requested a review from prestoncabe as a code owner March 14, 2026 19:56
@joshwanf joshwanf marked this pull request as draft March 15, 2026 17:21
@joshwanf joshwanf marked this pull request as ready for review March 15, 2026 17:27
@prestoncabe prestoncabe linked an issue Mar 21, 2026 that may be closed by this pull request
@joshwanf joshwanf force-pushed the feat/account-creation-hook branch from 561a149 to 4e56da1 Compare April 2, 2026 19:53
@joshwanf
Copy link
Copy Markdown
Collaborator Author

joshwanf commented Apr 2, 2026

@prestoncabe
Resolves #338. Reads example screener from ./seed-data and clones it to a new user upon account creation

Copy link
Copy Markdown
Collaborator

@prestoncabe prestoncabe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey @joshwanf , thanks for working on this!

I was able to successfully see the example screener in a new (email/pw) account created on my local machine, nice.

A couple of issues I noticed myself:

  • I wasn't able to see the copy of the screener when signing in with a new google account.
  • You have two pairs of git commits with the same commit message, which confused me.

I also asked claude to do a review and attached the report. The two biggest things are the Google signup issue and another issue related to promises that I don't really understand (not my expertise). The other things seem small or just cleanup that can be addressed quickly.

Let's at least address the two bugs before merging.

pr-363-review.md

@joshwanf
Copy link
Copy Markdown
Collaborator Author

joshwanf commented Apr 4, 2026

Sounds doable. I rebased this branch twice so I'm thinking that's where the duplicate commits came from.

Can you upload the Claude review file again? It gives me a 404 when I try to access it

@prestoncabe
Copy link
Copy Markdown
Collaborator

prestoncabe commented Apr 4, 2026

Sounds doable.

@joshwanf 🙌

I rebased this branch twice so I'm thinking that's where the duplicate commits came from.

hmm, that shouldn't happen if doing rebase properly. Can you send me the command you did? I'm wondering if you rebased the branch on top of itself?

Can you upload the Claude review file again? It gives me a 404 when I try to access it

Here's the same file again... but I downloaded from the original link and didn't get a 404, so maybe that was an intermittent issue with github?
pr-363-review.md

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.

Create hook for account creation that adds example screener Example Screener for each new user

2 participants