Skip to content

fix: restore inflight session on bfcache pageshow#1480

Merged
1 commit merged intonesquena:masterfrom
dso2ng:fix/bfcache-inflight-reattach
May 2, 2026
Merged

fix: restore inflight session on bfcache pageshow#1480
1 commit merged intonesquena:masterfrom
dso2ng:fix/bfcache-inflight-reattach

Conversation

@dso2ng
Copy link
Copy Markdown
Contributor

@dso2ng dso2ng commented May 2, 2026

Summary

  • Restores the active session from the normal loadSession() path when a persisted pageshow event resumes from BFCache.
  • Reuses checkInflightOnBoot() after that restore so active in-flight markers keep the same reload-recovery behavior introduced by Fix batch session actions and in-flight reload recovery #1473.
  • Tightens the existing BFCache layout tests to extract the full pageshow handler instead of relying on a fixed character window.

Context

This is the next small follow-up for #1466 after #1467 shipped in v0.50.267. #1473 already fixed normal reload recovery for in-flight sessions; this PR keeps the BFCache restore path aligned with that behavior without changing server-side persistence or cache policy.

The invariant is the same as #1466: the active pane is only a projection, and running state belongs to the session that owns the stream.

Test Plan

  • node --check static/boot.js static/sessions.js static/messages.js
  • python -m py_compile api/routes.py api/models.py api/agent_sessions.py
  • pytest tests/test_1466_bfcache_inflight_reattach.py tests/test_1045_bfcache_layout_restore.py tests/test_inflight_stream_reuse.py tests/test_session_cross_tab_sync.py -q
  • non-ASCII diff guard -> non_ascii_added_lines=0

Refs #1466

@nesquena-hermes nesquena-hermes closed this pull request by merging all changes into nesquena:master in b8a346f May 2, 2026
nesquena-hermes pushed a commit to ccqqlo/hermes-webui that referenced this pull request May 2, 2026
nesquena-hermes pushed a commit to ccqqlo/hermes-webui that referenced this pull request May 2, 2026
…267 follow-ups

- CHANGELOG.md: v0.50.269 entry detailing nesquena#1478 nesquena#1479 nesquena#1480
- ROADMAP.md: bump to v0.50.269, 3847 tests collected
- TESTING.md: bump header + total to 3847

nesquena#1478: nesquena APPROVED self-built bootstrap.py --foreground mode
       (closes nesquena#1458 Bug nesquena#1, +Opus follow-ups: XPC noise filter, executability guard)
nesquena#1479: surgical follow-up to nesquena#1473 — Session.compact() now includes pending_user_message
nesquena#1480: bfcache pageshow restores active session via loadSession + checkInflightOnBoot

3847 tests pass (+47 net). Opus advisor on stage diff: no blockers.
pull Bot pushed a commit to soitun/hermes-webui that referenced this pull request May 3, 2026
…ix + P0 polish bundle (nesquena#1466 nesquena#1494 nesquena#1469 nesquena#1484 nesquena#1486)

3 PRs in this batch (3866 → 3874 tests, +8):

- nesquena#1493 (@dso2ng) — sidebar Stop response cancels row's stream not active pane's (closes nesquena#1466, follow-up to nesquena#1480)
- nesquena#1495 (self-built; reported by @insecurejezza in nesquena#1494) — state.db connection FD leak in sidebar polling (closes nesquena#1494, addresses Bug #2 of nesquena#1458)
- nesquena#1492 (@bergeouss) — P0 bugfixes bundle: tool-card args readability + CLI rename persistence + scroll pinning + sw.js relative-path regression test (closes nesquena#1469 nesquena#1484 nesquena#1486)

This release closes Bug #2 of the umbrella issue nesquena#1458. Bug #1 was closed by v0.50.269 (nesquena#1483) + v0.50.270 (nesquena#1487). Bug #3 (HTTP-unhealthy without FD exhaustion) is the remaining work item.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants