Skip to content

Make the marketplace error state retryable with a working ErrorBanner action #136

Description

@mikewheeleer

Wire a retry action into the Invest marketplace error state

Description

When loadInvoices rejects, app/invest/page.js renders an ErrorBanner with only title/description/previewLabel — but components/ErrorBanner.jsx already supports actionLabel/onAction, which is unused here. The user has no way to recover except a full page reload. This issue adds a "Try again" action that re-runs the load.

Requirements and context

  • Repository scope: Liquifact/Liquifact-frontend only.
  • Refactor InvestMarketplace so the load logic is callable on demand (e.g. a reload() that resets state to loading and re-invokes loadInvoices).
  • Pass actionLabel="Try again" and onAction={reload} to the ErrorBanner so the existing action button is used.
  • Reset loadError, set invoices back to null (loading), and re-announce via the polite status region on retry.
  • Continue to honour the AbortController/isActive cancellation so a retry does not race a stale request.

Suggested execution

  • Fork the repo and create a branch
  • git checkout -b enhancement/invest-07-retryable-error
  • Implement changes
    • Write code in: update app/invest/page.js.
    • Write comprehensive tests in: extend app/invest/page.test.jsx — fail then succeed on retry, assert the loading skeleton reappears and the list renders.
    • Add documentation: note the retry behaviour in README.md.
    • Add comments on the reload/abort interaction.
    • Validate a11y: the retry button has a clear accessible name and focus is sensible after retry.
  • Test and commit

Test and commit

  • Run npm run lint, npm test, and npm run build.
  • Cover edge cases: retry-after-failure success, retry-then-failure, and rapid double retry.
  • Include the full npm test output.

Example commit message

feat: add retry action to the invest marketplace error state

Guidelines

  • Minimum 95 percent test coverage for impacted modules.
  • Clear, reviewer-focused documentation.
  • Timeframe: 96 hours.

Community & contribution rewards

  • 💬 Join the Liquifact community on Discord for questions, reviews, and faster merges: https://discord.gg/JrGPH4V3
  • ⭐ This is a GrantFox OSS / Official Campaign task and may be rewarded. When your PR is merged you'll be prompted to rate the project — if this issue and the maintainers helped you ship, we'd be grateful for a 5-star rating. Clear questions in Discord and tidy, well-tested PRs are the fastest path to a merge and a reward.

Metadata

Metadata

Assignees

No fields configured for Feature.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions