Feature/discord activity#70
Merged
Merged
Conversation
Introduces a Discord Activity where users log in, link their OpenShock account, manage shockers/whitelist, and join a shared room to shock each other in real time under a consent model. - Extract OpenShock.DiscordBot.Shared (EF context, entities, migrations, ApiUtils, generalized OpenShockBackendService); bot behavior unchanged. - Add room-consent columns to User (AddRoomConsent migration). - New OpenShock.Activity.Api: Discord OAuth->JWT exchange, REST endpoints (me/link/shockers/whitelist/consent/control) reusing the bot's logic, and a SignalR room hub keyed by the Discord instanceId. Discord IDs are serialized as strings to survive JS number precision. - SvelteKit 5 SPA (activity/): Discord SDK + SignalR, room and settings routes, dark high-voltage theme. - Deployment artifacts: cloudflared k8s manifest, API Dockerfile, and docs/discord-activity.md (two-host URL mappings, Cloudflare, local dev). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
- Directory.Build.props: shared TargetFramework, ImplicitUsings, Nullable, Company, Product, NeutralLanguage, and the shared UserSecretsId. - Directory.Packages.props: central package versions (ManagePackageVersions Centrally); csproj PackageReferences no longer carry Version attributes. - Slim all four csproj files down to project-specific settings. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Discord's Activity URL override only replaces the root target and the iframe CSP blocks direct localhost calls, so serve everything from one local origin: Vite proxies /api (and the SignalR WebSocket) to the local API, stripping the /api prefix to match the API's root routes. - vite.config.ts: server/preview proxy + allowedHosts for tunnel hosts. - VITE_API_PROXY_TARGET env (default http://localhost:5199). - Document the tunnel + URL-override flow in docs/discord-activity.md. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Enabling Activities adds Discord's managed "Entry Point" command. The default bulk overwrite (deleteMissing: true) tries to remove it and fails with error 50240 in the Ready handler. Register with deleteMissing: false. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This reverts commit 9c20290.
Deploying discordbot with
|
| Latest commit: |
272a96e
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://4a8c4fb8.discordbot-4hu.pages.dev |
|
Ready to review this PR? Stage has broken it down into 14 individual chapters for you: Chapters generated by Stage for commit 272a96e on Jul 10, 2026 4:43pm UTC. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 1193dce8d0
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
…from user input' Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
…ntain permissions' Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.