Close the search hit's card before the 960px check, and focus a card dialog first #248
No reviewers
Labels
No labels
No milestone
No project
No assignees
5 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Grandiras/Ponente!248
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "fix/search-spec-inspector"
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?
search.spec.js› search finds a card by what is written on it, and by who and when failed in full runs: a 60 s timeout clicking.nav-search-input, intercepted by.modal-backdrop-dockable. It passed when run alone.Cause
It wasn't
createCard. Enter on a search hit opens the card, and the spec pressed Escape as soon as?card=left the URL.SearchBoxkeeps focus in its field untilCardModalfocuses its backdrop inOnAfterRenderAsync. An Escape before that goes to the search field, andmodal-escape.jsonly redirects from<body>, so the inspector stayed open. At 1280px it sits on the right and doesn't cover the sidebar search, so the next click still worked. At 960px it becomes the centred dialog, and the click on the search box atsearch.spec.js:152waited until the test timed out.#241 made this likely:
CardModalimportsinspector.jsand callswatchbefore focusing, so focus now lands three round trips after the dialog shows instead of one.Fix
CardModalfocuses first, then wires the inspector, which restores the one-round-trip gap from before #241. It also shortens the window in which a new card's title drops typing. #241 is unreleased, so there's no changelog line.docs/ui.md(Escape before focus lands) records the order and the search-field case.Verified
All runs used an isolated, port-shifted copy (
ponentesearch, ports 1809x). The shared stack wasn't touched.main(84c1e46): 161 passed, 1 failed (this test, at line 152). The screenshot showed the hit's card still open, centred..nav-search-inputwhen Escape landed, and the dialog stayed open.search.spec.js --repeat-each=39/9, full suite 162/162,tools/verify.sh584/584.🤖 Generated with Claude Code
🤖 Reviewing this PR — the review will link the full session transcript.
📜 Live transcript — updating every ~5 minutes while the review runs.
🤖 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 root cause is right: an Escape sent while focus is still in the search field is neither redirected by
modal-escape.js(it only acts from<body>) nor handled by the dialog. Focusing before theinspector.jsimport andwatchcall removes two interop round trips from that window. TheDockablefallback still catchesJSException, so a failure in the module path can't affect focus. The spec now waits for.modal-backdropto take focus and then asserts the dialog closed, so a missed Escape fails at the right line instead of timing out later at 960px.docs/ui.mdrecords the order and the reason, and omitting a changelog line is right since #241 is unreleased. I did not run the specs. The PR reports the full e2e suite at 162/162,search.spec.js --repeat-each=3at 9/9 andtools/verify.shat 584/584.Not blocking: the window is shortened, not closed. A very fast human Escape right after Enter on a hit could still reach the search field. Closing it would need
SearchBoxto blur its field when it opens a card.🧠 claude-sonnet-5-5 · ⏱ 0m 11s · 2 turns · tokens: 11.0k in / 1.3k out (+12.2k cache-read)
📜 Full session transcript
✅ Verdict: approve — no blocking issues found.
Good to merge. The reorder in
CardModal.OnAfterRenderAsync(focus first, then the inspector's import +watch) restores the one-round-trip focus gap and keeps thecatch (JSException)as the last awaited op, so the focus is never skipped by a dock failure. The spec now waits for.modal-backdropto take focus before pressing Escape and asserts the dialog actually closed, which pins the Enter-on-hit → dialog → Escape flow deterministically instead of racing the SignalR/JS round trips. Thedocs/ui.mdaddition documents the ordering and the search-field case on the page that already covers Escape-before-focus; no changelog line is correct since #241 is unreleased and this only returns its behaviour. No correctness or security concerns.⏱ 2m 2s · 4 steps · $0.0039 · tokens: 14.8k in / 606 out (+22.8k cache-read) · Go: 5h 0% · wk 10% · mo 87%
📜 Full session transcript