TT-7549 fix: show Switch Teams button for first-time mobile users#443
Open
nabalone wants to merge 2 commits into
Open
TT-7549 fix: show Switch Teams button for first-time mobile users#443nabalone wants to merge 2 commits into
nabalone wants to merge 2 commits into
Conversation
The Switch Teams button was hidden for any user whose only team is their personal team (teams.length === 0), which incorrectly caught normal first-time mobile users who have not yet joined a team — leaving them unable to reach Add Team or access Team projects. Detect true Work-Alone-Offline / PAP-like users via the existing `offlineOnly` global instead of empty team list alone. Extract the shared check into a `useIsPapLike` hook so ProjectsScreen and the SwitchTeamsGuard in SwitchTeams stay in sync. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
nabalone
commented
Jul 17, 2026
| Boolean(personalTeam) && | ||
| teams.length === 0 && | ||
| teamDirectoryReady && | ||
| (!isOffline || offlineOnly); |
Collaborator
Author
There was a problem hiding this comment.
@gtryus Just want to flag that I am just removing the !isOffline part because it being true allows for an undesirable isPapLike=true
The shared useIsPapLike hook gated on (!isOffline || offlineOnly), which is true for any online user — so a first-time online mobile user (no teams yet) was still classified PAP-like and lost the Switch Teams button. Use the offlineOnly global alone, the reliable local-only signal set at login, and drop the isOffline dependency (which was also undefined during transient default-context renders). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
nabalone
marked this pull request as ready for review
July 18, 2026 00:06
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.
Summary
Fixes TT-7549 — the Switch Teams button was missing for first-time mobile users, leaving them able to create/access only Personal Audio Projects with no path to Add Team or Team projects.
The button was hidden for any user whose only team is their personal team (
teams.length === 0). That condition is also true for a normal first-time mobile user who simply hasn't joined a team yet — so they lost the button and, with it, the route to Add Team.Changes
offlineOnlyglobal (the canonical Work-Alone-Offline signal set at login inAccess.tsx), not empty-team-list alone.useIsPapLikehook (utils/useIsPapLike.ts, following the repo's one-hook-per-file convention) soProjectsScreenand theSwitchTeamsGuardinSwitchTeamsshare one source of truth.ProjectsScreennow computesisPapLike = useIsPapLike() && isPersonal, replacing the inlineteams.length === 0 && teamDirectoryReadycheck that lacked theofflineOnlygate.Test plan
offlineOnly) user with only a personal team: Switch Teams button stays hidden (redirects to team home), preserving TT-6962 behavior.npm run typecheckpasses.🤖 Generated with Claude Code