Skip to content

test(extension): regression test for session search focus retention - #48

Closed
iscekic wants to merge 1 commit into
mainfrom
kwf/surface-the-browser-extensio-e520
Closed

test(extension): regression test for session search focus retention#48
iscekic wants to merge 1 commit into
mainfrom
kwf/surface-the-browser-extensio-e520

Conversation

@iscekic

@iscekic iscekic commented Sep 6, 2026

Copy link
Copy Markdown
Owner

Request

Surface: the browser extension (apps/web-extension).

In the extension's session list, the search field loses focus after every keystroke that updates the results, so typing a query takes several attempts. Reproduce first in a live extension build: open the session list, type three characters into the search field, and confirm whether focus survives. If focus already survives, stop with the evidence and no code change. If it does not, fix the root cause (do not remount the input on every result update) and prove the fix on the same live path with a recording or screenshots in the PR body.

Changelog for users

  • No user-visible behavior change.

Changelog for maintainers

  • Test-only change: adds a jsdom regression test that types f, fi, and fix into the "Search sessions" field and asserts focus survives while the debounced search results update (results change on the second and third keystrokes; the first is below the two-character search minimum).
  • No product code is modified; the search input is not remounted on result updates, so the change guards the reported focus-loss behavior rather than altering it.
  • The test renders through the live AgentsMode parent with a mocked agents provider and a stubbed tRPC cliSessionsV2.search, and flushes the 300 ms debounce with a real 350 ms timer — check that the real-timer flush is not flaky in CI.
  • E2E proof is labeled "session list search focus survives three keystrokes" and shows the idle list and the field after the first keystroke; the remaining keystrokes are asserted by the unit test rather than the recording.

E2E proof

[e1] session list search focus survives three keystrokes — e2e-web-extension/e1-list-idle.png

[e1] session list search focus survives three keystrokes — e2e-web-extension/e1-after-f.png

Surface: the browser extension (apps/web-extension).

In the extension's session list, the search field loses focus after every keystroke that updates the results, so typing a query takes several attempts. Reproduce first in a live extension build: open the session list, type three characters into the search field, and confirm whether focus survives. If focus already survives, stop with the evidence and no code change. If it does not, fix the root cause (do not remount the input on every result update) and prove the fix on the same live path with a recording or screenshots in the PR body.
@iscekic iscekic closed this Sep 6, 2026
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.

1 participant