fix(frontend): inventory retry + slots crash-guard + honest report-issue (P3)#211
Merged
Conversation
…e (P3) Holistic review, P3 UX/robustness on customer-facing pages. - InventoryBrowse: fetchInventory never cleared a prior error, so 'Try Again' stayed stuck on the error screen even after a successful retry. Clear error at the start of each (re)fetch. - Appointments: a malformed 200 (missing / non-array available_slots) crashed the render at .length / .map. Normalize available_slots to an array on set. - ReportIssue: ignored resp.ok and always showed a success checkmark, so a 4xx/5xx silently dropped the report. Now checks resp.ok and shows an honest 'couldn't send — try again / call us' state. + vitest regression tests. Frontend build + eslint clean; 50 vitest pass. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
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.
P3: customer-facing UX robustness
Holistic review — three silent-failure / crash fixes on public pages.
fetchInventorynever cleared a priorerror, so "Try Again" stayed stuck on the error screen even after a successful retry. Clearserrorat the start of each (re)fetch.available_slots) crashed the render at.length/.map. Normalizesavailable_slotsto an array on set.resp.okand always showed a success checkmark, so a 4xx/5xx silently dropped the report. Now checksresp.okand shows an honest "couldn't send — try again / call us" state.Verification: build + eslint clean; 50 vitest (incl. 2 new ReportIssue regression tests).