Repository navigation
fix(ui): stop treating the first row of the deployment list as the newest deployment - #616
Draft
PiquelChips wants to merge 2 commits into
Draft
PiquelChips wants to merge 2 commits into
PiquelChips wants to merge 2 commits into
Conversation
Contributor
|
Important Draft PR not reviewedDraft PRs are not automatically reviewed by default.
To automatically review draft PRs, update your CodeRabbit configuration: reviews:
auto_review:
drafts: true
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. |
1 task done
…west deployment The deployment list pages by ID, but since PQD-130 the store picks an environment's latest and current deployment by creation time: after a restart with the clock behind, an older deployment can have the higher ID and list first. The deployment page, the history poll, and the CLI's `stop` and `wait` now pick the newest listed deployment by creation time, then ID, through `DeploymentSummary::newest`. Fixes PQD-149
…ration The newest of the deployment list's first page still misses a newer deployment listed past it, since the list pages by ID. Use the latest operation the environment's detail reports instead, which the store picks by creation time, unless it is a deletion: `latest_deployment` in the CLI for `stop` and `wait`, and `DeploymentFacts::superseded_by` for the deployment page's Restore. The history poll follows the row it lists running, as at most one operation runs at a time. Part of PQD-149
PiquelChips
force-pushed
the
fix/newest-deployment-not-first-row
branch
from
November 22, 2026 22:12
04e6103 to
49387a0
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What and why
Fixes PQD-149
The deployment list is paged by ID. Since PQD-130 (#557), the store picks an environment's latest and current deployment by creation time, because after a restart with the clock behind, an older deployment can have the higher ID and list first. Some callers still took the first row as the newest deployment, so they could pick an older deployment. Taking the newest row of the first page wouldn't fix it either: the newest deployment can be past that page.
These callers now use the latest operation from the environment's detail, which the store picks by
created_at_ms DESC, id DESC, unless that operation is a deletion:stopwait andwait(env wait/app waitwithout--deployment): both use a newlatest_deployment(client, environment). Before, a failed deployment thatstopleft as is could fail the wait, andwaitcould follow an older deployment.DeploymentFacts::superseded_by). Before, it meant this deployment wasn't the first row.RunningDeploymentalready follows.Proof: in the CLI
env stopandenv waittests, the deployment list returns only an older, higher-ID deployment and the environment's detail names the newer one. I also added astopcase for a failed deployment left as is. Four tests fail onmainand pass here. A dashboard unit test coverssuperseded_by.Checklist
AGENTS.mdit applies to,documentation included, with its reverse states.
Note
Written by Claude Opus 5.5 in Claude Code (via T3 Code)