The GitHub Actions job "Benchmarks" on texera.git/main has succeeded.
Run started by GitHub user github-merge-queue[bot] (triggered by 
github-merge-queue[bot]).

Head commit for run:
846bf06c87a2fae2df2d0cf54ba539e721a4e0ce / Prateek Ganigi 
<[email protected]>
fix(gui): release the previous row's work when the result modal navigates 
(#8729)

### What changes were proposed in this PR?

The row-details modal is reused as the user pages through rows, the
footer's `<` and `>` buttons mutate `rowIndex` and call `ngOnChanges()`
directly, but its teardown was scoped to the modal's lifetime, so work
started for one row outlived the move to the next.

Two consequences. Every media cell fetched through the proxy created an
object URL that was only revoked in `ngOnDestroy`, so paging through
rows of images, audio or video held every blob from every row visited
until the modal closed. And each `ngOnChanges` added another
`selectTuple` subscription without ending the previous one, since
`untilDestroyed` fires on destroy rather than on the next change, so a
slower earlier response could land last and overwrite the row on screen.
In-flight media requests had the same problem.

Both now share one teardown: a `rowChange` subject that `ngOnChanges`
emits before starting the next row's work. `releaseRow()` fires it and
revokes that row's blobs, and the `selectTuple` and media requests are
piped through `takeUntil(this.rowChange)`, so only the current row's
work is ever live. `ngOnDestroy` calls the same method, keeping the
revoke logic in one place.

### Any related issues?

Closes #8727

### How was this PR tested?

Written test-first. Three tests were added to
`result-panel-modal.component.spec.ts`, the previous row's blobs are
revoked on navigation, a late response from the previous row no longer
overwrites the current one, and an in-flight media request is cancelled
when the row changes. All three fail against the current component and
pass with the change; reverting the component and re-running makes
exactly those three fail again.

The file is at 24 tests, the result-panel suite at 180 across 5 files,
and Prettier is clean.

### Was this PR authored or co-authored using generative AI tooling?

Yes, this PR was co-authored with Claude in compliance with ASF policy.

---------

Co-authored-by: Claude Opus 5.5 <[email protected]>

Report URL: https://github.com/apache/texera/actions/runs/42456694938

With regards,
GitHub Actions via GitBox

Reply via email to