Repository navigation
fix(platform): say when your teams fail to load on the account page - #4296
Merged
Merged
Conversation
Account settings › Your teams turned a failed membership read into "You are not in any team yet", with no way to try again: useTeams() dropped the read's error and retry, and the section branched on the loading flag and the list length alone. useTeams() now reports how its read stands through readStateOf, and the section names a failed read with CatalogLoadError and Try again. The notice holds through the retry with its button busy, not disabled, so a focused Try again keeps the focus; a retry that works hands the focus to the section instead of the page. A failed refresh keeps the last teams and says they may be out of date. "Not in any team" stays for a read that answered with no teams. New copy in EN/DE/FR, the member guide says what a failed read shows in all three languages, and SET-B32 covers the blocked request in a real browser beside its automation row. Closes #3846 Closes #3847
A request blocked in DevTools gets no response, so the app reads it as a lost connection and the offline overlay can cover the page while the read retries. The box no longer asks for focus checks under the block; the busy, focused Try again stays with the component spec, as its automation row says.
Contributor
Author
|
Independent review — ACCEPT Reviewed PR #4296 at exact head Evidence
Limits / not rerun |
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.
What changed
When the membership read failed, Settings › Account › Your teams said "You are not in any team yet", with no way to retry. That is the page that tells a member which team documents, projects and inbox queues they can see. #3846 and #3847 are the same report, and this one fix closes both.
useTeams()(settings/teams/hooks/queries.ts) returned onlydataandisLoading.TeamsSectionbranched onisLoadingand the list length, so anundefinedlist after a failed read showed the empty-membership copy.useTeams()now also returns the shared read state fromreadStateOf(app/lib/backend/read-state.ts:unavailable,stale,retrying,failureCount) and aretry. The change is additive; the other consumers (account menu, documents, projects, inbox) still read onlyteams.CatalogLoadError: "Couldn't load your teams." with Try again.pendingwhen it retries. BecausereadStateOfholds the failure through that reset, the notice stays mounted during the retry. Its button goes busy (aria-busy/aria-disabled), not natively disabled, so a focused Try again keeps the focus, including when the retry fails again.region(tabIndex=-1, asEntityViewSectiondoes), not to the page body.settings.account.teams.loadFailedandsettings.account.teams.refreshFailed, in EN/DE/FR. The German strings have no ß, so de-CH needs no override. Try again is the existingcommon.actions.tryAgain.docs/{en,de,fr}/platform/member/preferences.md#teams) now says what a failed read shows. A new manual box,SET-B32, blocks/api/app/teams/minein a real browser. A newautomation.mdrow says which part the component spec covers.Verification
All runs were local jsdom, one worker,
/opt/node/bin/nodev24.21.0.teams-section.read-failure.test.tsxruns the real hook,myTeamsQuery,backendFetchand the four-attempt retry against the repo's synthetic transport (tests/utils/synthetic-backend, a 503). It passes 8/8 on this branch. It covers:git show origin/main:<file>), 7 fail and 1 passes; the pass is the successful-empty control. Each failure isUnable to find role="alert", and the DOM dump shows "You are not in any team yet…" after the four failed attempts.queries.tsfails 7, reverting onlyteams-section.tsxfails 7, and reverting onlyde.ymlor onlyfr.ymlfails that locale's test. So every layer is pinned.teams-section.test.tsxand the direct consumers' suites (user-button,documents-table×2,projects-table,conversations-list,home-inbox-list×2) all pass: 96 tests in 9 files.lib/i18n/messages.test.ts: 24 passed;tests/guards/error-message-description.guard.test.ts: passed;bun run lint:links,bun run lint:manualandcheck-guide.tsonsettings.md: OK;oxlint --type-awareon the changed TS files: clean;tscover the changed files (2,650 program files): clean;oxfmt, conflict-marker check and commitlint: clean.useOrgTeams()in the samequeries.ts; this PR changes onlyuseTeams().git merge-treemerges both orders cleanly to the same tree. Clean trial merges with fix(platform): block team edits while saving #4286, fix(platform): refresh current user after account name saves #4262 and fix(platform): preserve team roster drafts on refresh #4233 too.SET-B31is taken by fix(platform): correlate device setup with its join command #4257, so this box isSET-B32, placed next toSET-B15rather than at the end of the section, where fix(platform): correlate device setup with its join command #4257 inserts.Limits
SET-B32covers that.tsc.Closes #3846
Closes #3847