Repository navigation
fix: keep LLM dashboard scope filters clearable when their options fail to load #3105
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,11 @@ | ||
| --- | ||
| '@hyperdx/app': patch | ||
| --- | ||
|
|
||
| fix: keep the LLM dashboard scope filters clearable when their options fail to | ||
| load | ||
|
|
||
| The session and user dropdowns were disabled whenever their distinct-value query | ||
| was loading or had failed. With a filter applied that left the user looking at a | ||
| scope they could see but could not remove — permanently, if the query kept | ||
| failing. They now stay interactive whenever a value is applied. |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -89,7 +89,10 @@ export function DistinctValueSelect({ | |
| data={values} | ||
| value={value || null} | ||
| onChange={v => onChange(v ?? '')} | ||
| disabled={isLoading || isError} | ||
| // Never lock the control while a scope is applied: the options are of no | ||
| // use yet, but clearing the filter must stay possible. On a failing | ||
| // distinct query that is otherwise permanent. | ||
| disabled={(isLoading || isError) && !value} | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🔵 minor — Enabling the control on error removes the only signal that the option list failed to load With a value applied and |
||
| comboboxProps={{ withinPortal: false }} | ||
| searchable | ||
| clearable | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🔵 minor — New test asserts
not.toBeDisabled()as a proxy instead of exercising the clear the PR is aboutThe regression that matters is that the user cannot remove the filter, and that depends on Mantine rendering the clear
×(which requires!disabled && !readOnlyandclearable) —expect(input).not.toBeDisabled()still passes if a later change addsreadOnly, dropsclearable, or supplies arightSection. Click the rendered clear button and assertonChangewas called with''.