Skip to content

EDM-4888: Enable the restart action on success - #762

Open
celdrake wants to merge 1 commit into
flightctl:mainfrom
celdrake:EDM-4888-enable-restart-action-after-success
Open

EDM-4888: Enable the restart action on success#762
celdrake wants to merge 1 commit into
flightctl:mainfrom
celdrake:EDM-4888-enable-restart-action-after-success

Conversation

@celdrake

@celdrake celdrake commented Aug 6, 2026

Copy link
Copy Markdown
Collaborator

When the user attempts to "Restart" an already started application, the Backend just signals the intent with a new annotation called restartGeneration, and there is no observable field in status (or the annotation itself) that can be used to understand when the action is in progress or finished.

Given this, we clear the action after an arbitrary timeout to signal that the action has been received and was triggered.

Summary

  • Shared UI components: Updated libs/ui-components/ lifecycle handling.
  • Restart actions now clear after the RESTART_PENDING_TIMEOUT_MS timeout when the backend provides no completion status.
  • Start actions now clear on Completed.
  • The lifecycle error alert title now reads “The requested action failed”.
  • The change affects shared UI behavior used by platform applications.
  • No changes affect libs/types/, libs/i18n/, libs/cypress/, app-specific code, the Go auth proxy, container builds, E2E tests, or CI configuration.

@coderabbitai

coderabbitai Bot commented Aug 6, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Enterprise

Run ID: da294f96-61e9-4c41-aa8a-a374edc9bcf0

📥 Commits

Reviewing files that changed from the base of the PR and between e17bc30 and bce14e8.

⛔ Files ignored due to path filters (1)
  • libs/i18n/locales/en/translation.json is excluded by !libs/i18n/locales/en/translation.json
📒 Files selected for processing (3)
  • libs/ui-components/src/components/DetailsPage/Tables/ApplicationLifecycleActions.tsx
  • libs/ui-components/src/hooks/useApplicationLifecycle.ts
  • libs/ui-components/src/utils/applicationLifecycle.ts

Walkthrough

The lifecycle utilities now define restart timeout handling and recognize completed start actions. The lifecycle hook clears pending restart state after 500 ms. The lifecycle error alert title now states that the requested action failed.

Changes

Application lifecycle action handling

Layer / File(s) Summary
Restart pending-action timeout
libs/ui-components/src/utils/applicationLifecycle.ts, libs/ui-components/src/hooks/useApplicationLifecycle.ts
The utilities define a 500 ms restart timeout. The hook clears pending restart state and the recorded restart count after the timeout. Start actions now clear on Completed.
Lifecycle failure alert wording
libs/ui-components/src/components/DetailsPage/Tables/ApplicationLifecycleActions.tsx
The error alert title changed from “An error occurred” to “The requested action failed.”

Estimated code review effort: 2 (Simple) | ~10 minutes

Possibly related PRs

Suggested labels: ui-components, i18n

🚥 Pre-merge checks | ✅ 15
✅ Passed checks (15 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly summarizes the main change: re-enabling the restart action after a successful restart request.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
No-Hardcoded-Secrets ✅ Passed The PR diff adds no API keys, tokens, passwords, credentials, private keys, credential-bearing URLs, or long base64 literals.
No-Weak-Crypto ✅ Passed The HEAD patch adds only lifecycle timeout/UI text logic; no MD5, SHA1, DES, RC4, Blowfish, ECB, custom crypto, or secret comparisons are introduced.
No-Injection-Vectors ✅ Passed The PR adds no eval/exec, dangerouslySetInnerHTML, os.system, exec.Command, or yaml.load usage; JSON.parse only validates lifecycle annotations.
Container-Privileges ✅ Passed The patch changes only UI TypeScript and locale files; it adds no container/Kubernetes manifest or privilege setting, and existing Containerfiles are unchanged.
No-Sensitive-Data-In-Logs ✅ Passed The patch adds no console, logger, telemetry, or audit calls, and adds no sensitive-data fields or values; it only changes UI text and restart timeout handling.
Resource-Leaks ✅ Passed The pull request changes only TypeScript and JSON files; it changes no Go files and no paths under proxy/, so this resource-leak check is not applicable.
Unchecked-Errors ✅ Passed The PR changes only UI and i18n files; it adds no Go changes under proxy/, so this unchecked-error check is not applicable to the pull request.
Ai-Attribution ✅ Passed The PR commit includes the accepted Made-with: Cursor trailer, and no Co-Authored-By trailer appears in the PR commit.
Generated-Files-Not-Hand-Edited ✅ Passed The only generated-file change is the i18n catalog entry required by the new source key; no OpenAPI model files changed, and the entry matches parser defaults exactly.
I18n-Compliance ✅ Passed The only added TSX line uses t('The requested action failed'); all t() keys in the component are hardcoded string literals, with no new raw JSX user-visible text.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Comment @coderabbitai help to get the list of available commands.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant