Skip to content

feat: add milestone title and criteria fields to CreateVault#514

Open
Tboy123-emm wants to merge 1 commit into
Disciplr-Org:mainfrom
Tboy123-emm:feature/create-vault-milestone-fields
Open

feat: add milestone title and criteria fields to CreateVault#514
Tboy123-emm wants to merge 1 commit into
Disciplr-Org:mainfrom
Tboy123-emm:feature/create-vault-milestone-fields

Conversation

@Tboy123-emm

Copy link
Copy Markdown

Summary

Closes #291

Adds milestoneTitle and milestoneCriteria fields to the CreateVault form, addressing the gap where a vault's defining concept was never captured at creation time.

Changes

  • src/utils/vaultValidation.ts: Extended CreateVaultFormValues type with milestoneTitle and milestoneCriteria. Added validation: non-empty (trims whitespace), max 100 chars for title, max 500 chars for criteria.
  • src/pages/CreateVault.tsx: Added state and Field components for both new fields. Inline errors clear on change. Both fields included in the submit payload console.log.
  • src/utils/__tests__/vaultValidation.test.ts: Updated all existing validateCreateVault calls to include new fields; added 8 new test cases (empty, whitespace-only, over-length, at-max-length for both fields).
  • src/pages/__tests__/CreateVault.test.tsx: Added fillValidForm helper; updated all existing tests to fill new fields; added 5 new test cases for milestone field validation and payload.

Test Results

✓ src/pages/__tests__/CreateVault.test.tsx  (21 tests)
✓ src/utils/__tests__/vaultValidation.test.ts  (19 tests)

Test Files  2 passed (2)
      Tests  40 passed (40)

All 40 tests pass. Pre-existing failures in other test files (VaultTransactions window.matchMedia, ThemeContext jest is not defined) are unrelated and unchanged.

Coverage on Changed Lines

All new branches (empty, whitespace-only, over-length, at-exactly-max-length, valid) are explicitly tested.

@drips-wave

drips-wave Bot commented Jun 27, 2026

Copy link
Copy Markdown

@Tboy123-emm 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

@GBOYEE

GBOYEE commented Jun 28, 2026

Copy link
Copy Markdown

@GBOYEE has applied to work on this issue as part of the Stellar Wave Program's 6th wave.

Implement following existing patterns and conventions. Add tests, ensure CI passes, and document any new API surface.

ℹ️ Repo Maintainers: To accept this application, review their application or assign @GBOYEE to this issue.

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.

Add a milestone title and criteria fields to the CreateVault form

2 participants