fix(web): enter activates highlighted search row (#406)#459
fix(web): enter activates highlighted search row (#406)#459intendednull wants to merge 1 commit into
Conversation
caveman: enter on search input go to recents pile, not row. fix: enter check active_index. row there? activate row, same as click. row gone (no results, stale index)? fall back to recents push so empty-query still work. new prop SearchInput.on_activate, surface wires it to same on_select_result the row click uses. keyboard + mouse converge on one path. three browser tests pin contract: - enter on row 1 of 2 fires on_activate(m-1), no submit - enter with empty results falls back to on_submit(query) - enter with active_index past tail falls back, no panic Refs #406
|
What happened here? Why was this not merged? |
|
root cause: ci.yml + e2e.yml only trigger on skill's master-PR-batch pattern assumes sub-PRs trigger CI. this repo gates CI to main-only. pattern breaks here. retargeting #459 base → Generated by Claude Code |
|
Fix the conflicts and make sure we have an issue open if the problem has not already been addressed in regards to the skill workflow. |
|
closing — duplicate of #433. PR #433 (merged 2026-04-27 13:01) shipped same fix for #406: wire Enter to PR #459 dispatched 2026-04-28 04:19 by /resolving-issues skill that pulled the issue list before the dedup pass — issue showed filing follow-up note in #465 (skill workflow tracking issue) — implementer agents should re-check issue state at start as a fast-fail guard. closing PR + tearing down worktree. no code shipped. Generated by Claude Code |
what
caveman: enter on search input use to push query to recents pile, even
when row was highlighted. AT users see
aria-activedescendantsay row1 selected, hit enter, nothing happen except recents grow. broken
since #344 / PR #403 added active_index but never wired enter to it.
fix
crates/web/src/components/search/input.rsenter branch:active_indexagainst flatresults.len().on_activate(SearchResult). same callback rowclick fires.
on_submit(query)(recents push). empty-query affordance kept.prevent_defaultso wrapping<form>no swallow the enterand tear surface down.
SearchSurfacewireson_activate=on_select_result. keyboard andmouse now converge on one navigation path.
tests
three new browser tests in
crates/web/tests/browser.rsmodphase_2e_search_enter_activate:enter_with_active_row_activates_that_row_not_recents_push- tworows, active_index=1, enter fires on_activate(m-1), submit silent.
enter_with_no_results_falls_back_to_recents_push- empty results,enter fires on_submit(query), activate silent.
enter_with_active_index_past_tail_falls_back_to_submit- staleindex past tail, enter no panic, falls back to submit.
verify
local (no firefox/wasm-pack/geckodriver in worktree, CI runs headed
browser tests):
cargo fmt --checkcleancargo clippy --workspace --all-targets -- -D warningscleancargo check -p willow-web --tests --target wasm32-unknown-unknownclean
cargo test -p willow-web --lib72 passedwasm-pack browser run deferred to CI - geckodriver setup not in this
sandbox. expectation: the three new tests RED before patch (compile
failure -
on_activateprop missing), GREEN after.tradeoff
runner-up: keep one
on_submit: Callback<String>and let surfaceinspect active_index itself. rejected - couples surface to flat-order
walk that already lives in
input.rsfor arrow keys andaria-activedescendant. one source of truth for "what doesactive_index point at" stays inside the input component.
Refs #406
Generated by Claude Code