EDM-5034: Show restart app loop warnings - #764
Conversation
WalkthroughThe application table now detects repeated application restarts, displays warnings, and can stop eligible applications. Lifecycle controls are injected into ChangesApplication restart lifecycle
Estimated code review effort: 3 (Moderate) | ~20 minutes Sequence Diagram(s)sequenceDiagram
participant ApplicationsTable
participant useRestartSpikes
participant ApplicationTableRow
participant ApplicationLifecycleActions
ApplicationsTable->>useRestartSpikes: application restart counters
useRestartSpikes-->>ApplicationsTable: restart deltas
ApplicationsTable->>ApplicationTableRow: restart delta and lifecycle controls
ApplicationTableRow->>ApplicationLifecycleActions: render lifecycle actions
ApplicationLifecycleActions->>ApplicationsTable: invoke supplied lifecycle callback
Possibly related PRs
Suggested labels: 🚥 Pre-merge checks | ✅ 15✅ Passed checks (15 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@libs/ui-components/src/components/DetailsPage/Tables/ApplicationsTable.tsx`:
- Around line 125-151: Replace the non-interactive Label trigger in the
restart-loop Popover with a PatternFly Button, using t('Restart loop detected')
as its accessible name while preserving the warning styling and displayed
restarts value. Keep the existing Popover content and behavior unchanged.
🪄 Autofix
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: ASSERTIVE
Plan: Enterprise
Run ID: 89b27c21-f9bb-43d0-a963-ed7803fb132a
⛔ Files ignored due to path filters (1)
libs/i18n/locales/en/translation.jsonis excluded by!libs/i18n/locales/en/translation.json
📒 Files selected for processing (3)
libs/ui-components/src/components/DetailsPage/Tables/ApplicationLifecycleActions.tsxlibs/ui-components/src/components/DetailsPage/Tables/ApplicationsTable.tsxlibs/ui-components/src/hooks/useRestartSpikes.ts
3550ffa to
00a0ed2
Compare
Made-with: Cursor
00a0ed2 to
6ef0104
Compare
There was a problem hiding this comment.
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
libs/ui-components/src/components/DetailsPage/Tables/ApplicationLifecycleActions.tsx (1)
112-112: 🎯 Functional Correctness | 🟡 Minor | ⚡ Quick winUse one status-aware stop predicate for all stop controls.
useRestartSpikesdoes not filter by status. ForStartingorPreparing, the restart warnings expose Stop while the lifecycle dropdown hides it because those statuses are not instoppableStatuses. Reuse the status-aware predicate for both controls.🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@libs/ui-components/src/components/DetailsPage/Tables/ApplicationLifecycleActions.tsx` at line 112, Update the stop-control logic in ApplicationLifecycleActions so both the lifecycle dropdown and useRestartSpikes restart warnings use the same canStop status-aware predicate. Ensure Starting and Preparing consistently follow that predicate instead of allowing the restart warnings to expose Stop independently.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Outside diff comments:
In
`@libs/ui-components/src/components/DetailsPage/Tables/ApplicationLifecycleActions.tsx`:
- Line 112: Update the stop-control logic in ApplicationLifecycleActions so both
the lifecycle dropdown and useRestartSpikes restart warnings use the same
canStop status-aware predicate. Ensure Starting and Preparing consistently
follow that predicate instead of allowing the restart warnings to expose Stop
independently.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: ASSERTIVE
Plan: Enterprise
Run ID: f25c4231-4b2b-48be-9fd5-545d6d847445
📒 Files selected for processing (1)
libs/ui-components/src/components/DetailsPage/Tables/ApplicationLifecycleActions.tsx
Made-with: Cursor (cherry picked from commit 51bac50)
* Bump fast-uri from 3.1.4 to 3.1.5 (#759) Bumps [fast-uri](https://github.com/fastify/fast-uri) from 3.1.4 to 3.1.5. - [Release notes](https://github.com/fastify/fast-uri/releases) - [Commits](fastify/fast-uri@v3.1.4...v3.1.5) Made-with: Cursor --- updated-dependencies: - dependency-name: fast-uri dependency-version: 3.1.5 dependency-type: indirect ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> (cherry picked from commit e17bc30) * EDM-4999: Redefine which statuses allow start/stop actions (#763) Made-with: Cursor (cherry picked from commit a5959d8) * EDM-4987: Do not send wrong frame that causes the session logout (#760) Made-with: Cursor (cherry picked from commit ae99129) * EDM-5034: Show restart app loop warnings (#764) Made-with: Cursor (cherry picked from commit 51bac50) * EDM-4888: Enable the restart action on success (#762) Made-with: Cursor (cherry picked from commit 0e19b12) * EDM-4726: Explain updated behaviour for VM apps (#766) Made-with: Cursor --------- Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Display a warning for applications that appear to be in a restart loop, to raise awareness for the user that the application may be misbehaving.
Threshold for the warning to appear is set to 20+ restarts.
Summary
libs/ui-components/with session-based restart-spike detection.ApplicationLifecycleActionsto receive lifecycle controls throughApplicationLifecycleControls.libs/types/,libs/i18n/,libs/cypress/, the Go auth proxy, container builds, or CI configuration.