From ef949e6a17cb2e28fdb407e1df59ed1a55f6d4da Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=90=D0=BD=D1=82=D0=BE=D0=BD=20=D0=A2=D1=80=D0=BE=D1=88?= =?UTF-8?q?=D0=B8=D0=BD?= Date: Wed, 30 Sep 2026 00:02:52 +0300 Subject: [PATCH] fix: cached GETs bypass the card lock; compact install step lines (v3.6.47) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The install modal's progress bar froze around 70% and jumped to 100% at the end: not a math bug - the UI's other polls (/api/stk-status, /api/poll-status, /api/proactive-log, /api/menu, ...) were card-locked in do_GET even though they only read cached state, queued behind the install and exhausted the browser's 6-connections-per-host budget, starving /api/status. _CARD_FREE_GET lists every card-free GET (status, version, stk-status, poll-status, proactive-log, menu, events, terminal-profile, pli-*, commands, net-state, mcc-mnc, scp81/bip status|script|log); /api/cardinfo and /api/esim/* stay locked (they touch the card). tests/test_fetch_routes.py holds _CARD_LOCK and asserts the cached endpoints still answer - verified to time out on the pre-fix list. The install modal is wider (max-w-3xl) and successful step lines are compact: '✅ Step 3: LOAD (1/240) - 6101 · 274 B / 3 SMS' (no verbose SW name, B instead of bytes, the SMS count only when >1); failed steps keep the full detail and the hint. sw cache simple-v320; tests: 533 Python / 684 Node. --- frontend/index.html | 43 ++++++++++++++++++----------- frontend/sw.js | 2 +- frontend/tests/html.test.js | 6 ++++ frontend/tests/ram.test.js | 10 ++++--- pyproject.toml | 2 +- pysim_simple_server/server.py | 36 +++++++++++++++++------- tests/test_fetch_routes.py | 52 ++++++++++++++++++++++++++++++++++- 7 files changed, 118 insertions(+), 33 deletions(-) diff --git a/frontend/index.html b/frontend/index.html index b612a88..d90048f 100644 --- a/frontend/index.html +++ b/frontend/index.html @@ -1725,7 +1725,7 @@