Release v0.51.302 — Release JR (stage-brick — mobile/iOS brick + large-session perf hotfixes) - #3754
Conversation
The .toast container kept pointer-events:auto while hidden (opacity:0), so its fixed padding sat over mobile profile action buttons and ate their clicks. Set pointer-events:none when hidden; restore auto on .toast.show. Co-authored-by: timlawrenz <timlawrenz@users.noreply.github.com>
iOS Safari has no Enter key; the keyboard 'Done' button fires blur, and the old onblur=cancel discarded the rename. Flip blur to save (Escape still cancels) for session rename and project create/rename, with a _finishDone guard to prevent a double-fire between blur and the API callback. Co-authored-by: reinocheong <reinocheong@users.noreply.github.com>
) Large tool/log payloads made _matching_visible_duplicate() casefold+regex-tokenize multi-megabyte contents on every visible key, so /api/session took 10s+ and blocked /api/sessions for ~19s. Keep loose normalization lazy+cached and skip substring/fuzzy matching for non-exact payloads >200KB; exact visible-key matches still short-circuit. Co-authored-by: alvistar <alvistar@users.noreply.github.com>
|
| Filename | Overview |
|---|---|
| static/sessions.js | Three related changes: session-rename blur now saves (was cancel), _finishDone latch added to _startProjectCreate and _startProjectRename. In _startProjectCreate, renderSessionList() sits outside the try-catch, meaning a post-success refresh failure permanently locks the latch with the input stuck in the DOM. |
| api/models.py | Lazy-initialises loose_by_key in _build_visible_duplicate_lookup and skips substring/fuzzy matching for payloads > 200KB. Exact-key deduplication via the set lookup is preserved. Logic is correct and well-documented. |
| static/style.css | Moves pointer-events:auto from the base .toast rule to .toast.show, adding pointer-events:none to the hidden state. Correct minimal fix with no unintended side-effects on hover/focus interactivity. |
| tests/test_issue1796_error_toasts.py | Test updated to assert pointer-events:auto appears on .toast.show and pointer-events:none on the base rule, faithfully mirroring the CSS change. |
| tests/test_merge_key_tool_calls.py | Two new test cases: one verifies _loose_session_message_content is never called for >200KB payloads (via monkeypatch assert), the other confirms fuzzy matching is still applied for small payloads. Both tests are correct. |
| CHANGELOG.md | New v0.51.302 entry with accurate, user-facing descriptions of all three fixes. No issues. |
Sequence Diagram
sequenceDiagram
participant User
participant DOM
participant finish
participant API
participant renderSessionList
Note over User,renderSessionList: _startProjectCreate (happy path)
User->>DOM: blur / Enter
DOM->>finish: finish(true)
finish->>finish: "_finishDone=true"
finish->>API: POST /api/projects/create
API-->>finish: 200 OK
finish->>renderSessionList: await renderSessionList()
renderSessionList-->>finish: done
finish->>DOM: showToast("Project created")
Note over User,renderSessionList: _startProjectCreate (API error — retry allowed)
User->>DOM: blur / Enter
DOM->>finish: finish(true)
finish->>finish: "_finishDone=true"
finish->>API: POST /api/projects/create
API-->>finish: error
finish->>finish: "_finishDone=false (reset for retry)"
finish->>DOM: showToast("Project create failed")
finish-->>DOM: return (inp stays in DOM)
Note over User,renderSessionList: _startProjectCreate (renderSessionList error — UI stuck)
User->>DOM: blur / Enter
DOM->>finish: finish(true)
finish->>finish: "_finishDone=true"
finish->>API: POST /api/projects/create
API-->>finish: 200 OK
finish->>renderSessionList: await renderSessionList()
renderSessionList-->>finish: throws
finish-->>DOM: "unhandled rejection, _finishDone=true forever"
Comments Outside Diff (1)
-
static/sessions.js, line 5885-5957 (link)Multiple unrelated fixes bundled in one PR
AGENTS.mdspecifies "Keep one logical change per PR; split unrelated refactors or cleanup." This PR combines three independent hotfixes (toast pointer-events, iOS rename/blur, large-payload dedup performance), each touching different subsystems. The rebase rationale is described in the PR description, but the guideline still applies — it makes the diff harder to bisect if a regression surfaces later from one of the three changes.Context Used: AGENTS.md (source)
Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!
Reviews (1): Last reviewed commit: "docs(changelog): stamp v0.51.302 — Relea..." | Re-trigger Greptile
| try{ | ||
| await api('/api/projects/create',{method:'POST',body:JSON.stringify({name:inp.value.trim(),color})}); | ||
| }catch(e){ | ||
| _finishDone=false; | ||
| showToast('Project create failed: '+(e.message||e)); | ||
| return; | ||
| } | ||
| await renderSessionList(); | ||
| showToast('Project created'); |
There was a problem hiding this comment.
renderSessionList() sits outside the try-catch in _startProjectCreate, but inside it in _startProjectRename. If a network error occurs during the post-create list refresh, the async finish function rejects with _finishDone still true, leaving inp permanently in the DOM with no way for the user to dismiss it (every subsequent blur/Enter is a no-op) short of a page refresh. Moving renderSessionList() and showToast inside the try block matches _startProjectRename's pattern and restores retry-ability on failure.
| try{ | |
| await api('/api/projects/create',{method:'POST',body:JSON.stringify({name:inp.value.trim(),color})}); | |
| }catch(e){ | |
| _finishDone=false; | |
| showToast('Project create failed: '+(e.message||e)); | |
| return; | |
| } | |
| await renderSessionList(); | |
| showToast('Project created'); | |
| try{ | |
| await api('/api/projects/create',{method:'POST',body:JSON.stringify({name:inp.value.trim(),color})}); | |
| await renderSessionList(); | |
| showToast('Project created'); | |
| }catch(e){ | |
| _finishDone=false; | |
| showToast('Project create failed: '+(e.message||e)); | |
| return; | |
| } |
…e-session perf hotfixes) (nesquena#3754) * fix(ui): stop hidden toast from intercepting clicks on mobile (nesquena#3735) The .toast container kept pointer-events:auto while hidden (opacity:0), so its fixed padding sat over mobile profile action buttons and ate their clicks. Set pointer-events:none when hidden; restore auto on .toast.show. Co-authored-by: timlawrenz <timlawrenz@users.noreply.github.com> * fix(sessions): rename saves on blur so iOS Safari rename works (nesquena#3729) iOS Safari has no Enter key; the keyboard 'Done' button fires blur, and the old onblur=cancel discarded the rename. Flip blur to save (Escape still cancels) for session rename and project create/rename, with a _finishDone guard to prevent a double-fire between blur and the API callback. Co-authored-by: reinocheong <reinocheong@users.noreply.github.com> * perf(session): skip fuzzy dedup matching for giant merge payloads (nesquena#3730) Large tool/log payloads made _matching_visible_duplicate() casefold+regex-tokenize multi-megabyte contents on every visible key, so /api/session took 10s+ and blocked /api/sessions for ~19s. Keep loose normalization lazy+cached and skip substring/fuzzy matching for non-exact payloads >200KB; exact visible-key matches still short-circuit. Co-authored-by: alvistar <alvistar@users.noreply.github.com> * docs(changelog): stamp v0.51.302 — Release JR (stage-brick brick/perf hotfixes nesquena#3735 nesquena#3729 nesquena#3730) --------- Co-authored-by: nesquena-hermes <[email protected]> Co-authored-by: timlawrenz <timlawrenz@users.noreply.github.com> Co-authored-by: reinocheong <reinocheong@users.noreply.github.com> Co-authored-by: alvistar <alvistar@users.noreply.github.com>
Release v0.51.302 — Release JR (stage-brick)
Three brick / high-severity hotfixes, each rebased onto fresh master (their original PR branches were 8 commits stale — the revert-guard would have rolled back 8 releases on a direct squash-merge). Rebase fidelity verified byte-identical to each PR head.
Fixed
.toastkeptpointer-events:auto, its invisible padding ate taps on mobile profile action buttons. Nowpointer-events:nonewhen hidden,autoonly on.toast.show. Hover-to-pause dismissal preserved (verified: all 4 JS handlers untouched, interactivity restored on the visible state). Regression test updated.onblur=canceldiscarded it). Blur now saves (Escape still cancels);_finishDonelatch guards blur/callback double-fire. Same fix applied to project create/rename.Performance
_matching_visible_duplicate()casefold+regex-tokenized multi-MB tool payloads on every visible key, making/api/sessiontake 10s+ and block/api/sessions~19s. Loose normalization is now lazy+cached; substring/fuzzy matching skipped for non-exact payloads >200KB (exact visible-key matches still short-circuit).Gates
Closes #3735, closes #3729, closes #3730.