Skip to content

feat: add a composite live Discord inbox - #8

Merged
Peyton-Spencer merged 7 commits into
feat/discord-accessibility-repliesfrom
feat/discord-live-inbox
Aug 30, 2026
Merged

Peyton-Spencer merged 7 commits into
feat/discord-accessibility-repliesfrom
feat/discord-live-inbox

Conversation

@Peyton-Spencer

@Peyton-Spencer Peyton-Spencer commented Aug 29, 2026 •

Copy link
Copy Markdown

Summary

Presents Discord as one logical local account backed by two complementary sources:

  • the protocol sidecar is authoritative for live reads and writes
  • Discrawl remains available for historical archive import and media enrichment

This deliberately preserves the working archive path instead of betting the inbox on one transport.

Changes

  • add DiscordCompositeAdapter with protocol-first routing and archive fallback
  • show one Discord root in the inbox rather than duplicate protocol/archive accounts
  • add QR connection UX for the local protocol sidecar
  • use live messages when available and enrich/fall back to Discrawl history
  • send through the protocol transport first; offer Accessibility only as an explicit fallback when no protocol receipt exists
  • add root command-palette and sidebar search across Discord titles, participants, handles, servers, and channels
  • refresh the visible inbox automatically while pausing work when Ditto is hidden
  • keep archive imports completion-relative instead of running Discrawl's permanently hot watch loop

Current sync behavior

The integrated UI refreshes visible conversations/messages on bounded polling intervals. Gateway subscription plumbing exists in the sidecar boundary, but the renderer is not yet driven by true push events; this PR does not claim otherwise.

Validation

  • 30 focused server tests pass across registry, composite/local/archive adapters, media, packets, and Telegram coexistence
  • 160 focused web tests pass, including command search, inbox, Markdown, virtualization logic, and packet state
  • 18 focused desktop tests pass
  • full workspace typecheck passes on the stack head
  • GitHub CI is running on the corrected stacked head

Stack

Layer 3 of 6 in Stack pingdotgg#13, based on #7 (feat/discord-accessibility-replies).

Note

Add composite live Discord inbox with archive fallback and snapshot support

  • Introduces makeDiscordCompositeAdapter in DiscordCompositeAdapter.ts to unify the live local protocol and Discrawl archive under a single account; reads prefer live data with archive enrichment, and writes route through the live protocol.
  • Adds a native snapshot command in main.swift and IPC transport to extract live messages via the macOS Accessibility tree, allowing the inbox UI in InboxPage.tsx to overlay verified live messages on top of archived history.
  • Updates the connection UI in ChannelSidebar.tsx to show a QR dialog for Discord approval and uses useVisiblePolling to auto-refresh accounts and conversations while visible.
  • Risk: ChannelRegistry rewires Discord registration from DISCRAWL_ACCOUNT_ID to DISCORD_ACCOUNT_ID, which may affect existing references to the old account ID; matchingComposers in the Swift helper now searches deeper and may match previously missed composers.

Macroscope summarized 486420b.

@github-actions github-actions Bot added vouch:trusted PR author is trusted by repo permissions or the VOUCHED list. size:XL labels Aug 29, 2026
@github-actions

github-actions Bot commented Aug 29, 2026 •

Copy link
Copy Markdown

Thread transfer impact

✅ Thread transfer remains within every enforced ceiling.

ℹ️ No successful main baseline artifact is available yet. This run establishes the initial measurement.

Provider Metric Main baseline This PR Impact PR ceiling
Codex Total thread wire — 13.3 KiB — 15.1 KiB ✅
Codex Thread snapshot wire — 6.9 KiB — 7.3 KiB ✅
Codex Live turn WebSocket wire — 6.4 KiB — 7.8 KiB ✅
Codex Live turn WebSocket decoded — 55.6 KiB — 66.4 KiB ✅
Codex Live turn messages — 10 — 21 ✅
Claude Total thread wire — 13.3 KiB — 15.1 KiB ✅
Claude Thread snapshot wire — 6.9 KiB — 7.3 KiB ✅
Claude Live turn WebSocket wire — 6.4 KiB — 7.8 KiB ✅
Claude Live turn WebSocket decoded — 56.4 KiB — 66.4 KiB ✅
Claude Live turn messages — 9 — 21 ✅

Baseline: unavailable · PR result: 486420b · Source CI: success

Scenario and decoded snapshot size

10 historical turns, 5 command tools per turn, 878.9 KiB retained MCP result per historical turn, and a 1.05 MiB retained result in the measured turn.

  • Codex decoded thread snapshot: 109.4 KiB
  • Claude decoded thread snapshot: 110.1 KiB

Updated in place by a trusted workflow. PR artifacts are strictly validated and never executed.

@Peyton-Spencer
Peyton-Spencer force-pushed the feat/discord-live-inbox branch 2 times, most recently from 74ffc47 to 1ef6080 Compare August 29, 2026 06:25
@github-actions github-actions Bot added size:XXL and removed size:XL labels Aug 29, 2026
@Peyton-Spencer
Peyton-Spencer force-pushed the feat/discord-live-inbox branch 3 times, most recently from bf028fb to 74b8adb Compare August 29, 2026 19:12
@Peyton-Spencer Peyton-Spencer changed the title feat/discord live inbox feat: add a composite live Discord inbox Aug 29, 2026
@Peyton-Spencer
Peyton-Spencer force-pushed the feat/discord-live-inbox branch 3 times, most recently from e5f2d51 to 33ef2ef Compare August 29, 2026 21:18
@Peyton-Spencer
Peyton-Spencer force-pushed the feat/discord-live-inbox branch from 6c5cfa1 to 26c538a Compare August 29, 2026 21:48
@Peyton-Spencer
Peyton-Spencer force-pushed the feat/discord-live-inbox branch from 6b78d9f to 486420b Compare August 29, 2026 22:08
@Peyton-Spencer
Peyton-Spencer marked this pull request as ready for review August 30, 2026 18:50
@Peyton-Spencer
Peyton-Spencer merged commit 747ebe9 into feat/unified-inbox Aug 30, 2026
30 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:XXL vouch:trusted PR author is trusted by repo permissions or the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant