Repository navigation
feat: complete step-by-step invoice creation wizard (#891) - #943
Open
adenueltech wants to merge 1 commit into
Open
adenueltech wants to merge 1 commit into
adenueltech wants to merge 1 commit into
Conversation
- Move wizard step definitions, help text and validation into src/lib/invoiceWizard.ts so the rules are shared and unit tested - Fix equal-split mode always failing recipient validation - Validate the deadline on the step it lives on (1-365 days) - Use real StrKey checks for token and recipient addresses, reject duplicates - Re-validate every step on submit so ?step=4 deep links cannot skip checks - Enter on an earlier step advances the wizard instead of submitting - Save the full wizard state (step, equal split, tags, co-signers, installments) in drafts and restore all of it - Only autosave once the user has interacted; show "Draft saved" time - Add a progress bar, per-step descriptions, help text for each field and Edit shortcuts on the review step - Remove duplicated DeadlineSuggester on step 1 - FormField: point aria-describedby at the error message when shown Closes Stellar-split#891 Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
|
@adenueltech is attempting to deploy a commit to the kingsman-99's projects Team on Vercel. A member of the Team first needs to authorize it. |
|
@adenueltech 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! 🚀 |
This branch has not been deployed
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.
Closes #891
What changed
/invoice/newalready had a 4-step stepper. This PR fills in what the issue asks for and fixes several bugs in the existing flow.Validation at each step
src/lib/invoiceWizard.ts(pure, unit tested).StrKeychecks instead ofstartsWith/length. Duplicate recipients are rejected, and errors name the row ("Recipient 2 needs…").aria-describedbypointing at the message (also fixed inFormField).Navigation
?step=4or a restored draft can't skip checks.Progress indicator
role="progressbar") with "Step X of 4" under the existing stepper.Drafts saved automatically
DraftFormDatafields are optional, so existing drafts still load.Help text
DeadlineSuggesterthat rendered twice on step 1.How I tested
npx vitest run src/__tests__/invoiceWizardSteps.test.ts src/lib/offlineDraftDB.test.ts src/hooks/useOfflineDraftAutosave.test.ts: 39 passednpx tsc --noEmit: 0 errorsnext linton the changed files: no warnings or errors🤖 Generated with Claude Code