Skip to content

Conversation

@vcarl
Copy link
Member

@vcarl vcarl commented Dec 10, 2025

No description provided.

@vcarl vcarl marked this pull request as ready for review December 10, 2025 22:18
@github-actions
Copy link

@vcarl vcarl marked this pull request as draft December 16, 2025 06:57
vcarl and others added 10 commits January 18, 2026 21:04
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>
@github-actions
Copy link

github-actions bot commented Jan 19, 2026

Preview environment removed

The preview for this PR has been cleaned up.

Copy link
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

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.

@vcarl
Copy link
Member Author

vcarl commented Jan 19, 2026

Okay I can't find anything else broken 🤔 There's a lot left to improve but if it's all working

@vcarl vcarl merged commit 57b9bd7 into main Jan 19, 2026
5 checks passed
@vcarl vcarl deleted the vc-effect branch January 19, 2026 20:32
@vcarl vcarl mentioned this pull request Jan 23, 2026
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