Skip to content

[Frontend] Transaction state machine + error-code surfacing in the UI #44

Open

Description

@Gbangbolaoluwagbemiga

Problem

When a Soroban transaction fails or stalls, the UI gives little feedback and doesn't surface the
contract's typed error. Users don't know whether to retry, wait, or that they're unauthorized.

What needs to be done

  • Map every SecureFlowError code (see storage_types.rs / [Contract] Use the typed SecureFlowError enum everywhere #26) to a human-readable message +
    suggested action, in one place
  • A transaction state machine (idle → building → signing → pending → success / failed) surfaced
    via toasts/inline status, with retry on transient RPC failures
  • React error boundaries so a render error in one panel doesn't blank the app
  • Handle the "stuck/pending" case (timeout → check status → allow safe retry without double-spend)

Acceptance criteria

  • A reverted tx shows the specific reason (e.g. "Not authorized", "Milestone already approved")
  • Transient failures are retryable; the app never silently hangs on a spinner
  • An error in one component doesn't crash the whole page

Relevant files

src/contexts/, src/lib/ (contract service), src/components/ (milestone-actions, approval panel)

Depends conceptually on #26 (typed errors) for the code→message mapping.

Activity

  1. changed the title [-]Transaction state machine + error-code surfacing in the UI[/-] [+][Frontend] Transaction state machine + error-code surfacing in the UI[/+] on Jun 17, 2026
  2. Ranjeet2063 commented on Oct 5, 2026

    @Ranjeet2063

    Hello team,

    I looked into [Frontend] Transaction state machine + error-code surfacing in the UI and have an implementation approach ready.

    Proposed steps:

    1. Audit storage layout and state invariants ensuring strict auth guards.
    2. Implement deterministic state transitions with safe checked arithmetic.
    3. Add hermetic unit and regression tests covering authorized, unauthorized, and boundary edge cases.
    4. Profile instruction and CPU/gas limits under Soroban host environment.

    Please assign this to me if the plan looks good. Thanks!

  3. Rodrigoue9 commented on Oct 6, 2026

    @Rodrigoue9

    Hi maintainers! 👋 I would love to take on issue #44 ([Frontend] Transaction state machine + error-code surfacing in the UI).

    Technical Analysis & Implementation Approach (TypeScript / Web3)

    1. Architecture & Scope:
      • Audit requirements and target files cleanly without introducing regressions to existing interfaces.
      • Enforce explicit error boundaries, input sanitization, and deterministic lifecycle handling.
    2. Quality & Standard Compliance:
      • Fully satisfy all acceptance criteria for [Frontend] Transaction state machine + error-code surfacing in the UI following the repository's established conventions.
      • Clean linting, strict typing, and zero compiler/clippy warnings.
    3. Verification & Testing:
      • Dedicated unit and integration tests covering the happy path, boundary conditions, and failure recovery.
      • Zero-regression guarantee across existing test suites.

    Production Track Record

    • Verified Stellar & Soroban Track Record: Merged PRs in cybermax4200/stellar-did-credit #898 & #900 (+400 points Wave 9), approved review in documenso/documenso #3275, active deliveries in Vero-protocol/vero-core-contracts, Sorobill/*, and Bitcoindefi/OpenAO.

    Ready to implement and deliver as soon as officially assigned! Looking forward to contributing.

  4. woahwhattheheck commented on Oct 6, 2026

    @woahwhattheheck

    /claim #44

  5. added a commit that references this issue on Nov 9, 2026
    8fecb33
  6. added a commit that references this issue on Nov 11, 2026
    35964af
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    GrantFox OSSIssue tracked in GrantFox OSSfrontendReact/Vite appqualityCode quality & correctness cleanups

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions