Skip to content

Discord: default to EDNexus's real application id and replace the saved placeholder - #210

Merged
demortes merged 2 commits into
mainfrom
fix/discord-default-app-id
Oct 9, 2026
Merged

demortes merged 2 commits into
mainfrom
fix/discord-default-app-id

Conversation

@demortes

@demortes demortes commented Oct 9, 2026

Copy link
Copy Markdown
Contributor

Discord Rich Presence never worked in released builds: the default Discord application id was the all-zeros placeholder, which Discord rejects, and the connection error was swallowed silently.

Change

  • DiscordPresenceService.DefaultApplicationId is now EDNexus's real Discord application, 1557985945393827911.
  • Migration: earlier builds saved the placeholder into every commander's settings.json, so changing the default alone would not have fixed existing installs. ResolveApplicationId treats a blank value or the old 0000000000000000000 as "not set" and uses the default; a real override typed by the commander is still honoured. EngineHost uses it when it creates the RPC client.
  • Tests: the default, the placeholder/blank/whitespace cases and a real override.

Notes

  • Presence works without art, but images only render once assets named ednexus_logo, docked, cruising (and the ship keys the mapper produces) are uploaded to that Discord application.
  • Not included, as follow-ups: log Discord connection failures instead of discarding them; show "presence not configured/connected" in Settings; an Application ID field. Discord.Enabled still defaults to on (an unmerged branch makes it opt-in); now that presence will actually broadcast, worth deciding.

Verified

dotnet build 0 warnings; full dotnet test green (+8 tests). Not verified against a live Discord client (the app was not run here); to check after merge: with Discord desktop open and "Share your detected activities" on, start EDNexus and the game and look for the "Playing EDNexus" status.

🤖 Generated with Claude Code

…ed placeholder

Earlier builds shipped an all-zeros placeholder that Discord rejects, so Rich Presence never worked, and saved
it into every settings.json. The default is now 1557985945393827911, and a blank or placeholder id is treated as
unset (a real override is still honoured).

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Oct 9, 2026 •

Copy link
Copy Markdown
Contributor

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 25 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

⚙️ Run configuration
  • Configuration used: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: dc7f3f7e-bfc2-44e3-bc94-05353d60a0e5
📥 Commits

Reviewing files that changed from the base of the PR and between 8d05f19 and 4ab6e82.

⛔ Files ignored due to path filters (3)
  • assets/discord/cruising.png is excluded by !**/*.png
  • assets/discord/docked.png is excluded by !**/*.png
  • assets/discord/ednexus_logo.png is excluded by !**/*.png
📒 Files selected for processing (6)
  • assets/discord/README.md
  • src/EDNexus.Core/Discord/DiscordPresenceMapper.cs
  • src/EDNexus.Core/Discord/DiscordPresenceService.cs
  • src/EDNexus.Core/EngineHost.cs
  • tests/EDNexus.Tests/Discord/DiscordApplicationIdTests.cs
  • tests/EDNexus.Tests/Discord/DiscordPresenceMapperTests.cs
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

…ge image

The art assets the presence refers to were never created. The large image was also a per-ship key that only
renders if an asset with exactly that key was uploaded, and the journal's ship names are not stable enough to
pre-generate. The large image is now always ednexus_logo (the ship is named in the hover text), and the logo,
docked and cruising images are generated at 1024x1024 in assets/discord with upload instructions.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@demortes

demortes commented Oct 9, 2026

Copy link
Copy Markdown
Contributor Author

Update: the art assets the presence refers to were never created, so I added them and fixed the underlying problem.

  • New: assets/discord/ has ednexus_logo.png, docked.png and cruising.png (1024x1024, drawn from the app icon's vector source) plus a README with the upload steps (Developer Portal -> Rich Presence -> Art Assets; the file name is the key).
  • Behaviour change: the large image was a per-ship key (federal_corvette, ...) that only renders if an asset with exactly that key was uploaded, and the journal's localised ship names are not stable enough to pre-generate, so a commander in a ship would have seen a broken large image. It is now always ednexus_logo; the ship is named in the hover text and the details line. The dead ship-key code is removed and the test updated to pin the new behaviour.

Full test suite green; not run against a live Discord client.

🤖 Generated with Claude Code

@demortes
demortes merged commit 35cc5e7 into main Oct 9, 2026
2 checks passed
@demortes
demortes deleted the fix/discord-default-app-id branch October 9, 2026 05:31
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.

1 participant