Hacktoberfest 2026:维护者为十月标记出来的 issue,仍然开放、适合新手。 浏览 Hacktoberfest issue

Search bar autocomplete stops working after a model appears in the suggestions

未关闭 适合新手
#8,700 1 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 1 天内回复

还没有人认领这个 Issue。

评估

难度
2/5
预计耗时
1-3 小时
新手友好度
78/100
Issue 类型
缺陷
描述清晰度
描述清楚
活跃度
活跃
技术栈
typescript
领域
frontend, search

调研方向

从 search-bar.component.ts 中的 SearchBarComponent.convertToName 开始,跟踪为 dashboard 搜索栏提供数据的 switchMap 订阅。使用一个模型结果进行复现,然后验证模型建议已命名,并确认失败的请求或无法命名的行不会阻止下一次按键触发搜索。

由索引模型根据 Issue 内容生成。

描述

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?
  1. Log in and make sure at least one model you can see matches a keyword, e.g. a model named my-model.
  2. Type my into the dashboard search bar. No suggestions appear, and the browser console logs Error: Unexpected type in SearchResult.
  3. Type a keyword that only matches a workflow. Still no suggestions, and no new dashboard/search request 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)
主要语言
Scala
星标
316
派生
189
平均合并
4 天 23 小时
30 天内合并 PR
157

环境准备

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

apache/texera 的其他 Issue

查看 apache/texera 的全部 Issue

相似的 Issue

更多 Scala Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。