Skip to content

robust async state machine for the milestones board (loading/empty/error/success) #1099

Closed

Description

@mikewheeleer

Summary

The milestones board conflates loading, empty, error, and success, so users sometimes see a blank screen or an error behind data. Model the fetch as an explicit state machine with mutually-exclusive states and a retry.

Why this matters

Ambiguous async states are a top source of confusing UIs and bugs. An explicit machine makes every state intentional and testable.

Requirements

  • Model the milestones board fetch as loading | empty | error | success, mutually exclusive by construction.
  • Render the correct UI for each, with a retry affordance on error.
  • Transitions are deterministic; no state can render behind another.
  • Announce state changes to assistive tech.

Technical guidance

  • Represent state as one discriminated union, not separate booleans.
  • Reset to loading on an explicit refetch.

Edge cases — each must have a test

  • loading -> shows loader only
  • empty result -> empty state only
  • error -> error + retry only
  • success -> content only
  • retry -> returns to loading then resolves

Acceptance criteria

  • All requirements and every edge case above implemented and covered by tests
  • New unit and integration tests; existing tests still pass and no regressions
  • Structured, typed errors (no leaked internals; stable codes)
  • npm run lint, npm test, and npm run build all pass locally
  • Code follows the repo's existing conventions; no duplication or dead code
  • Short docs/comments explaining the design and any non-obvious decisions
  • PR description explains the approach and includes Closes #<issue>

Out of scope

  • Global fetch cache
  • Suspense migration

Rewards

Part of the GrantFox OSS / Official Campaign (FWC26) — this task may be rewarded. PR quality is assessed by AI: depth, correctness under edge cases, meaningful tests, and clean design are what earn the reward. Shallow changes (typos, formatting, trivial docs) do not qualify.

Activity

  1. Agencybuilds commented on Aug 25, 2026

    @Agencybuilds
    Contributor

    I’m interested in working on this issue. I can investigate the current behavior, make the required changes, and test the implementation to ensure the issue is properly resolved.

  2. Iker2522 commented on Sep 5, 2026

    @Iker2522

    I'd like to take this issue on!

    I can refactor the milestones board fetch state to use an explicit discriminated union (loading | empty | error | success) to eliminate ambiguous async states and ghost overlays.

    I will build the state machine so transitions are mutually exclusive by construction, wire a retry affordance that explicitly resets to loading, mask internal error leakage behind structured error codes, and add ARIA live region announcements for screen readers.

    I will also write comprehensive unit and integration tests for every state and transition path, provide short documentation explaining the design, and ensure npm run lint, npm test, and npm run build all pass cleanly. PR ready in 1 day. Closes #.

  3. Okorie2000-code commented on Sep 9, 2026

    @Okorie2000-code

    Hi Maintainer, I'd like to work on this issue and can start right away. Please assign it to me.

  4. guptakumarranjeet150 commented on Sep 9, 2026

    @guptakumarranjeet150

    Hi maintainers,

    I would love to take this on. My planned approach:

    • Implement robust async state machine for the milestones board (loading/empty/error/success) with explicit require_auth checks, clean storage layouts, and robust Soroban contract logic.
    • Add comprehensive unit tests verifying both happy-path invocations and unauthorized revert scenarios.

    Looking forward to contributing—please feel free to assign!

  5. Chidi-Dev1 commented on Sep 11, 2026

    @Chidi-Dev1
    Contributor

    I’d love the opportunity to resolve this issue. Kindly assign it to me.

  6. shobhamerabacha-star commented on Sep 12, 2026

    @shobhamerabacha-star

    Hi everyone,

    I would love to take this on. My planned approach:

    • Implement robust async state machine for the milestones board (loading/empty/error/success) with explicit require_auth checks, clean storage layouts, and robust Soroban contract logic.
    • Add comprehensive unit tests verifying both happy-path invocations and unauthorized revert scenarios.

    Happy to pick this up today—please assign to me!

  7. ranjeet150 commented on Sep 13, 2026

    @ranjeet150

    Hey team,

    I would like to resolve this issue. Here is my proposed execution plan:

    • Implementation: Implement robust async state machine for the milestones board (loading/empty/error/success) with explicit require_auth checks, clean storage layouts, and robust Soroban contract logic.
    • Testing & Verification: Add comprehensive unit tests verifying both happy-path invocations and unauthorized revert scenarios.
    • Delivery: Ready to ship a thoroughly tested PR within 12–24 hours with passing CI.

    Happy to pick this up today—please assign to me!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions