Search swallows chars sometimes #167
Labels
No labels
No milestone
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Grandiras/Ponente#167
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
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?
Type bla, the l often gets swallowed
🤖 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.
Fixed on branch
claude/issue-167.What was wrong
The search field rendered
value="@_query"beside an@oninputhandler. Only@bindemitsRenderTreeBuilder.SetUpdatesAttributeName("value")— the call that tells Blazor the element already holds whatever the keystroke it is handling said it held. Without it, every keystroke renders avaluethe diff has never seen and sends it back down as a DOM patch. The patch forblands after you've typedl, resets the field tob, and the next letter makesba.That's why it never showed up in development: on localhost the round trip is a millisecond, so the echo always arrives between two keystrokes with nothing to overwrite. It only bites over a real network.
Verified, not guessed
I ran the app against a local Postgres and drove it with Playwright through a browser context whose circuit delivers the server's messages 120 ms late. Before the fix:
bla→ba, 8 runs out of 8. After: 0 out of 20 across three latency/typing-speed combinations.The fix
SearchBox.razor→@bind+@bind:event="oninput"+@bind:after="OnQueryChanged". Nothing else about the box changed.bla→baon/admin/boardsand/admin/columnsbefore, correct after. They bind through a dictionary, so@bind:get/@bind:set. I fixed them in the same commit rather than filing them separately: it's one defect with one one-line remedy, and leaving three known-broken fields behind would have been worse than the small widening of scope.Also in the commit
tests/e2e/search.spec.jswith a fixture of its own (a lagged circuit — the only condition the bug exists under). Confirmed it fails withExpected "bla" / Received "ba"on the unfixed tree.docs/live-updates.mdgains a section on what a re-render does to a field somebody is typing into,docs/search.mda note on the box, andCLAUDE.mdthe one-line rule, since this is a trap that will otherwise be walked into again.Verification run
dotnet buildanddotnet testclean (448 passed). E2Esearch.spec.js(3 tests, including the new one) andfilter.spec.jspass against the running app. One pre-existing failure inboards.spec.js:165("the nav switches boards…") — it's an entrance-animation opacity gate, and it fails identically on an unmodified tree here, which is the prerender racedocs/testing.mdalready documents for exactly this kind of environment. Not caused by this change and not filed, since testing.md says so already.One gap worth naming: the admin rename fields have no e2e coverage at all, before or after. The mechanism is pinned once in
search.spec.jsand I verified the rename fields by hand rather than building three more board fixtures to re-assert one rule.⏱ 27m 27s · 114 turns · tokens: 134.5k in / 55.6k out (+11133.2k cache-read)
📜 Full session transcript
→ Opened PR: #169