You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@texera.apache.org by "aglinxinyuan (via GitHub)" <gi...@apache.org> on 2026/09/27 00:35:48 UTC

[PR] fix(frontend): handle model hits in search-bar autocomplete [texera]

aglinxinyuan opened a new pull request, #8701:
URL: https://github.com/apache/texera/pull/8701

   ### What changes were proposed in this PR?
   
   **Root cause.** The dashboard search bar searches every resource kind (`type = null`). Since #7930 that query returns model rows too, and `SearchService.search` keeps them. `SearchBarComponent.convertToName` had no model branch, so a model row threw `Unexpected type in SearchResult.` inside the `switchMap` feeding the component's only search subscription. That subscription has no error handler, so the throw ended it and every later keystroke was dropped until reload.
   
   ```
   Before:  type "my" -> a model matches -> convertToName throws -> subscription closed
            type "wf" -> no request, no suggestions (rest of the session)
   After:   type "my" -> "my-model" suggested
            a failed request or unnameable row -> [] for that query -> type "wf" -> searches as normal
   ```
   
   Two changes:
   
   1. `convertToName` names model rows with `new DashboardEntry(resultItem.model).name`, the same way as the other kinds.
   2. The per-query observable in `getSearchResults` ends in `catchError(() => of([]))`.
   
   **Why the `catchError`.** The first change fixes this trigger. It does not stop the next one: #7930 updated the `SearchService` filter but not `convertToName`, and a stale second list of kinds will drift again. HTTP errors end the same subscription today as well, because both interceptors rethrow. That covers a 5xx, a dropped connection and a 401. Putting the catch on the inner, per-query observable means a bad response costs that query's suggestions, and the next keystroke searches again. A failed query is not cached, so typing the same text again retries. This matches the per-request `catchError(() => of([]))` that `FiltersComponent` already uses for the same reason. The `SearchService` comment claiming the autocomplete has no error handler is corrected to match.
   
   ### Any related issues, documentation, discussions?
   
   Closes #8700
   
   ### How was this PR tested?
   
   Tests came first. Four new cases in `search-bar.component.spec.ts` failed on unchanged source, and all 14 pass with the fix:
   
   | Case | Pins |
   | --- | --- |
   | `convertToName` on a model-only row | returns the model's name |
   | model-only search response | the model's name is listed |
   | response with an unnameable row | that query lists nothing; the next query still searches and lists its results |
   | failed request (HTTP 500) | that query lists nothing and is not cached; retrying the same query hits the server and lists results |
   
   Mutation check: dropping only the `catchError` makes the last two fail, and dropping only the model branch makes the first two fail.
   
   From `frontend/`:
   
   - `npx ng test --watch=false --include='**/search-bar.component.spec.ts'`: 14 passed.
   - `yarn --cwd frontend format:ci`: clean.
   - `node node_modules/typescript/bin/tsc -p src/tsconfig.spec.json --noEmit`: no errors.
   
   ### Was this PR authored or co-authored using generative AI tooling?
   
   Generated-by: Claude Code (Claude Opus 5.5)
   
   🤖 Generated with [Claude Code](https://claude.com/claude-code)
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@texera.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] fix(frontend): handle model hits in search-bar autocomplete [texera]

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #8701:
URL: https://github.com/apache/texera/pull/8701#issuecomment-5851314432

   <!-- backport-auto-label-report -->
   ### Backport auto-label report
   
   This `fix:` PR was checked against each actively-supported release branch. A `release/*` label nominates a backport target; the branch's release manager approving this PR is what sends the fix there. The required **Backport Approvals** check stays red until every label below is approved, so each manager either approves or removes their own label — which is why the labels left on a merged PR are exactly the branches it reached.
   
   | Release branch | Analysis |
   | --- | --- |
   | ✅ `release/v1.3` | Change detected on this branch — label added; this fix is queued to backport here. @mengw15 decides: approving sends the fix here, removing this label declines it. The merge waits on one or the other. Review requested. |
   | ✅ `release/v1.2` | Change detected on this branch — label added; this fix is queued to backport here. @xuang7 decides: approving sends the fix here, removing this label declines it. The merge waits on one or the other. Review requested. |
   
   _[Auto-label run](https://github.com/apache/texera/actions/runs/36282975895)._


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@texera.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] fix(frontend): handle model hits in search-bar autocomplete [texera]

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #8701:
URL: https://github.com/apache/texera/pull/8701#issuecomment-5851314411

   <!-- texera-reviewer-suggestion -->
   ### Automated Reviewer Suggestions
   
   Based on the `git blame` history of the changed files, we recommend the following reviewers:
   
   - **Contributors with relevant context:** `@tanishqgandhi1908`
     You can notify them by mentioning `@tanishqgandhi1908` in a comment.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@texera.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] fix(frontend): handle model hits in search-bar autocomplete [texera]

