Repository navigation
Conversation
commit: |
Bundle size
PerformanceNo regressions in 36 benchmarks · precise to ±10.2% (±15.5% at worst) · ran 4m 04s · details Check out the code infra dashboard for more information about this PR. |
✅ Deploy Preview for base-ui ready!Built without sensitive environment variables
To edit notification comments on pull requests, go to your Netlify project configuration. |
PR reviewThe fix is small and has a clear purpose: when async results go through an empty list (for example, a loading state) after a typed query, it asks again for the first-item highlight. Nothing blocks merge. The one finding is narrow: the new re-arm checks only that the input is non-empty, not that the user typed a query. I read the diff and the enclosing effect but did not run any tests. As instructed, this review was read-only. Bugs (1)1. 🟡 Re-armed highlight is not limited to typed queriesLocation: // Results that empty while a typed query is active (such as a loading state) invalidate
// the highlight, not the query it was placed for. Request it again for the next results.
if (
candidateItems.length === 0 &&
autoHighlightMode &&
(hasItems || hasFilteredItemsProp) &&
String(inputValue).trim() !== ''
) {
pendingQueryHighlightRef.current = { hasQuery: true };
}The comment says this applies "while a typed query is active". The guard only checks that
Failure scenario:
It is narrow: the items have to empty while the popup is open and an item is highlighted. Fix: Only re-arm when the query was actually typed. Gate on Test auditNo actionable test-audit findings.
Verification limits: I did not run the tests, so the fail-before / pass-after behavior is from reading the code only. CI was recorded as green at VerdictApprove after nits - the one finding is a narrow 🟡 edge case where a highlight can be re-armed for a query the user did not type. 🤖 Review generated with Claude Code |
A selected label shown in the input is not a typed query, so an open-time refill through an empty list must not move the highlight off the selection. Amp-Thread-ID: https://ampcode.com/threads/T-01a20988-ea37-7157-885d-72ec477ce3c2 Co-authored-by: Jenna Smith <175330+jjenzz@users.noreply.github.com>
PR reviewNothing here blocks the merge. The re-arm in Residual risk I couldn't confirm: Tests (1)1. 🟡 Negative test title promises a kept highlight that the test doesn't assertLocation: it('does not move the selection highlight when results refill through an empty list without typing', async () => {
...
await setProps({ items: [] });
await setProps({ items: ['31', '32', '33'] });
expect(screen.getByRole('option', { name: '31' })).not.toHaveAttribute('data-highlighted');
await user.keyboard('{Enter}');
expect(onValueChange).not.toHaveBeenCalled();The title reads as if the highlight stays on the selected item ( Failure scenario: Someone reading the title assumes the selection highlight survives an empty-list refill. If a later change restores the highlight to Fix: Rename it to match the assertions, for example Test auditUsing the pinned test-audit skill, I read
No other test-audit findings. VerdictApprove after nits - the only finding is a 🟡 rename of the new negative test; the earlier re-arm finding is fixed in the current code. 🤖 Review generated with Claude Code |
A trigger press opens on the frame after mousedown, so the CI Chromium run could query the options before the popup mounted. Also name the test after what it asserts. Co-authored-by: Jenna Smith <175330+jjenzz@users.noreply.github.com>
PR reviewNo findings, and nothing blocks merge. The change adds one gated re-arm of What I checked in the current code:
Test auditNo findings.
VerdictApprove - the re-arm is narrowly gated, earlier findings are fixed, and the new tests pin the positive and negative contracts. 🤖 Review generated with Claude Code |
…5-c9411009aec3 Co-authored-by: Amp <amp@ampcode.com>
PR reviewNo findings. Nothing here blocks the merge. The new head merges in a docs-only master commit: The source change is in
This fits the existing request lifecycle:
The expected behavior holds up on its own terms. A typed query asked for the first candidate to be highlighted. An empty loading state in between doesn't change that query, so the first item should be highlighted when the results come back. Opening without typing anchors the highlight on the selection, so it should not be forced onto index 0. Previous decisions:
Commit attribution: all four commits ( Remaining risk: the re-arm also overrides a highlight the user moved with the arrow keys before the results emptied. It goes back to index 0, which is the same as what typing does, so I don't count it as a defect. Per the instructions, I didn't run tests. Test results come from the recorded history: the regressions fail with master's Test auditNo actionable test-audit findings.
VerdictApprove - the PR's combobox code and tests are unchanged since the approved head, the merge only touches docs, and no new defects or test-audit issues turned up. 🤖 Review generated with Claude Code |
Fixes #6323
before.mp4
after.mp4