[pull] master from monkeytypegame:master#850
Merged
pull[bot] merged 5 commits intoUncodedtech:masterfrom Mar 30, 2026
Merged
Conversation
…isAuthenticated` (@copilot) (#7738) ### Description Two overlapping auth-check functions existed: `firebase.isAuthenticated()` (checked `Auth.currentUser`) and `states/core.isLoggedIn()` (checked reactive `getUserId()` signal). Consolidating to one canonical function backed by the reactive state. **Changes:** - `states/core.ts`: renamed `isLoggedIn` → `isAuthenticated` - `firebase.ts`: removed `isAuthenticated` export - All ~35 call-sites updated to import `isAuthenticated` from `states/core` instead of `firebase` - `mock-firebase.ts`: removed now-defunct `isAuthenticated` mock entry ### Checks - [ ] Adding quotes? - Make sure to follow the [quotes documentation](https://github.com/monkeytypegame/monkeytype/blob/master/docs/QUOTES.md) - [ ] Make sure to include translations for the quotes in the description (or another comment) so we can verify their content. - [ ] Adding a language? - Make sure to follow the [languages documentation](https://github.com/monkeytypegame/monkeytype/blob/master/docs/LANGUAGES.md) - [ ] Add language to `packages/schemas/src/languages.ts` - [ ] Add language to exactly one group in `frontend/src/ts/constants/languages.ts` - [ ] Add language json file to `frontend/static/languages` - [ ] Adding a theme? - Make sure to follow the [themes documentation](https://github.com/monkeytypegame/monkeytype/blob/master/docs/THEMES.md) - [ ] Add theme to `packages/schemas/src/themes.ts` - [ ] Add theme to `frontend/src/ts/constants/themes.ts` - [ ] (optional) Add theme css file to `frontend/static/themes` - [ ] Add some screenshots of the theme, especially with different test settings (colorful, flip colors) to your pull request - [ ] Adding a layout? - [ ] Make sure to follow the [layouts documentation](https://github.com/monkeytypegame/monkeytype/blob/master/docs/LAYOUTS.md) - [ ] Add layout to `packages/schemas/src/layouts.ts` - [ ] Add layout json file to `frontend/static/layouts` - [ ] Adding a font? - Make sure to follow the [fonts documentation](https://github.com/monkeytypegame/monkeytype/blob/master/docs/FONTS.md) - [ ] Add font file to `frontend/static/webfonts` - [ ] Add font to `packages/schemas/src/fonts.ts` - [ ] Add font to `frontend/src/ts/constants/fonts.ts` - [ ] Check if any open issues are related to this PR; if so, be sure to tag them below. - [ ] Make sure the PR title follows the Conventional Commits standard. (https://www.conventionalcommits.org for more info) - [ ] Make sure to include your GitHub username prefixed with @ inside parentheses at the end of the PR title. > [!WARNING] > > <details> > <summary>Firewall rules blocked me from connecting to one or more addresses (expand for details)</summary> > > #### I tried to connect to the following addresses, but was blocked by firewall rules: > > - `iojs.org` > - Triggering command: `/usr/bin/curl curl -q --fail --compressed -L -s REDACTED -o - che/node-gyp/24.-c` (dns block) > - Triggering command: `/usr/bin/curl curl -q --fail --compressed -L -s REDACTED -o - --global de/node/bin/sh make tage�� -C build cal/share/pnpm/./home/REDACTED/work/monkeytype/monkeytype/frontend/src/ts/collections/inbox.ts 4 --global ules/.bin/uname uname` (dns block) > - Triggering command: `/usr/bin/curl curl -q --fail --compressed -L -s REDACTED -o - k/monkeytype/monrev-parse k/monkeytype/monHEAD k/monkeytype/monkeytype/frontend/src/ts/componenstash k/mo�� d/src/ts/commandline/lists.ts k/monkeytype/monkeytype/frontend/src/ts/componen--message e_modules/.bin/node che/node-gyp/24.git` (dns block) > > If you need me to access, download, or install something from one of these locations, you can either: > > - Configure [Actions setup steps](https://gh.io/copilot/actions-setup-steps) to set up my environment, which run before the firewall is enabled > - Add the appropriate URLs or hosts to the custom allowlist in this repository's [Copilot coding agent settings](https://github.com/monkeytypegame/monkeytype/settings/copilot/coding_agent) (admins only) > > </details> <!-- START COPILOT ORIGINAL PROMPT --> <details> <summary>Original prompt</summary> > 1. Remove the `isAuthenticated` function/variable from the codebase by locating its definition and all references to it. > 2. Rename all occurrences of `isLoggedIn` to `isAuthenticated`, including its definition, usages, and any imports/exports where applicable. > 3. Ensure that all relevant files are updated accordingly to reflect these changes. > 4. Test and verify that the changes do not introduce any errors or inconsistencies in the application. > > The following is the prior conversation context from the user's chat exploration (may be truncated): > > User: Currently we have isloggedin and isauthenticated. Remove isauthenticated, rename is loggedin to isauthenticated, update usage > > Assistant: To address this request: > > 1. **Remove `isAuthenticated` from the codebase.** > - You need to find and delete the definition and usages of the `isAuthenticated` function/variable. > > 2. **Rename `isLoggedIn` to `isAuthenticated`.** > - Update the definition and refactor all occurrences of `isLoggedIn` to `isAuthenticated`. > > 3. **Ensure consistent updates across the codebase.** > - Review imports and usages in other files to make sure the naming change is fully reflected. > > Would you like me to make these changes directly in a specific repository or provide a list of steps you can follow to implement them? Let me know if additional details or automation support is needed. > > User: Monkeytype repo > > Assistant: To make the requested changes in the Monkeytype repository: > > 1. **Remove `isAuthenticated`:** > - Identify all definitions and usages of `isAuthenticated` and remove them from the codebase. > > 2. **Rename `isLoggedIn` to `isAuthenticated`:** > - Rename the `isLoggedIn` function/variable to `isAuthenticated` and update all references accordingly. > > Would you like me to implement these changes directly via a pull request in the Monkeytype repository? If yes, please confirm the repository information (`owner/repo`), or let me know if you need me to generate a plan instead. > > User: Monkeytypegame/monkeytype > > Assistant: A pull request has been initiated to make the requested changes in the Monkeytypegame/monkeytype repository. Let me know if you need further updates or adjustments! > > </details> <!-- START COPILOT CODING AGENT SUFFIX --> *This pull request was created from Copilot chat.* > <!-- START COPILOT CODING AGENT TIPS --> --- ✨ Let Copilot coding agent [set things up for you](https://github.com/monkeytypegame/monkeytype/issues/new?title=✨+Set+up+Copilot+instructions&body=Configure%20instructions%20for%20this%20repository%20as%20documented%20in%20%5BBest%20practices%20for%20Copilot%20coding%20agent%20in%20your%20repository%5D%28https://gh.io/copilot-coding-agent-tips%29%2E%0A%0A%3COnboard%20this%20repo%3E&assignees=copilot) — coding agent works faster and does higher quality work when set up for your repo. --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: Jack <jack@monkeytype.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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
See Commits and Changes for more details.
Created by
pull[bot] (v2.0.0-alpha.4)
Can you help keep this open source service alive? 💖 Please sponsor : )