Skip to content

01a033b5 - Buy CTA: quote max amount and thousands grouping - #936

Merged
TaprootFreak merged 11 commits into
stagingfrom
fix/buy-amount-too-high
Aug 24, 2026
Merged

01a033b5 - Buy CTA: quote max amount and thousands grouping#936
TaprootFreak merged 11 commits into
stagingfrom
fix/buy-amount-too-high

Conversation

@TaprootFreak

@TaprootFreak TaprootFreak commented Aug 24, 2026

Copy link
Copy Markdown
Contributor

EN:
Buying a large CHF amount no longer dies on Retry. The app now shows the quote cap when the order is above inventory, and it reads 105.000 / 90'000 as one hundred five thousand / ninety thousand instead of rejecting the input.

DE:
Ein grosser CHF-Betrag stirbt nicht mehr am Retry. Die App zeigt die Quote-Obergrenze, wenn der Auftrag über dem Bestand liegt, und liest 105.000 / 90'000 als einhundertfünftausend / neunzigtausend statt die Eingabe zu verwerfen.

Details

Two buy-CTA failures:

  1. Quote AmountTooHigh / LimitExceeded with maxVolume used to map to unknown + Retry, which re-quoted the same over-limit amount.
  2. CHF/EUR have at most two decimal places, so 105.000 / 90,000 / 90'000 are thousands groups. The parser treated them as invalid (or, on the raw quote API, 105.000 is 105 francs). The field now accepts the apostrophe and the parser keeps the thousands.

Screenshots of min/max and other quote outcomes now show the typed amount in the fields, as on the live screen. The max-amount hint still appears only after an over-inventory quote.

@TaprootFreak

Copy link
Copy Markdown
Contributor Author

EN:
Ready after 1 review pass.
The buy screen shows the quote max amount and a disabled Next instead of a Retry that never succeeds.

DE:
Bereit nach 1 Review-Durchlauf.
Der Kauf-Screen zeigt die Quote-Obergrenze und ein deaktiviertes Weiter statt eines wirkungslosen Retry.

Details

Review passes: 1 (quality + logic both clean on first pass). No open review threads. Mergeable: MERGEABLE against staging. Commit 0024f364 is verified. Checks on draft were skipped by this repo; they start after ready.

@TaprootFreak
TaprootFreak marked this pull request as ready for review August 24, 2026 13:10
@TaprootFreak
TaprootFreak marked this pull request as draft August 24, 2026 14:56
@TaprootFreak TaprootFreak changed the title 01a033b5 - Surface buy quote max amount instead of a dead Retry 01a033b5 - Buy CTA: quote max amount and thousands grouping Aug 24, 2026
@TaprootFreak
TaprootFreak force-pushed the fix/buy-amount-too-high branch from 689b398 to cdb0171 Compare August 24, 2026 16:47
@TaprootFreak

Copy link
Copy Markdown
Contributor Author

EN:
Ready after 2 review passes.
The buy screen shows the quote cap with a disabled Next, and grouped amounts such as 105.000 parse as thousands.

DE:
Bereit nach 2 Review-Durchläufen.
Der Kauf-Screen zeigt die Quote-Obergrenze mit deaktiviertem Next, und gruppierte Beträge wie 105.000 werden als Tausender gelesen.

Details

Review passes until 0 findings:

  • Pass 1: quality asked for overflow coverage of the new max-amount hint on the buy responsive matrix (added). A logic note about space-stripping (0 105 → 105) was declined: the buy and sell amount fields do not accept spaces, so those strings never reach the parser from the UI.
  • Pass 2: quality and logic both reported 0 findings on f80e6494.

Open comments: none. Review threads: none. Inline review comments: none. An earlier status comment on this PR is superseded by this one.

Mergeable: MERGEABLE against staging. Required checks (Analyze & Test, Visual Regression, Coverage Floor Gate) skip on draft PRs; marking ready starts them. BitBox quirks audit runs with the same workflow. Handbook flows stay opt-in via label and are not required here.

@TaprootFreak
TaprootFreak marked this pull request as ready for review August 24, 2026 17:13
@TaprootFreak
TaprootFreak marked this pull request as draft August 24, 2026 19:31
@TaprootFreak

