Claude: changes for issue #171 #174

Merged
Grandiras merged 1 commit from claude/issue-171 into main 2026-08-26 23:31:08 +00:00
Collaborator

Closes #171.

Closes #171.
Search: arrow keys move the row without moving the caret
All checks were successful
CI / build (pull_request) Successful in 37s
91092d3f5a
Up and down in the search box moved the active row and, because nothing
called preventDefault, the browser also did what an arrow means in a text
field: throw the caret to the far end of the query. A look down the list
left the next correction going in at the wrong place.

A Blazor handler cannot decide preventDefault per key — the flag is read
at render time, so it would have to be set before the keystroke it applies
to and would suppress the letters too. So search-interop.js takes the
key's browser meaning off it, and does that only while the rendered panel
actually holds a row, which is the C# switch's own hits > 0 condition read
off the markup rather than copied into the browser. With no list under the
field the arrows are the caret's again.

search.spec.js pins both halves: the caret stays put while the active row
cycles, and it still moves when there is nothing to cycle through.
Author
Collaborator

🤖 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.

🤖 Reviewing this PR — follow along in [the action run](https://git.grandiras.net/Grandiras/claude-bot/actions/runs/401); the reply will link the full session transcript. <!-- claude-run:pr_review --> 📜 [Live transcript](https://git.grandiras.net/Grandiras/claude-bot/src/branch/claude-logs/transcripts/Grandiras/Ponente/pr-174/run-401.md) — updating every ~5 minutes while the task runs.
claude-reviewer left a comment

💬 Verdict: comment — notes only, nothing blocking.

Solid, well-reasoned fix. The core problem — the browser's native arrow-key caret jump fighting with the C# active-row logic — is correctly diagnosed, and the fix is careful: the ownsArrow gate in JS reads the exact same DOM fact (role="option" rows under #nav-search-panel) that the C# switch's _hits.Count > 0 renders from, so the two conditions structurally cannot disagree. Threading the input ElementReference through watch(dotNetRef, input) is the right way to scope the suppression to this field only. Calling preventDefault from the later document-level listener still works because the native caret-move default action only takes effect after the whole dispatch (including Blazor's own bubbling handler) completes — no bug there. The added Playwright coverage is good: it pins the caret position explicitly (not just the active row), and separately verifies the arrows revert to normal caret behavior once the hit list is empty. Docs are updated in the same PR as required.

One conventions gap: this is a member-visible bug fix (arrow-key navigation was corrupting the caret while correcting a search), and CLAUDE.md requires such changes to add a line to Changelog.Unreleased in Services/Changelog.cs in the same PR. That file isn't touched here.


⏱ 1m 39s · 11 turns · tokens: 35.1k in / 8.1k out (+449.5k cache-read)
📜 Full session transcript

💬 **Verdict: comment** — notes only, nothing blocking. Solid, well-reasoned fix. The core problem — the browser's native arrow-key caret jump fighting with the C# active-row logic — is correctly diagnosed, and the fix is careful: the `ownsArrow` gate in JS reads the exact same DOM fact (`role="option"` rows under `#nav-search-panel`) that the C# switch's `_hits.Count > 0` renders from, so the two conditions structurally cannot disagree. Threading the input `ElementReference` through `watch(dotNetRef, input)` is the right way to scope the suppression to this field only. Calling `preventDefault` from the later document-level listener still works because the native caret-move default action only takes effect after the whole dispatch (including Blazor's own bubbling handler) completes — no bug there. The added Playwright coverage is good: it pins the caret position explicitly (not just the active row), and separately verifies the arrows revert to normal caret behavior once the hit list is empty. Docs are updated in the same PR as required. One conventions gap: this is a member-visible bug fix (arrow-key navigation was corrupting the caret while correcting a search), and CLAUDE.md requires such changes to add a line to `Changelog.Unreleased` in `Services/Changelog.cs` in the same PR. That file isn't touched here. --- ⏱ 1m 39s · 11 turns · tokens: 35.1k in / 8.1k out (+449.5k cache-read) 📜 [Full session transcript](https://git.grandiras.net/Grandiras/claude-bot/src/branch/claude-logs/transcripts/Grandiras/Ponente/pr-174/run-401.md) <!-- claude-verdict:comment --> <!-- claude-reviewed-head:91092d3f5a1357354e09bd84e28e9541086105d8 -->
Collaborator

This PR fixes a bug a member would notice (arrow keys through the search results throwing the caret to the end of the typed query) but doesn't add a bullet to Unreleased here, as CLAUDE.md's changelog convention requires for member-visible changes.

This PR fixes a bug a member would notice (arrow keys through the search results throwing the caret to the end of the typed query) but doesn't add a bullet to `Unreleased` here, as CLAUDE.md's changelog convention requires for member-visible changes.
Author
Collaborator

🔧 Let Claude fix this — tick the box and claude-bot picks up the review above, on this PR branch. Nothing runs until you do.

  • @claude-bot Address the findings of the latest review on this pull request.
🔧 **Let Claude fix this** — tick the box and claude-bot picks up the review above, on this PR branch. Nothing runs until you do. - [ ] @claude-bot Address the findings of the latest review on this pull request. <!-- claude-fix-button:174 -->
Author
Collaborator

🤖 On it — follow along in the action run; the reply will link the full session transcript.

📜 Live transcript — updating every ~5 minutes while the task runs.

🤖 On it — follow along in [the action run](https://git.grandiras.net/Grandiras/claude-bot/actions/runs/402); the reply will link the full session transcript. <!-- claude-run:comment --> 📜 [Live transcript](https://git.grandiras.net/Grandiras/claude-bot/src/branch/claude-logs/transcripts/Grandiras/Ponente/issue-174/run-402.md) — updating every ~5 minutes while the task runs.
Grandiras deleted branch claude/issue-171 2026-08-26 23:31:08 +00:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Grandiras/Ponente!174
No description provided.