Search bar autocomplete stops working after a model appears in the suggestions
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 78/100
- Issue type
- Bug
- Clarity
- Clearly specified
- Activity status
- Active
- Tech stack
- typescript
Research direction
Start in SearchBarComponent.convertToName in search-bar.component.ts and trace the switchMap subscription that feeds the dashboard search bar. Reproduce with a model result, then verify that model suggestions are named and that a failed request or unnameable row does not prevent the next keystroke from searching.
Written by the indexing model from the issue text.
Description
What happened?
Once a model shows up among the dashboard search bar's suggestions, autocomplete stops working for the rest of the session. Later keystrokes never reach the server, and the dropdown stays empty until the page is reloaded.
Root cause. The search bar searches every resource kind (type = null, so resourceType=""). Since #7930 the backend's all-kinds query unions in models, and SearchService.search keeps rows with a model payload. SearchBarComponent.convertToName only names workflows, datasets and files. On a model row it throws Unexpected type in SearchResult.. That throw happens inside the switchMap feeding the search bar's long-lived subscription, and the subscription has no error handler, so the error ends it for good.
Before: type "my" -> results include a model -> convertToName throws -> subscription errors
type anything else -> nothing happens (subscription is closed)
After: type "my" -> model listed by name
a failed request or unnameable row -> no suggestions for that query; the next keystroke still searches
Any HTTP failure on the search request ends the same subscription the same way, because both HTTP interceptors rethrow. That includes a 5xx, a dropped connection, or a 401.
Expected: model hits are listed by name, and one bad response costs only that query's suggestions.
How to reproduce?
- Log in and make sure at least one model you can see matches a keyword, e.g. a model named
my-model. - Type
myinto the dashboard search bar. No suggestions appear, and the browser console logsError: Unexpected type in SearchResult. - Type a keyword that only matches a workflow. Still no suggestions, and no new
dashboard/searchrequest goes out.
Version/Branch
1.4.0-incubating-SNAPSHOT (main)
Commit Hash (Optional)
d102e26978cf0a377992b7d3ded03eaccd5d5c75
What browsers are you seeing the problem on?
No response
Relevant log output
Error: Unexpected type in SearchResult.
at SearchBarComponent.convertToName (search-bar.component.ts)
- Dominant language
- Scala
- Stars
- 316
- Forks
- 189
- Avg merge
- 4d 6h
- Merged PRs (30d)
- 161
Getting set up
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from apache/texera
-
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
apache/texera#8682 · 4 comments ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 86/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
apache/texera#8300 · 3 comments ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
apache/texera#8235 · 2 comments ·
Maintainers usually reply within 1 day
Similar issues
-
bug performance priority:medium regression
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
apache/datafusion-comet#6313 ·
Maintainers usually reply within 1 day
-
bug
Difficulty 1/5 Under an hour Newbie friendliness 88/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
com-lihaoyi/mill#7624 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
lichess-org/lila#21845 ·
Maintainers usually reply within 1 day
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
Maintainers usually reply within 1 day