[PR #1393] [MERGED] Fix Discord mirror webhook sends #5061

Closed
opened 2026-10-22 04:12:53 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/Pasta-Devs/Marinara-Engine/pull/1393
Author: @TheLonelyDevil9
Created: 5/27/2026
Status: ✅ Merged
Merged: 5/27/2026
Merged by: @TheLonelyDevil9

Base: refactor ← Head: fix/1359-discord-mirror-send


📝 Commits (1)

  • 9f38eed Fix Discord mirror webhook sends

📊 Changes

11 files changed (+383 additions, -1 deletions)

View changed files

📝 src-tauri/src/commands/storage/commands/integrations.rs (+5 -0)
📝 src-tauri/src/commands/storage/integrations.rs (+6 -0)
➕ src-tauri/src/commands/storage/integrations/discord.rs (+125 -0)
📝 src-tauri/src/http_dispatch.rs (+1 -0)
📝 src-tauri/src/lib.rs (+1 -0)
📝 src/engine/capabilities/integrations.ts (+10 -0)
📝 src/engine/generation/start-generation.test.ts (+70 -0)
📝 src/engine/generation/start-generation.ts (+135 -1)
📝 src/features/modes/game/api/game-api.ts (+21 -0)
📝 src/shared/api/integration-gateway.ts (+8 -0)
📝 src/shared/api/remote-runtime.ts (+1 -0)

📄 Description

What?

  • Add Discord webhook sending support for the refactor build.
  • Mirror Discord-enabled generation chats by sending saved user messages and assistant replies.
  • Mirror Discord-enabled game recaps and party turns.

Why?

Issue #1359 reported that Discord Mirror settings persisted the webhook URL but no refactor send path existed, so mirrors never posted messages.

Closes #1359

How?

  • Added an optional engine Discord gateway and wired it through the shared integration gateway.
  • Added a Tauri/remote discord_webhook_send command backed by a Rust webhook sender with URL validation, payload truncation, and Discord error handling.
  • Kept mirroring fire-and-forget so webhook failures warn instead of blocking generation or game flow.

Testing?

  • pnpm vitest run src/engine/generation/start-generation.test.ts
  • pnpm typecheck
  • pnpm check:architecture
  • cargo test --manifest-path src-tauri/Cargo.toml discord
  • pnpm build

Screenshots (optional)

Not applicable; this is webhook plumbing without UI changes.

Anything Else?

No real Discord webhook/manual Tauri post was run; coverage is automated unit/build verification.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/Pasta-Devs/Marinara-Engine/pull/1393 **Author:** [@TheLonelyDevil9](https://github.com/TheLonelyDevil9) **Created:** 5/27/2026 **Status:** ✅ Merged **Merged:** 5/27/2026 **Merged by:** [@TheLonelyDevil9](https://github.com/TheLonelyDevil9) **Base:** `refactor` ← **Head:** `fix/1359-discord-mirror-send` --- ### 📝 Commits (1) - [`9f38eed`](https://github.com/Pasta-Devs/Marinara-Engine/commit/9f38eedcdb4dea9e230c07247fed5d67facb1cd3) Fix Discord mirror webhook sends ### 📊 Changes **11 files changed** (+383 additions, -1 deletions) <details> <summary>View changed files</summary> 📝 `src-tauri/src/commands/storage/commands/integrations.rs` (+5 -0) 📝 `src-tauri/src/commands/storage/integrations.rs` (+6 -0) ➕ `src-tauri/src/commands/storage/integrations/discord.rs` (+125 -0) 📝 `src-tauri/src/http_dispatch.rs` (+1 -0) 📝 `src-tauri/src/lib.rs` (+1 -0) 📝 `src/engine/capabilities/integrations.ts` (+10 -0) 📝 `src/engine/generation/start-generation.test.ts` (+70 -0) 📝 `src/engine/generation/start-generation.ts` (+135 -1) 📝 `src/features/modes/game/api/game-api.ts` (+21 -0) 📝 `src/shared/api/integration-gateway.ts` (+8 -0) 📝 `src/shared/api/remote-runtime.ts` (+1 -0) </details> ### 📄 Description ## What? - Add Discord webhook sending support for the refactor build. - Mirror Discord-enabled generation chats by sending saved user messages and assistant replies. - Mirror Discord-enabled game recaps and party turns. ## Why? Issue #1359 reported that Discord Mirror settings persisted the webhook URL but no refactor send path existed, so mirrors never posted messages. Closes #1359 ## How? - Added an optional engine Discord gateway and wired it through the shared integration gateway. - Added a Tauri/remote `discord_webhook_send` command backed by a Rust webhook sender with URL validation, payload truncation, and Discord error handling. - Kept mirroring fire-and-forget so webhook failures warn instead of blocking generation or game flow. ## Testing? - `pnpm vitest run src/engine/generation/start-generation.test.ts` - `pnpm typecheck` - `pnpm check:architecture` - `cargo test --manifest-path src-tauri/Cargo.toml discord` - `pnpm build` ## Screenshots (optional) Not applicable; this is webhook plumbing without UI changes. ## Anything Else? No real Discord webhook/manual Tauri post was run; coverage is automated unit/build verification. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-10-22 04:12:53 +07:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Pasta-Devs/Marinara-Engine#5061
No description provided.