Split event-handlers.ts into topical modules and delete the file #1096
Labels
No labels
area:agents
area:dashboard
area:database
area:design
area:design-review
area:flows
area:infra
area:meta
area:security
area:sessions
area:webhook
area:workdir
security
type:bug
type:chore
type:meta
type:user-story
No milestone
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
charles/claude-hooks#1096
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
As an operator, I want
apps/server/src/domain/workflow/event-handlers.tsdeleted, so that the workflow domain stops carrying a 1000+-line god-module that mixes review detection, dispatch, trust checks, and webhook routing.Context
After issues #1092, #1093, #1094, #1095 land, the remaining exports in
event-handlers.tsare pure helpers used by janitor + background tasks + ops:fetchPrDispatchLabelstail-pr-rebase-watchdog.tsworkflow/review-detection.tslatestVerdictworkflow/review-detection.tsdetectOutstandingChangeRequestviews/board.ts+detect_change_requestopworkflow/review-detection.tsisTrustedUseris_trusted_userop + janitorworkflow/trust.tsdispatchIssueForAgentmain.ts,views/board.ts,dispatchopworkflow/dispatch.tsdispatchPrRebasejanitor.ts,handlePostMergeRebaseworkflow/dispatch.tshandlePostMergeRebasejanitor.tsworkflow/dispatch.tsresetTriggerBus,resetPostMergeRebaseDedupare test-only exports — delete them too.Acceptance criteria
File moves
apps/server/src/domain/workflow/review-detection.ts—fetchPrDispatchLabels,latestVerdict,detectOutstandingChangeRequestapps/server/src/domain/workflow/dispatch.ts—dispatchIssueForAgent,dispatchPrRebase,handlePostMergeRebase(+ their dedup maps)apps/server/src/domain/workflow/trust.ts—isTrustedUserTest moves
event-handlers.test.tsintoreview-detection.test.ts,dispatch.test.ts,trust.test.ts)Deletion
apps/server/src/domain/workflow/event-handlers.tsapps/server/src/domain/workflow/event-handlers.test.tsresetTriggerBus,resetPostMergeRebaseDeduptest-only exportsVerification
bun run qaclean (typecheck + biome + tests)just qacleanevent-handlersinapps/server/src/outside of the moved-from pathsOut of scope
Dependencies
References
🤖 Auto-assigned to code-lead (heuristic: default → code-lead (no specific label match; safer than code)). Reply
/unassignto reroute.