Skip to content

Conversation

catrielmuller
Copy link
Contributor

Context

  • Cleanup

Implementation

  • Removed unused atoms that was migrated to useApprovalEffect and approvalDecision Service.

@catrielmuller catrielmuller requested review from RSO and Copilot October 17, 2025 20:31
@changeset-bot
Copy link

changeset-bot bot commented Oct 17, 2025

⚠️ No Changeset found

Latest commit: 0e3f461

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

Copy link
Contributor

@Copilot 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

Cleanup of legacy auto-approval state: removes deprecated atoms and associated tests after migration to useApprovalEffect and approvalDecision service.

  • Deletes shouldAutoApproveAtom and shouldAutoRejectAtom plus related helper/imports.
  • Removes extensive test suites validating the old auto-approval atom logic.
  • Drops an in-file explanatory comment in useApprovalHandler that documented responsibility shift.

Reviewed Changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.

File Description
cli/src/state/hooks/useApprovalHandler.ts Removes explanatory comment about relocated auto-approval logic.
cli/src/state/atoms/approval.ts Eliminates legacy auto-approval atoms and helper function no longer used after migration.
cli/src/state/atoms/tests/ci-approval.test.ts Removes tests tied to deleted shouldAutoApprove/shouldAutoReject atoms.
cli/src/state/atoms/tests/approval-logic.test.ts Removes comprehensive tests for legacy auto-approval decision logic.

setRejectCallback(() => reject)
setExecuteSelectedCallback(() => executeSelected)
}, [approve, reject, executeSelected, setApproveCallback, setRejectCallback, setExecuteSelectedCallback])

Copy link

Copilot AI Oct 17, 2025

Choose a reason for hiding this comment

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

[nitpick] The previously present explanatory comment clarifying that auto-approval logic moved to useApprovalEffect and approvalDecision service was removed. Recommend reinstating a concise comment (e.g., above line 239) documenting that this hook now only wires manual user-triggered approve/reject/execute callbacks, to preserve architectural clarity for future maintainers.

Suggested change
// This hook now only wires manual user-triggered approve/reject/execute callbacks.
// Auto-approval logic has moved to useApprovalEffect, and the approvalDecision service was removed.

Copilot uses AI. Check for mistakes.

@catrielmuller catrielmuller merged commit 3c26284 into main Oct 20, 2025
15 checks passed
@catrielmuller catrielmuller deleted the catrielmuller/cli-cleanup-approval branch October 20, 2025 13:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants