-
Notifications
You must be signed in to change notification settings - Fork 6
Migrate Escalate and Track features to Effect-TS #215
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
✅ E2E Tests Passed3 passed
|
Add runner helpers to escalation/index.ts: - runEscalationEffect: runs Effect with EscalationService provided - runDirectEffect: runs Effect without service requirements - getFailure: extracts error from Cause for type-safe matching Update handlers.ts to use getFailure() pattern instead of directly accessing exit.cause._tag, which is a Cause discriminator not an error discriminator. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Create Effect-based resolver at app/effects/resolver/escalationResolver.ts: - processEscalationEffect: processes single due escalation - checkPendingEscalationsEffect: gets all due and processes sequentially Update app/discord/escalationResolver.ts to delegate to Effect resolver: - Keep executeResolution for use by EscalationService - Scheduler remains Promise-based but delegates to Effect Remove dead code: - Delete simpleVote.ts and majorityVote.ts (replaced by Effect handlers) - Delete old escalationVotes.server.ts model (replaced by EscalationService) - Remove unused vote handler from voting.ts (keep pure functions only) Consolidate types and imports: - Export Escalation/EscalationRecord types from EscalationService - Move calculateScheduledFor to helpers/escalationVotes.ts - Update all imports to use new locations 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Relocate model files from app/effects/models/ to app/models/ where they belong with other data models. Updates all imports accordingly. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Also ensure that all escalate command local files import each other by relative path Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Relocate the Effect-TS Database service from app/effects/services/ to app/ as a top-level module, reflecting its role as core infrastructure. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Convert getOrCreateUserThread, reportAutomod, reportModAction, reportUser, and constructLog to Effect - Add proper spans for tracing and structured logging via logEffect - Remove legacy database function imports in favor of Effect versions - Export Legacy wrappers for callers that haven't migrated yet - Remove unused retry helper import Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Update to use Effect version with proper runtime and DB layer. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Convert to standard Discord.js patterns with ActionRowBuilder and ButtonBuilder. Add getReportById to support the delete button handler. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Preview environment removedThe preview for this PR has been cleaned up. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
Copilot reviewed 63 out of 65 changed files in this pull request and generated no new comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
Okay I can't find anything else broken 🤔 There's a lot left to improve but if it's all working… |
No description provided.