From 58e49b236232bb167a33405e9409f75466931ea1 Mon Sep 17 00:00:00 2001 From: kary zheng Date: Sat, 31 Oct 2026 23:11:39 -0700 Subject: [PATCH] feat(frontend): ask for the row details within the server's column limit selectPage defaulted its column limit to Number.MAX_SAFE_INTEGER, which the server cannot read as an Int, so a request that left it out was never answered and was recorded as a compilation error. The Row Details modal and report generation both leave it out. The default is now ALL_COLUMNS, Int.MaxValue, and the page cache is keyed by the same value. Closes #9241. Co-Authored-By: Claude Opus 5.5 --- .../workflow-result/workflow-result.service.spec.ts | 10 ++++++++++ .../workflow-result/workflow-result.service.ts | 11 ++++++++--- 2 files changed, 18 insertions(+), 3 deletions(-) diff --git a/frontend/src/app/workspace/service/workflow-result/workflow-result.service.spec.ts b/frontend/src/app/workspace/service/workflow-result/workflow-result.service.spec.ts index 6bf168ed62f..e8575d6436a 100644 --- a/frontend/src/app/workspace/service/workflow-result/workflow-result.service.spec.ts +++ b/frontend/src/app/workspace/service/workflow-result/workflow-result.service.spec.ts @@ -19,6 +19,7 @@ import { TestBed } from "@angular/core/testing"; import { + ALL_COLUMNS, OperatorPaginationResultService, OperatorResultService, WorkflowResultService, @@ -474,6 +475,15 @@ describe("OperatorPaginationResultService", () => { expect((service as any).pendingRequests.size).toBe(0); }); + it("asks for every column within the server's Int when no column limit is given", () => { + service.selectPage(3, 10).subscribe(); + + expect(mockWorkflowWebsocketService.send).toHaveBeenCalledWith( + "ResultPaginationRequest", + expect.objectContaining({ columnLimit: ALL_COLUMNS }) + ); + }); + it("bypasses the frontend cache when column filters are set", () => { (service as any).resultCache.set(2, [{ id: 1 }]); service.selectPage(2, 10, 5).subscribe(); diff --git a/frontend/src/app/workspace/service/workflow-result/workflow-result.service.ts b/frontend/src/app/workspace/service/workflow-result/workflow-result.service.ts index 2b73e418372..7c120579024 100644 --- a/frontend/src/app/workspace/service/workflow-result/workflow-result.service.ts +++ b/frontend/src/app/workspace/service/workflow-result/workflow-result.service.ts @@ -262,6 +262,12 @@ export class OperatorResultService { } } +/** + * A column limit that asks for every column. The server reads the limit as a 32-bit Int, so it is + * Int.MaxValue there; Number.MAX_SAFE_INTEGER fails to parse and the request is never answered. + */ +export const ALL_COLUMNS = 2147483647; + export class OperatorPaginationResultService { private pendingRequests: Map> = new Map(); private resultCache: Map> = new Map(); @@ -317,14 +323,13 @@ export class OperatorPaginationResultService { pageIndex: number, pageSize: number, columnOffset: number = 0, - columnLimit: number = Number.MAX_SAFE_INTEGER, + columnLimit: number = ALL_COLUMNS, columnSearch: string = "" ): Observable { // update currently selected page this.currentPageIndex = pageIndex; // first fetch from frontend result cache - const useCache = - this.portIndex === 0 && columnOffset === 0 && columnLimit === Number.MAX_SAFE_INTEGER && columnSearch === ""; + const useCache = this.portIndex === 0 && columnOffset === 0 && columnLimit === ALL_COLUMNS && columnSearch === ""; const pageCache = useCache ? this.resultCache.get(pageIndex) : undefined; if (pageCache) { return of({