Skip to content

refactor!: Standardise CronjobController action names and types#3911

Merged
Mrtenz merged 3 commits intocontroller-refactorsfrom
mrtenz/cronjob-controller-refactor
Mar 23, 2026
Merged

refactor!: Standardise CronjobController action names and types#3911
Mrtenz merged 3 commits intocontroller-refactorsfrom
mrtenz/cronjob-controller-refactor

Conversation

@Mrtenz
Copy link
Member

@Mrtenz Mrtenz commented Mar 23, 2026

This renames all CronjobController action and event names and types to follow the Controller...Action pattern used in most other controllers.


Note

Medium Risk
Primarily a type-level refactor but marked breaking because exported action type names and cronjob exports change; downstream TypeScript code and messenger typings may need updates.

Overview
Standardizes CronjobController messenger action typing. The PR moves cronjob method action definitions into a new auto-generated CronjobController-method-action-types.ts, renaming the exported action types to the CronjobController…Action convention.

CronjobController now wires its messenger via registerMethodActionHandlers with an explicit MESSENGER_EXPOSED_METHODS list, and narrows messenger generics by separating controller actions/events from externally allowed ones. Public exports from cronjob/index.ts are adjusted accordingly, and the changelog is updated to document the new breaking action type names (including CronjobControllerScheduleAction, CronjobControllerCancelAction, CronjobControllerGetAction).

Written by Cursor Bugbot for commit e5867a2. This will update automatically on new commits. Configure here.

export const MESSENGER_EXPOSED_METHODS = [
// This is used by the `generate-method-action-types` script.
// eslint-disable-next-line @typescript-eslint/no-unused-vars
const MESSENGER_EXPOSED_METHODS = [
Copy link
Member Author

Choose a reason for hiding this comment

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

This didn't need to be exported.

@codecov
Copy link

codecov bot commented Mar 23, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
⚠️ Please upload report for BASE (controller-refactors@b6174c1). Learn more about missing BASE report.

Additional details and impacted files
@@                   Coverage Diff                   @@
##             controller-refactors    #3911   +/-   ##
=======================================================
  Coverage                        ?   98.55%           
=======================================================
  Files                           ?      425           
  Lines                           ?    12350           
  Branches                        ?     1935           
=======================================================
  Hits                            ?    12172           
  Misses                          ?      178           
  Partials                        ?        0           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@Mrtenz Mrtenz marked this pull request as ready for review March 23, 2026 13:41
@Mrtenz Mrtenz requested a review from a team as a code owner March 23, 2026 13:41
@Mrtenz Mrtenz merged commit 4e04a91 into controller-refactors Mar 23, 2026
127 checks passed
@Mrtenz Mrtenz deleted the mrtenz/cronjob-controller-refactor branch March 23, 2026 13:48
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