Curtailment: edit modal component#295
Conversation
🔐 Codex Security Review
Review SummaryOverall Risk: NONE FindingsNo high-impact security, correctness, or reliability findings in the scoped diff. NotesThe reviewed changes are limited to ProtoFleet energy UI components, stories, and tests: active curtailment action affordances, the curtailment history stop-confirmation flow, edit-mode modal copy/actions, and a new confirmation dialog. I did not see changes affecting authentication, backend authorization, SQL/database access, gRPC/protobuf contracts, plugin execution, network discovery, Docker/Nginx infrastructure, Rust/Python plugins, or mining pool/wallet configuration. No cryptostealing or pool-hijack indicators were present in the diff. Generated by Codex Security Review | |
There was a problem hiding this comment.
Pull request overview
Adds “manage/edit” support for active curtailments across the ProtoFleet energy UI by introducing an edit-mode variant of the curtailment modal, wiring new Manage entry points from the active status banner and history detail modal, and routing stop actions through a dedicated confirmation dialog.
Changes:
- Introduces a reusable stop/restore confirmation dialog and uses it for stop flows in history and status stories/tests.
- Extends the curtailment start modal with an
editmode (title/copy changes, Save CTA, optional Stop curtailment action). - Updates Curtailment History and Active Curtailment Status to expose “Manage” actions and expand coverage via tests/stories.
Reviewed changes
Copilot reviewed 10 out of 10 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| client/src/protoFleet/features/energy/CurtailmentStopConfirmationDialog.tsx | New confirmation dialog used for stop/restore flows. |
| client/src/protoFleet/features/energy/CurtailmentStartModal.tsx | Adds create vs edit mode and optional stop-curtailment action button. |
| client/src/protoFleet/features/energy/CurtailmentStartModal.test.tsx | Updates modal mock + adds edit/stop action tests. |
| client/src/protoFleet/features/energy/CurtailmentStartModal.stories.tsx | Adds edit-mode story and wires stop confirmation dialog in Storybook. |
| client/src/protoFleet/features/energy/CurtailmentHistory.tsx | Adds Manage action for active events; routes stop via confirmation dialog; updates pending-stop handling. |
| client/src/protoFleet/features/energy/CurtailmentHistory.test.tsx | Expands tests to cover stop confirmation dialog behavior + manage action. |
| client/src/protoFleet/features/energy/CurtailmentHistory.stories.tsx | Updates story to provide manage/stop handlers. |
| client/src/protoFleet/features/energy/ActiveCurtailmentStatus.tsx | Adds Manage button support for active/ongoing display states. |
| client/src/protoFleet/features/energy/ActiveCurtailmentStatus.test.tsx | Adds coverage for Manage button visibility/callback behavior. |
| client/src/protoFleet/features/energy/ActiveCurtailmentStatus.stories.tsx | Updates stories to include Manage and show stop/restore confirmation dialog. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: a1ae31b495
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: f78c2a0c6b
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
🤖 Created by my AI agent.
Summary
Test plan
Screen.Recording.2026-05-21.at.3.01.14.PM.mov
Closes #293