feat: implement order entry improvements (OB-072, OB-068, OB-071, OB-073) - #809
Merged
IbrahimIjai merged 2 commits intoSep 26, 2026
Merged
Conversation
…073) - OB-072: Add exact size and limit-price input validation with comprehensive test coverage for paste, partial decimals, tiny/large values, increment boundaries, and unsupported notation - OB-068: Provide chart-local empty, error, and stale recovery with distinct states and retry/refresh buttons - OB-071: Rebuild ticket around verified capabilities with correct wording, mode filtering, and smooth transitions - OB-073: Implement available-balance and percentage sizing utilities with exact fixtures for 0/25/50/75/100 percent
|
@heymariam 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! 🚀 |
|
@heymariam is attempting to deploy a commit to the Ijai's projects Team on Vercel. A member of the Team first needs to authorize it. |
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.
Description
Summary
Implemented four interconnected order-entry improvements to enable exact input validation, chart recovery, capability-driven UI, and balance-aware sizing.
Closes #724
Closes #720
Closes #723
Closes #726
OB-072: Exact Size and Limit-Price Input Validation
input-validation.ts) with functions for amount, price, tick, lot, notional, and balance validationOB-068: Chart-Local Empty, Error, and Stale Recovery
OB-071: Rebuild Ticket Around Verified Capabilities
OB-073: Available-Balance and Percentage Sizing
available-balance.tswith:calculateAvailableBalance(): Deducts fees, execution costs, and reservesgetPercentageAmount(): Calculates 0/25/50/75/100% of availablecanExecuteAmount(): Validates amount won't exceed available fundsFiles Changed
New Files
apps/web/src/lib/input-validation.ts- Core validation functionsapps/web/src/lib/input-validation.test.ts- 60+ validation testsapps/web/src/features/trade/lib/available-balance.ts- Balance calculation utilitiesapps/web/src/features/trade/lib/available-balance.test.ts- Balance fixture testsModified Files
apps/web/src/features/trade/components/trade-panel/TradePanel.tsx- Added validation, mode notifications, motion tokensapps/web/src/features/trade/components/trade-panel/TradePanel.test.tsx- Added 6 mode transition testsapps/web/src/features/trade/components/chart/TVChartContainer.tsx- Implemented three recovery statesapps/web/src/features/trade/components/chart/TVChartContainer.test.tsx- Added 7 recovery testsTesting