Claude: changes for issue #36 #39
No reviewers
Labels
No labels
No milestone
No project
No assignees
3 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Grandiras/Ponente!39
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "claude/issue-36"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Closes #36.
🤖 Reviewing this PR — follow along in the action run; the reply will link the full session transcript.
📜 Live transcript — updating every ~5 minutes while the task runs.
💬 Verdict: comment — notes only, nothing blocking.
Solid, well-documented fix for the reconnect-modal flash, and the reasoning in the comments/CLAUDE.md tracks the actual code. Program.cs's retention bump and the e2e coverage both look reasonable. One real logic gap in
ReconnectModal.razor.js: theimmediateflag passed toscheduleShow(true)forfailed/resume-failed/retry-exception is silently dropped whenever the tab is hidden (but not fully frozen) at the moment those states fire, so a genuinely-exhausted reconnect surfaces its Retry dialog only after the ordinary grace delay on return instead of immediately. Worth a look before merge, though the blast radius is small (an extra ~1-3s before an unavoidable dialog appears, only in the non-frozen-hidden-tab case).⏱ 5m 3s · 16 turns · tokens: 58.8k in / 29.4k out (+832.3k cache-read)
📜 Full session transcript
@ -11,0 +56,4 @@cancelShow();if (reconnectModal.open) return;if (document.visibilityState !== "visible") {scheduleShow(immediate)drops theimmediateargument entirely when the document is hidden at call time — it just setsshowWhenVisible = trueand returns (line 62), with no memory of whether the pending show was meant to bypass the grace window.When the tab later becomes visible, the
visibilitychangelistener (line 41-53) callsscheduleShow()with no argument (line 51), so the request loses its urgency. Concretely:failed/resume-failedand theretry()exception path all callscheduleShow(true)specifically so an already-exhausted reconnect (there's a Retry button the user needs — see the comment at line 105-106) shows without delay. But if that call happens while the tab is hidden-but-not-frozen (e.g. a background desktop tab, where JS keeps running so Blazor's retries can actually run out while hidden), the urgency is lost, and on return to the foreground the dialog goes through the fullRESUME_GRACE_MS/DROP_GRACE_MSdelay just like a plain reconnect attempt — even though there's no prospect of a silent reconnect at that point.A fix would need
showWhenVisibleto remember whether the deferred show wasimmediate, and have thevisibilitychangehandler pass that through to thescheduleShow()call at line 51.@claude-bot Please pick up the PR review feedback.
🤖 On it — follow along in the action run; the reply will link the full session transcript.
📜 Live transcript — updating every ~5 minutes while the task runs.
7a79112765ce76490c9bPicked up the review's finding — it was real. Pushed to
claude/issue-36(commit9aef625).The fix
scheduleShow(immediate)deferred to the next foreground by setting a plain booleanshowWhenVisible, so theimmediateargument was lost. On return, thevisibilitychangehandler calledscheduleShow()with no argument and the show went through the fullRESUME_GRACE_MS— even thoughfailed/resume-failed/ the retry-exception path passtrueprecisely because the retries are already spent and there is a Retry button the user has to press. As the review noted, this is reachable because a hidden page isn't necessarily a frozen one: a background desktop tab keeps running script, so Blazor's retries can run out with nobody looking.ReconnectModal.razor.jsnow carries the flag through the deferral (showWhenVisibleImmediate), on both defer paths — the hidden-at-schedule-time branch and the hidden-when-the-timer-fires branch, which had the same gap — and clears it incancelShowso urgency can't leak into an unrelated later show.Test
Added
a reconnect that ran out while away comes out at once on returntotests/e2e/reconnect.spec.js. It drivesresume-failedrather thanfailedon purpose:failedalso arms a retry for the next foreground, and that retry's failure opens the dialog immediately by a different route — a test built onfailedpasses with or without this fix. I found that out the hard way (see below).What I actually verified
This runner has no container engine and no
dotnet, so I could not bring up the compose stack or run Playwright — that verification is still owed to CI. Instead I droveReconnectModal.razor.jsitself under Node with a fake DOM (fresh module instance per scenario) and ran it against both the pre-fix and post-fix file:hideSo the bug reproduces, the fix closes it, and the other four scheduling behaviours are unchanged. Both changed files also pass
node --check. No C# was touched, so the build is unaffected.CLAUDE.md's Reconnecting section now records why the deferral carries urgency, since a boolean is the obvious "simplification" back into this bug.⏱ 7m 2s · 36 turns · tokens: 60.5k in / 24.6k out (+1969.6k cache-read)
📜 Full session transcript
@claude-bot /review
🤖 Reviewing this PR — follow along in the action run; the reply will link the full session transcript.
📜 Live transcript — updating every ~5 minutes while the task runs.
✅ Verdict: approve — no blocking issues found.
The logic gap flagged in my previous pass is fixed:
scheduleShow()now takes and remembers ashowWhenVisibleImmediateflag whenever a show request arrives while the tab is hidden, and thevisibilitychangelistener reads that flag back and passes it through to the re-scheduledscheduleShow(immediate)call. This is exactly what was missing before, and it's the scenario the new testa reconnect that ran out while away comes out at once on returnpins directly.Walked back through the rest of the state machine (
show/hide/failed/resume-failed/rejected,retry()'s success/resume/catch paths,cancelShow/hideModal) and didn't find any remaining gaps — urgency and grace-window handling both look consistent now.Program.cs's retention bump and the newtests/e2e/reconnect.spec.jscoverage (including the flash-guard test and the two "drop only noticed on foreground" cases) look reasonable and match the documented behavior. CLAUDE.md's new "Reconnecting" section tracks the actual code.Good to merge.
⏱ 1m 17s · 10 turns · tokens: 36.7k in / 5.3k out (+533.5k cache-read)
📜 Full session transcript