Skip to content

Distinguish rejected vault creates - #1582

Merged
1nonlypiece merged 2 commits into
Disciplr-Org:mainfrom
Silver36-ship-it:DistinguishRejected
Oct 25, 2026
Merged

1nonlypiece merged 2 commits into
Disciplr-Org:mainfrom
Silver36-ship-it:DistinguishRejected

Conversation

@Silver36-ship-it

Copy link
Copy Markdown
Contributor

Closes #1505

Separate definite API rejections from ambiguous outcomes, reconcile uncertain creates against creator vaults, and allow safe recovery.

Summary

Distinguishes rejected vault creation requests from genuinely unknown outcomes and adds API reconciliation for ambiguous results.

What changed

  • Classifies API 4xx responses other than 408 and 429 as definite rejections; treats network errors, 5xx, timeouts, rate limits, aborts, and other errors as unknown.
  • Preserves the API’s error and details strings so rejection messages appear in the review step. Users can return to the form, edit their details, and resubmit.
  • Adds a creator-filtered vault lookup that matches the submitted name and amount, with a five-second tolerance for the creation timestamp.
  • On an unknown result, checks for a matching vault twice with a short delay:
    • One match: navigates to its detail page and shows a success toast.
    • No matches: enables Try again.
    • Lookup failure: keeps retry blocked and offers Check again.
    • Multiple matches: shows links to the matches without navigating automatically.
  • Aborts reconciliation if the wallet disconnects and retains the synchronous double-submit guard to prevent concurrent create requests.
  • Adds focused tests for create outcomes and lookup matching.

Why

A validation rejection means the vault was not created and should not leave users blocked with an “unknown” status. Network and server failures can be ambiguous, so checking the API before enabling a retry helps avoid duplicate vault creation.

Testing

  • ESLint on changed files: passed.
  • Changed-file diagnostics: no errors reported.
  • Focused tests: the last run reported 8 passing and 1 failing. The failing test was the network-reconciliation case; its timestamp fixture was updated afterward, but that change has not been rerun.
  • Production build: process crashed during Vite transformation.
  • Project TypeScript check: reports errors in unrelated existing files.
  • Screenshots and screen recordings: not captured.

Issue

Add `Closes #1505

Separate definite API rejections from ambiguous outcomes, reconcile uncertain creates against creator vaults, and allow safe recovery.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@drips-wave

drips-wave Bot commented Oct 19, 2026

Copy link
Copy Markdown

@Silver36-ship-it Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@1nonlypiece
1nonlypiece merged commit 694718a into Disciplr-Org:main Oct 25, 2026
1 of 2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[create-vault] Distinguish rejected vs. unknown create outcomes and reconcile unknown ones against the API

3 participants