Skip to content

Curtailment: edit modal component#295

Merged
negarn merged 4 commits into
mainfrom
negar/gh-293-curtailment-edit-modal-component
May 22, 2026
Merged

Curtailment: edit modal component#295
negarn merged 4 commits into
mainfrom
negar/gh-293-curtailment-edit-modal-component

Conversation

@negarn
Copy link
Copy Markdown
Contributor

@negarn negarn commented May 21, 2026

🤖 Created by my AI agent.

Summary

  • Add manage/edit actions for active curtailments from the status banner and history detail modal
  • Update the curtailment modal for edit mode, including a stop-curtailment action and confirmation dialog
  • Expand stories and tests around active curtailment manage and stop flows

Test plan

  • Open an active curtailment from the energy status banner and confirm Manage opens the edit modal
  • Open active curtailment history details and confirm Manage and Stop curtailment behave correctly
  • Confirm the updated curtailment stories render the create, edit, and stop-confirmation states
Screen.Recording.2026-05-21.at.3.01.14.PM.mov

Closes #293

@github-actions github-actions Bot added javascript Pull requests that update javascript code client labels May 21, 2026
@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 21, 2026

🔐 Codex Security Review

Note: This is an automated security-focused code review generated by Codex.
It should be used as a supplementary check alongside human review.
False positives are possible - use your judgment.

Scope summary

  • Reviewed pull request diff only (7b3d4b8e2052f96302a28b1bca88ce4870336c8e...388c96ff0cb9b7be69fe8d9212c093e2472bf436, exact PR three-dot diff)
  • Model: gpt-5.5

💡 Click "edited" above to see previous reviews for this PR.


Review Summary

Overall Risk: NONE

Findings

No high-impact security, correctness, or reliability findings in the scoped diff.

Notes

The 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 |
Triggered by: @negarn |
Review workflow run

@negarn negarn marked this pull request as ready for review May 21, 2026 19:11
@negarn negarn requested a review from a team as a code owner May 21, 2026 19:11
Copilot AI review requested due to automatic review settings May 21, 2026 19:11
@negarn negarn marked this pull request as draft May 21, 2026 19:11
@negarn negarn marked this pull request as ready for review May 21, 2026 19:12
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 edit mode (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.

Comment thread client/src/protoFleet/features/energy/CurtailmentHistory.tsx
Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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".

Comment thread client/src/protoFleet/features/energy/CurtailmentHistory.tsx
Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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".

Comment thread client/src/protoFleet/features/energy/CurtailmentHistory.tsx Outdated
Copy link
Copy Markdown
Contributor

@flesher flesher left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@negarn negarn merged commit 1f01105 into main May 22, 2026
70 checks passed
@negarn negarn deleted the negar/gh-293-curtailment-edit-modal-component branch May 22, 2026 14:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

client javascript Pull requests that update javascript code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Curtailment: edit modal component

3 participants