Skip to content

fix(frontend): resolve 13 defects from the mini app QA check - #73

Merged
Mikkkin merged 2 commits into
mainfrom
fix/miniapp-qa-defects
Sep 27, 2026
Merged

Mikkkin merged 2 commits into
mainfrom
fix/miniapp-qa-defects

Conversation

@Mikkkin

@Mikkkin Mikkkin commented Sep 27, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

Fixes the 13 defects from the mini app QA check of build 8c61b1e (3 critical: 5.3, 5.4, 8.2). Row numbers match the report. The same source-blind panel as in 2.6 also showed "На фото не нашли еду" for a not_food text answer, fixed together.

Closes #66

Changes

  • 5.3 useBackButton in src/max/bridge.ts keeps one MAX subscription and a stack of handlers: the latest one runs, the button hides only when none is left. BottomSheet registers closeTopSheet while open, so Back closes a sheet on root screens and closing it keeps the screen's button.
  • 5.4 useResetHistory in src/shared/appHistory.ts; DoneStep starts a new app history, so Back on a linked venue goes to its parent instead of the onboarding steps.
  • 8.2, 8.5 mutations use networkMode: 'always' and fail at once offline, nothing is replayed on reconnect; queries still pause and refetch. test/app.tsx reuses createQueryClient from Root.tsx. Profile location buttons are disabled offline.
  • 4.3 a ref blocks the second tap; booking_exists opens the active booking of the item, fallback text fits menu items.
  • 5.5 a QR opened in the app closes with navigate(-1) when the booking resolves, one Back leaves the booking.
  • 2.6, 2.7 separate texts and actions for text and photo; the "Записали" panel closes when its last meal is deleted.
  • 8.3, 8.4 the description stays until it is logged and can be retried. After a lost response the diary is checked before any retry (manual form, text and photo); the retry does not post again when a new meal is already there. "Проверили дневник" is shown only when the check reached the server.
  • 3.4 "Показать другие" compares dish ids across batches and says "Больше вариантов рядом сейчас нет" when nothing new comes.
  • 3.5 the "Уточнить" button does not shrink (flex-shrink: 0), checked at 390 px in headless Chrome.
  • 3.6 only the recommendation list subscribes to useNow; countdowns tick and cards with an ended deal or a closed venue are hidden.
  • docs/max-features.md and README describe BackButton on open panels.

Testing

  • Tests added or updated for the change: 24 new tests, every defect has at least one that fails without its fix
  • npm run lint, npm run typecheck and npm test pass locally (frontend: 531 tests, npm run build passes; backend src/docs.test.ts passes)

Not covered here, needs a phone: the MAX side of 4.2, 6 and 7 from the report.

Back navigation: the MAX back button is shared by every registered
handler, so an open sheet closes first on root screens too, and closing
it keeps the screen's button. Finishing onboarding starts a new app
history, so Back on a linked venue goes to the catalog. A QR that closes
itself after redemption leaves one history entry.

Offline: mutations use networkMode "always" and fail at once instead of
pausing and replaying later, so a booking is never cancelled without a
new confirmation. The test query client now reuses the production
defaults. Location buttons in the profile are disabled offline.

Bookings: a double tap sends one request, and booking_exists opens the
active booking of the item with wording that fits menu items too.

Diary: text and photo get their own unrecognised and not food texts. The
logged panel closes when its last meal is deleted. The description is
kept until it is logged and can be retried. After a lost response the
diary is checked before any retry, for the manual form, text and photo,
so a saved meal is not added twice.

What to eat: "Показать другие" says when no new dishes are left, the
"Уточнить" button no longer shrinks, and deal countdowns and closing
hours update live, hiding cards that are no longer available.

Closes #66
@Mikkkin Mikkkin added bug Something isn't working frontend Мини-приложение MAX labels Sep 27, 2026
@Mikkkin Mikkkin self-assigned this Sep 27, 2026
@Mikkkin
Mikkkin merged commit 6e182c6 into main Sep 27, 2026
5 checks passed
@Mikkkin
Mikkkin deleted the fix/miniapp-qa-defects branch September 27, 2026 21:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working frontend Мини-приложение MAX

Projects

None yet

1 participant