Skip to content

Conversation

@vcarl
Copy link
Member

@vcarl vcarl commented Jan 28, 2026

No description provided.

vcarl and others added 4 commits January 28, 2026 18:16
- Create app/effects/discordSdk.ts with Effect-wrapped Discord.js helpers:
  fetchGuild, fetchChannel, fetchMember, fetchMessage, sendMessage, etc.
- Add fetchSettingsEffect to guilds.server.ts for Effect-based settings fetch
- Update escalate, report, and resolver code to use new SDK helpers
- Consolidate error types in effects/errors.ts (rename discordError -> cause)
- Fix missing Layer imports and service layer provision in handlers

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Phase 1: demo.ts, force-ban.ts, report.ts
- Phase 2: setup.ts, setupReactjiChannel.ts, setupHoneypot.ts, setupTickets.ts
- Phase 3: escalationControls.ts, escalate/handlers.ts (8 handlers)

Replaced async/await with Effect.gen, trackPerformance with Effect.withSpan,
log() with logEffect(), and try/catch with Effect.catchAll patterns.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
vcarl and others added 3 commits January 29, 2026 11:55
EFFECT.md rewritten as a "reading and writing Effect code" guide with
real codebase examples and file references. EFFECT_REFERENCE.md trimmed
to only patterns we use, with outdated syntax fixed. Unused patterns
(Streams, Schedules, etc.) moved to new EFFECT_ADVANCED.md.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@vcarl vcarl requested a review from Copilot January 29, 2026 19:41
@vcarl vcarl marked this pull request as ready for review January 29, 2026 19:41
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

This PR represents a massive conversion effort to adopt Effect-TS patterns throughout the codebase, including comprehensive documentation updates, new SDK wrappers, and conversion of all command handlers to Effect-based implementations.

Changes:

  • Created comprehensive Effect documentation suite (EFFECT.md, EFFECT_REFERENCE.md, EFFECT_ADVANCED.md) with practical patterns and examples
  • Implemented Discord SDK Effect wrappers (discordSdk.ts) for consistent error handling across Discord.js operations
  • Converted all command handlers (setup, report, force-ban, track, escalation system, tickets, etc.) from async/await to Effect-based implementations
  • Standardized error types by renaming fields (discordError/stripeErrorcause) and consolidating error classes
  • Refactored database operations to use Effect patterns with new fetchSettingsEffect and other Effect-returning functions

Reviewed changes

Copilot reviewed 36 out of 36 changed files in this pull request and generated 19 comments.

Show a summary per file
File Description
notes/EFFECT*.md Complete documentation overhaul - reference guide, onboarding, and advanced patterns
app/effects/discordSdk.ts New file with Effect wrappers for all Discord API operations
app/effects/errors.ts Consolidated error types, renamed fields for consistency
app/commands/escalate/handlers.ts Converted 8 handlers to pure Effect with improved error handling
app/commands/*.ts Converted all slash commands and context menus to Effect-based handlers
app/models/*.ts Added Effect-returning database operations alongside legacy versions
app/commands/report/*.ts Refactored logging and reporting system to use Effect patterns

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@github-actions
Copy link

github-actions bot commented Jan 29, 2026

Preview deployed

It may take a few minutes before the service becomes available.

Environment URL
Preview https://265.euno-staging.reactiflux.com

Deployed commit: 87e9c1d

This preview will be updated on each push and deleted when the PR is closed.

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