Posted by "aglinxinyuan (via GitHub)" <gi...@apache.org>.
aglinxinyuan commented on PR #8701:
URL: https://github.com/apache/texera/pull/8701#issuecomment-6307683099

   Removing release/v1.3 too: the root cause (#7930, model search) isn't on that branch either, so the backport fails to compile on `SearchResultItem.model`.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@texera.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] fix(frontend): handle model hits in search-bar autocomplete [texera]

Posted by "aglinxinyuan (via GitHub)" <gi...@apache.org>.
aglinxinyuan merged PR #8701:
URL: https://github.com/apache/texera/pull/8701


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@texera.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] fix(frontend): handle model hits in search-bar autocomplete [texera]

Posted by "codecov-commenter (via GitHub)" <gi...@apache.org>.
codecov-commenter commented on PR #8701:
URL: https://github.com/apache/texera/pull/8701#issuecomment-5851369712

   ## [Codecov](https://app.codecov.io/gh/apache/texera/pull/8701?dropdown=coverage&src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) Report
   :white_check_mark: All modified and coverable lines are covered by tests.
   :white_check_mark: Project coverage is 92.72%. Comparing base ([`d102e26`](https://app.codecov.io/gh/apache/texera/commit/d102e26978cf0a377992b7d3ded03eaccd5d5c75?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)) to head ([`5477c0a`](https://app.codecov.io/gh/apache/texera/commit/5477c0a0d373a4666115a8133fce60abd4f1f870?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)).
   
   <details><summary>Additional details and impacted files</summary>
   
   
   
   ```diff
   @@            Coverage Diff            @@
   ##               main    #8701   +/-   ##
   =========================================
     Coverage     92.72%   92.72%           
     Complexity     4946     4946           
   =========================================
     Files          1242     1242           
     Lines         52671    52674    +3     
     Branches       6519     6520    +1     
   =========================================
   + Hits          48838    48842    +4     
     Misses         2214     2214           
   + Partials       1619     1618    -1     
   ```
   
   | [Flag](https://app.codecov.io/gh/apache/texera/pull/8701/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | Coverage Δ | | *Carryforward flag |
   |---|---|---|---|
   | [access-control-service](https://app.codecov.io/gh/apache/texera/pull/8701/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `77.38% <ø> (ø)` | | Carriedforward from [d102e26](https://app.codecov.io/gh/apache/texera/commit/d102e26978cf0a377992b7d3ded03eaccd5d5c75?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) |
   | [agent-service](https://app.codecov.io/gh/apache/texera/pull/8701/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `99.16% <ø> (ø)` | | Carriedforward from [d102e26](https://app.codecov.io/gh/apache/texera/commit/d102e26978cf0a377992b7d3ded03eaccd5d5c75?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) |
   | [amber](https://app.codecov.io/gh/apache/texera/pull/8701/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `88.46% <ø> (ø)` | | Carriedforward from [d102e26](https://app.codecov.io/gh/apache/texera/commit/d102e26978cf0a377992b7d3ded03eaccd5d5c75?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) |
   | [computing-unit-managing-service](https://app.codecov.io/gh/apache/texera/pull/8701/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `60.41% <ø> (ø)` | | Carriedforward from [d102e26](https://app.codecov.io/gh/apache/texera/commit/d102e26978cf0a377992b7d3ded03eaccd5d5c75?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) |
   | [config-service](https://app.codecov.io/gh/apache/texera/pull/8701/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `87.37% <ø> (ø)` | | Carriedforward from [d102e26](https://app.codecov.io/gh/apache/texera/commit/d102e26978cf0a377992b7d3ded03eaccd5d5c75?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) |
   | [file-service](https://app.codecov.io/gh/apache/texera/pull/8701/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `81.53% <ø> (ø)` | | Carriedforward from [d102e26](https://app.codecov.io/gh/apache/texera/commit/d102e26978cf0a377992b7d3ded03eaccd5d5c75?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) |
   | [frontend](https://app.codecov.io/gh/apache/texera/pull/8701/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `96.52% <100.00%> (+<0.01%)` | :arrow_up: | |
   | [notebook-migration-service](https://app.codecov.io/gh/apache/texera/pull/8701/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `83.73% <ø> (ø)` | | Carriedforward from [d102e26](https://app.codecov.io/gh/apache/texera/commit/d102e26978cf0a377992b7d3ded03eaccd5d5c75?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) |
   | [pyamber](https://app.codecov.io/gh/apache/texera/pull/8701/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `98.56% <ø> (ø)` | | Carriedforward from [d102e26](https://app.codecov.io/gh/apache/texera/commit/d102e26978cf0a377992b7d3ded03eaccd5d5c75?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) |
   | [workflow-compiling-service](https://app.codecov.io/gh/apache/texera/pull/8701/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `74.09% <ø> (ø)` | | Carriedforward from [d102e26](https://app.codecov.io/gh/apache/texera/commit/d102e26978cf0a377992b7d3ded03eaccd5d5c75?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) |
   
   *This pull request uses carry forward flags. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) to find out more.
   </details>
   
   [:umbrella: View full report in Codecov by Harness](https://app.codecov.io/gh/apache/texera/pull/8701?dropdown=coverage&src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache).   
   :loudspeaker: Have feedback on the report? [Share it here](https://about.codecov.io/codecov-pr-comment-feedback/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache).
   <details><summary> :rocket: New features to boost your workflow: </summary>
   
   - :package: [JS Bundle Analysis](https://docs.codecov.com/docs/javascript-bundle-analysis): Save yourself from yourself by tracking and limiting bundle sizes in JS merges.
   </details>


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@texera.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] fix(frontend): handle model hits in search-bar autocomplete [texera]

Posted by "aglinxinyuan (via GitHub)" <gi...@apache.org>.
aglinxinyuan closed pull request #8701: fix(frontend): handle model hits in search-bar autocomplete
URL: https://github.com/apache/texera/pull/8701


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@texera.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] fix(frontend): handle model hits in search-bar autocomplete [texera]

Posted by "bobbai00 (via GitHub)" <gi...@apache.org>.
bobbai00 commented on code in PR #8701:
URL: https://github.com/apache/texera/pull/8701#discussion_r4333332182


##########
frontend/src/app/dashboard/component/user/search-bar/search-bar.component.ts:
##########
@@ -107,12 +107,15 @@ export class SearchBarComponent {
         this.includePublic
       );
 
+      // A failed request or a row convertToName cannot name costs this query its suggestions, not the
+      // subscription in the constructor, which would otherwise end and leave autocomplete dead for the session.
       return searchObservable.pipe(
         switchMap((result: SearchResult) => {
           const uniqueResults = Array.from(new Set(result.results.map(item => this.convertToName(item))));
           this.addToCache(query, uniqueResults);
           return of(uniqueResults);
-        })
+        }),
+        catchError(() => of([]))

Review Comment:
   **Advisory:**
   
   This catch also swallows `convertToName`'s throw. So the kind drift the description predicts would show as an empty dropdown with nothing logged; on main it reached the console, which is how #8700 was found. [`FiltersComponent`](https://github.com/apache/texera/blob/242daebff3451c9bd1c284b625bc2d0eb14a58d4/frontend/src/app/dashboard/component/user/filters/filters.component.ts#L211) only wraps the request. I'd remove the second list instead: reuse the payload lookup at `search.service.ts:250` in the filter (`:109`) and in `convertToName`, so they cannot disagree.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@texera.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] fix(frontend): handle model hits in search-bar autocomplete [texera]

Posted by "aglinxinyuan (via GitHub)" <gi...@apache.org>.
aglinxinyuan commented on code in PR #8701:
URL: https://github.com/apache/texera/pull/8701#discussion_r4366302108


##########
frontend/src/app/dashboard/component/user/search-bar/search-bar.component.ts:
##########
@@ -107,12 +107,15 @@ export class SearchBarComponent {
         this.includePublic
       );
 
+      // A failed request or a row convertToName cannot name costs this query its suggestions, not the
+      // subscription in the constructor, which would otherwise end and leave autocomplete dead for the session.
       return searchObservable.pipe(
         switchMap((result: SearchResult) => {
           const uniqueResults = Array.from(new Set(result.results.map(item => this.convertToName(item))));
           this.addToCache(query, uniqueResults);
           return of(uniqueResults);
-        })
+        }),
+        catchError(() => of([]))

Review Comment:
   Applied — `convertToName`, the `SearchService` filter and its hub enrichment now all read a row through one `searchResultPayload` lookup, so they can't disagree, and the catch wraps only the request like `FiltersComponent`, so a naming error reaches the console again (0cd23777d6). A failed request still clears the dropdown and isn't cached, and the funnel spec now includes a row with all-`null` payload fields, the way the server writes a kind we don't model.
   
   _🤖 Addressed by [Claude Code](https://claude.com/claude-code)_
   



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@texera.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] fix(frontend): handle model hits in search-bar autocomplete [texera]

Posted by "xuang7 (via GitHub)" <gi...@apache.org>.
xuang7 commented on PR #8701:
URL: https://github.com/apache/texera/pull/8701#issuecomment-5862253024

   Removing release/v1.2: the root cause (#7930, model search) is not on that branch.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@texera.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org