Skip to content

Add Discord Rich Presence#106

Merged
SunkenInTime merged 1 commit into
mainfrom
agent/discord-rich-presence
Jul 23, 2026
Merged

Add Discord Rich Presence#106
SunkenInTime merged 1 commit into
mainfrom
agent/discord-rich-presence

Conversation

@SunkenInTime

Copy link
Copy Markdown
Owner

Summary

  • add Windows Discord Rich Presence for the strategy library and open strategies
  • publish privacy-safe map, side, and live board counts without strategy names
  • use Discord-hosted map thumbnails with the Icarus logo as the app badge
  • add a persisted Privacy setting to disable presence
  • debounce board updates to stay within Discord rate limits

Why

Icarus previously had no Discord activity integration. This adds an optional local RPC connection using the public Discord application ID; no client secret or user authentication is embedded in the app.

User impact

Discord can now show whether the user is browsing the library or planning on a particular Valorant map and side. Open strategies also report agent and ability counts, while strategy names remain private.

Validation

  • dart run build_runner build --delete-conflicting-outputs
  • dart analyze lib/services/discord_presence_service.dart lib/main.dart lib/providers/user_preferences_provider.dart lib/widgets/settings_tab.dart test/discord_presence_service_test.dart
  • flutter test test/discord_presence_service_test.dart
  • flutter test (328 tests passed)
  • manually verified the live Discord card on Windows for the library and Split attack strategy states

@SunkenInTime

Copy link
Copy Markdown
Owner Author

@greptileai please review the current head c50258c.

@greptile-apps

greptile-apps Bot commented Jul 23, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

Adds optional Windows Discord Rich Presence.

  • Publishes privacy-safe library or strategy activity with map, side, and board counts.
  • Persists a user preference for disabling presence.
  • Serializes Discord RPC operations and debounces board-state updates.
  • Adds the Discord dependency and presence-data tests.

Confidence Score: 5/5

The pull request appears safe to merge.

No blocking failures remain.

Important Files Changed

Filename Overview
lib/main.dart Wires app-state listeners to a debounced Discord presence synchronization lifecycle.
lib/services/discord_presence_service.dart Introduces privacy-safe activity construction and serialized Windows Discord RPC management.
lib/providers/user_preferences_provider.dart Adds the persisted Discord Rich Presence preference and notifier setter.
lib/widgets/settings_tab.dart Adds the user-facing toggle for Discord Rich Presence.
lib/hive/hive_adapters.g.dart Regenerates the Hive adapter to persist the new preference with a legacy default.
test/discord_presence_service_test.dart Verifies library activity, map and side privacy, image metadata, and board-count formatting.

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart LR
  P[Riverpod strategy, map, agent, and ability state] --> D[Two-second debounce]
  U[Discord presence preference] --> S{Enabled?}
  D --> S
  S -->|Yes| C[Build privacy-safe activity]
  C --> Q[Serialized RPC queue]
  Q --> R[Discord local RPC]
  S -->|No| X[Clear activity and disconnect]
Loading

Reviews (2): Last reviewed commit: "Add Discord Rich Presence" | Re-trigger Greptile

@SunkenInTime
SunkenInTime marked this pull request as ready for review July 23, 2026 21:56
@SunkenInTime
SunkenInTime merged commit a07a366 into main Jul 23, 2026
2 checks passed
@SunkenInTime
SunkenInTime deleted the agent/discord-rich-presence branch July 23, 2026 21:56
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