Skip to content

fix(web): an application page drops late answers for the one it showed before (closes #491) - #510

Merged
samuelmbabhazi merged 3 commits into
mainfrom
fix/491-stale-application-responses
Nov 26, 2026
Merged

samuelmbabhazi merged 3 commits into
mainfrom
fix/491-stale-application-responses

Conversation

@samuelmbabhazi

Copy link
Copy Markdown
Collaborator

What changed

In application-page.ts:

  • Every child answer of a load (secret metadata, releases, environment details), success or failure, is applied only if its load is still the one in force (loadRevision). Destroying the page already moves that revision.
  • The release list keeps only its latest request (releasesRequest), so an older refresh that answers last does not replace a newer list.
  • When the environment or the application changes, the previous one's secret metadata, releases and environment details are cleared at once. A reload of the same application keeps them until the new answers arrive.

The deployments, replicas and domains lists already go through Collection, which ignores superseded answers.

Why

Closes #491. Those three requests set the page's state with whichever answer came last. After moving from application A to application B, a slow answer for A could show A's releases or environment under B. A late failure for A could clear B's data.

How it was tested

application-page.spec.ts (new) mounts the real page with fake APIs whose answers the test releases in any order, and moves its inputs from A to B as route reuse does:

  • A's answers arrive after B's, successes and a failure alike: B's secrets, releases and environment stay, and nothing of A shows while B loads.
  • A's late failures do not clear B.
  • After the page is destroyed, answers change nothing.
  • Two release refreshes: the older one answers last, and the newer list stays.

The first three cases failed on the previous code. Every case passes now, along with the web suite (58 files), web:lint and web:typecheck.

Security considerations

None. The server already checks every request. This keeps one application's data from being shown under another's name.

…d before (closes #491)

Secret metadata, releases and environment details were set by whichever answer came last, so after opening application B, a slow answer for A could show A's releases or environment under B, or clear B's on a late failure. Each answer now checks the load it belongs to, the release list keeps only its latest request, and the data of the previous application or environment is cleared at once.

Signed-off-by: samuel mbabhazi <[email protected]>
@samuelmbabhazi samuelmbabhazi added bug Something isn't working track:web labels Nov 26, 2026
@coderabbitai

coderabbitai Bot commented Nov 26, 2026 •

Copy link
Copy Markdown

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 59 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

Run configuration

Commits

Reviewing files that changed from the base of the PR and between d1a08b3 and 1cb0731.

Files selected for processing: 2

  • apps/web/src/app/delivery/application-page.spec.ts
  • apps/web/src/app/delivery/application-page.ts
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

@samuelmbabhazi
samuelmbabhazi merged commit b425efe into main Nov 26, 2026
27 checks passed
@samuelmbabhazi
samuelmbabhazi deleted the fix/491-stale-application-responses branch November 26, 2026 11:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working track:web

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Discard stale application-page child responses after navigation

1 participant