From 7a97d561a55dcd2268b7646b791f1fd225ff4f63 Mon Sep 17 00:00:00 2001 From: NW Date: Wed, 5 Aug 2026 10:52:18 +0100 Subject: [PATCH] =?UTF-8?q?fix(bot):=20issue=20#129=20=E2=80=94=20missing?= =?UTF-8?q?=20shop=5Fdistrict=5F/shop=5Fsubcategory=5F=20handlers,=20answe?= =?UTF-8?q?rCallbackQuery=20timing,=20state.location=20pipe=20format?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Register shop_district_ (handleDistrictBack) + shop_subcategory_ (handleSubcategorySelection) in routes.js — Back button in empty categories now works - state.location pipe-delimited with encodeURIComponent — multi-word names (Saint Petersburg) no longer break nav - answerCallbackQuery moved to start of callback handling — no stuck spinner - Empty city fallback (district_unknown) in Select district - Guard against stale underscore-format state.location - 48 tests pass; bump v1.2.4 --- VERSION.md | 9 +++- src/admin/views/partials/app-sidebar.ejs | 6 +-- .../userHandlers/userProductHandler.js | 54 ++++++++++++++++++- src/i18n/locales/de.json | 3 +- src/i18n/locales/en.json | 3 +- src/i18n/locales/es.json | 3 +- src/index.js | 7 +-- src/router/routes.js | 8 +++ 8 files changed, 78 insertions(+), 15 deletions(-) diff --git a/VERSION.md b/VERSION.md index 3c9f9e9..b2e21b7 100644 --- a/VERSION.md +++ b/VERSION.md @@ -9,10 +9,17 @@ ## Current Version -**v1.2.3** — 2026-08-04 +**v1.2.4** — 2026-08-05 ## Changelog +### v1.2.4 — 2026-08-05 +- **fix**: missing `shop_district_` / `shop_subcategory_` callback handlers — Back button in empty categories now works (handleDistrictBack) +- **fix**: state.location pipe-delimited (encodeURIComponent) — multi-word names (Saint Petersburg) no longer break navigation +- **fix**: answerCallbackQuery moved to start of callback handling — no stuck "clock" spinner on buttons +- **fix**: empty city fallback in "Select district in :" (district_unknown) +- **fix**: guard against stale underscore-format state.location in handleDistrictBack + ### v1.2.3 — 2026-08-04 - **fix**: empty category menus — districts with no in-stock products show "No products available in this district" (getCategoriesWithProductsByLocationId filters by real stock/mono) - **fix**: duplicate "Select your country" messages on rapid Products tap — 1200ms main-menu debounce in routes.js diff --git a/src/admin/views/partials/app-sidebar.ejs b/src/admin/views/partials/app-sidebar.ejs index af91c4a..93bd029 100644 --- a/src/admin/views/partials/app-sidebar.ejs +++ b/src/admin/views/partials/app-sidebar.ejs @@ -28,7 +28,7 @@ - v1.2.3 + v1.2.4 @@ -43,10 +43,10 @@