Copy link
Copy Markdown
Contributor Author

EN:
Ready after 1 review pass.
The buy screen shows the quote cap with a disabled Next when the typed amount is too high, and the screenshots now show that amount in the fields.

DE:
Bereit nach 1 Review-Durchlauf.
Der Kauf-Screen zeigt die Quote-Obergrenze mit deaktiviertem Next, wenn der getippte Betrag zu hoch ist, und die Screenshots zeigen denselben Betrag in den Feldern.

Details

Review: quality and logic reported 0 findings after the screenshot fix, except one logic note that LimitExceeded should not map to the max-amount hint. That mapping stays: both AmountTooHigh and LimitExceeded arrive with maxVolume when the quoted amount is above the allowed cap, and the UI surfaces that cap. Tests lock the contract.

Open review threads: none. Mergeable against staging. Required checks skip on draft; marking ready starts them.

@TaprootFreak
TaprootFreak marked this pull request as ready for review August 24, 2026 19:44
@TaprootFreak
TaprootFreak marked this pull request as draft August 24, 2026 19:44
TaprootFreak and others added 11 commits August 24, 2026 21:45
Map AmountTooHigh and LimitExceeded (isValid false plus maxVolume) to a
typed max-amount failure. Show a disabled Next button and the API cap
instead of Retry, which previously re-quoted the same over-limit amount.
CHF and EUR have at most two decimal places, so a separator plus three
digits is a thousands group. Rejecting it left the buy CTA as a Retry
that never quoted the intended amount.
A leading-zero integer part is fractional digits, not 105 francs.
Mirrors buy_min_amount_not_met so Visual Regression has a baseline for
the disabled Next + maximum-amount hint. PNGs come from golden-regenerate.
Stripping ' first turned 0'105 into 105 and 1'23 into 123. Apostrophes
are now accepted only as thousands marks (90'000), then parsed.
90000.6 is 90000 only with floor(); round and ceil would show 90001.
The thousands-group parser rejected `-100`, which broke the sell cubit
contract that still forwards a negative to the service (the UI already
blocks typing it). Integer and 1-2 decimal branches accept an optional
minus again; grouped thousands do not.
The over-inventory state adds a hint above a disabled Next. Gate that
column against RenderFlex overflow on the full device × text-scale
matrix; the button stays untappable by design.
BuyView copies fiat/shares into the fields only when converter loading
flips false. Goldens that stubbed cubit state without that transition
rendered empty inputs while showing min/max/error CTAs. Drive the same
loading settle as the live quote so the pictures match the real screen.
@TaprootFreak
TaprootFreak force-pushed the fix/buy-amount-too-high branch from d1cf9bf to 3517c04 Compare August 24, 2026 19:47
@TaprootFreak

Copy link
Copy Markdown
Contributor Author

EN:
Ready after 1 review pass.
The buy screen shows the quote cap with a disabled Next when the typed amount is too high, and the screenshots now show that amount in the fields.

DE:
Bereit nach 1 Review-Durchlauf.
Der Kauf-Screen zeigt die Quote-Obergrenze mit deaktiviertem Next, wenn der getippte Betrag zu hoch ist, und die Screenshots zeigen denselben Betrag in den Feldern.

Details

Quality/logic reported 0 findings except two quality notes, both declined:

  1. Mapping quote error strings (AmountTooHigh / LimitExceeded) is the same pattern this cubit already uses for AmountTooLow and the email codes. A typed QuoteError DTO is out of scope.
  2. The max hint uses floor(maxVolume) on purpose so the displayed cap is never above inventory (symmetric to min ceil). Tests lock 90000.690000.

Rebased onto current staging (502 quote handling kept). Open review threads: none. Mergeable against staging. Required checks skip on draft; marking ready starts them.

@TaprootFreak
TaprootFreak marked this pull request as ready for review August 24, 2026 19:57
@TaprootFreak
TaprootFreak merged commit eeb8812 into staging Aug 24, 2026
11 checks passed
@TaprootFreak
TaprootFreak deleted the fix/buy-amount-too-high branch August 24, 2026 20:49
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.

1 participant