HERMES-GIELIE/static
nesquena-hermes 880085a09e
fix(ui): clear session search on boot + autocomplete=off + pageshow bfcache handler (closes #822)
* fix(ui): clear session search on boot + autocomplete=off — prevents bfcache from restoring stale filter (closes #822)

* fix(ui): add pageshow handler for true bfcache restore case (#822 completion)

The original PR's two fixes cover fresh page loads and hard reloads —
but the bug the issue describes happens on *bfcache restore* (Chrome's
back-forward cache).  The async boot IIFE does NOT re-run when the
browser restores a page from bfcache; the DOM is restored in place,
including any stale #sessionSearch value.  The boot-time clear has no
effect there.

`autocomplete="off"` is a hint that Chrome and others sometimes honour
for bfcache but is not reliable for user-typed values (as opposed to
autofill candidates).

Add a pageshow event listener that checks event.persisted === true and,
on that path only, clears #sessionSearch and re-renders from cache.
Fresh loads skip the listener (persisted=false) and continue to be
handled by the boot IIFE.

Also added tests/test_session_search_bfcache_822.py with 7 tests:
- autocomplete="off" present on the input
- boot-time clear runs before the first renderSessionList
- pageshow listener registered
- handler guards on event.persisted
- handler clears the search field and triggers a re-render

Full suite: 1745 passed, 0 failures.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

---------

Co-authored-by: nesquena-hermes <nesquena-hermes@users.noreply.github.com>
Co-authored-by: Nathan Esquenazi <nesquena@gmail.com>
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-21 22:11:32 -07:00
..
boot.js fix(ui): clear session search on boot + autocomplete=off + pageshow bfcache handler (closes #822) 2026-04-21 22:11:32 -07:00
commands.js feat(reasoning): full /reasoning CLI parity — show|hide + effort levels via config.yaml (#812) 2026-04-21 15:26:52 -07:00
favicon-32.png fix: add favicon (SVG + PNG + ICO), fix static MIME types (#613) 2026-04-16 20:11:02 -07:00
favicon.ico fix: add favicon (SVG + PNG + ICO), fix static MIME types (#613) 2026-04-16 20:11:02 -07:00
favicon.svg fix: add favicon (SVG + PNG + ICO), fix static MIME types (#613) 2026-04-16 20:11:02 -07:00
i18n.js feat(reasoning): full /reasoning CLI parity — show|hide + effort levels via config.yaml (#812) 2026-04-21 15:26:52 -07:00
icons.js feat: composer-centric UI refresh + Hermes Control Center (v0.50.0, closes #242) 2026-04-12 11:55:40 -07:00
index.html fix(ui): clear session search on boot + autocomplete=off + pageshow bfcache handler (closes #822) 2026-04-21 22:11:32 -07:00
login.js feat: support subpath mount via reverse proxy — v0.50.67 (PR #588 by @vcavichini) 2026-04-16 11:20:08 -07:00
messages.js fix: streaming race conditions (#631) + blank-page workspace binding (#804) 2026-04-21 18:47:40 -07:00
onboarding.js fix(config): use Hermes config.yaml as single source of default model (#773) 2026-04-20 22:12:01 +00:00
panels.js fix(workspace): _profileDefaultWorkspace persists after newSession() (#823) 2026-04-21 19:14:31 -07:00
sessions.js fix(sessions): surface gateway SSE failures and add polling fallback (#828) 2026-04-21 21:18:55 -07:00
style.css fix(ui): workspace pane now respects app theme (#807) 2026-04-21 17:36:33 +00:00
ui.js fix: streaming race conditions (#631) + blank-page workspace binding (#804) 2026-04-21 18:47:40 -07:00
workspace.js feat: support subpath mount via reverse proxy — v0.50.67 (PR #588 by @vcavichini) 2026-04-16 11:20:08 -07:00