feat(web): standardize async states across community and proposal screens - #284
Merged
Caneryy merged 3 commits intoAug 30, 2026
Conversation
…eens Add shared AsyncState, EmptyState, ErrorState, and FreshnessNotice primitives and apply them to the community list/detail, proposal list/detail, and proposal index screens so loading, empty, stale, retryable error, and success states use consistent markup and wording. Data-fetching logic, error mapping, and retry callbacks are unchanged; only the presentation of each state is replaced. Partial proposal failures now surface through FreshnessNotice instead of replacing the successfully loaded items. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0187tinPTSTLHxYcEa62BreS
|
@emirykl is attempting to deploy a commit to the caneryy's projects Team on Vercel. A member of the Team first needs to authorize it. |
Contributor
Author
|
CI note: the Verified locally on a clean |
Merge origin/main into issue-251 branch and reconcile async-state changes with merged community registry and wizard retirement work. Co-authored-by: Cursor <cursoragent@cursor.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 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
Adds four small shared primitives and applies them across the community and proposal screens so async states read consistently.
src/components/ui/, built with the existing design tokens:AsyncState— in-flight reads;role="status",aria-live="polite",aria-busy="true".EmptyState— a completed, successful read with no matching records;role="status".ErrorState— retryable failures;role="alert"with aRetrybutton wired to the existing retry callback.FreshnessNotice— stale or partially-failed reads;role="status", deliberately not an alert.communities/,communities/[id]/,communities/[id]/proposals/,communities/[id]/proposals/[proposalId]/,proposals/,CommunityCard,CommunityProposalsView, andCommunityProposalDetailView.FreshnessNoticealongside the successfully loaded items instead of replacing them.CommunitiesPage.test.tsx's empty-state assertion is updated to target the semantic status region rather than the text node's own attribute.Linked issue
Closes #251
Test plan
Ran from the repository root on a clean
npm ciinstall:npm run typecheck— clean (maincurrently has 7 errors; test(web): consolidate Stellar test support and repair the test baseline #283 fixes those).npm test— 65 test files, 443 tests passing, including the newsrc/components/ui/AsyncStates.test.tsxcovering the four primitives' roles, live-region politeness, and retry callback.npm run build— completes successfully.npm run lint— down from 5 problems (3 errors, 2 warnings) onmainto 3 (1 error, 2 warnings). This PR fixes both pre-existingreact-hooks/set-state-in-effecterrors in the proposal pages it touches. The one remaining error (hooks/useTransactionLifecycle.ts:76,react-hooks/refs) and both warnings are pre-existing in files this PR does not touch.Accessibility behaviour was verified through the new tests: loading announces as busy without interrupting, empty results announce as a status, errors announce as an alert and invoke the retry callback, and partial data is qualified without being presented as an error.
Checklist
npm run lintand fixed any warnings introduced by my changes (pre-existing warnings are acceptable).npm run buildand it completes successfully.npm run test:contractspasses. — n/a, no contract changes.On screenshots: this touches UI, but the change is a markup/wording consolidation of loading, empty, error, and stale blocks rather than a visual redesign, and the primitives reuse the existing tokens. Happy to attach before/after captures at mobile and desktop widths if you would like them before merging.