Skip to content

refactor: remove firebase isAuthenticated, rename isLoggedIn to isAuthenticated (@copilot)#7738

Draft
Copilot wants to merge 2 commits intomasterfrom
copilot/remove-isauthenticated-rename-isloggedin
Draft

refactor: remove firebase isAuthenticated, rename isLoggedIn to isAuthenticated (@copilot)#7738
Copilot wants to merge 2 commits intomasterfrom
copilot/remove-isauthenticated-rename-isloggedin

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Mar 28, 2026

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 isLoggedInisAuthenticated
  • 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
    • 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
    • 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
    • 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
    • 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
    • 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

Firewall rules blocked me from connecting to one or more addresses (expand for details)

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:

Original prompt
  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!

This pull request was created from Copilot chat.


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Copilot AI changed the title [WIP] Remove isAuthenticated and rename isLoggedIn to isAuthenticated refactor: remove firebase isAuthenticated, rename isLoggedIn to isAuthenticated (@copilot) Mar 28, 2026
Copilot AI requested a review from Miodec March 28, 2026 09:58
@monkeytypegeorge monkeytypegeorge added the frontend User interface or web stuff label Mar 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

frontend User interface or web stuff

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants