Skip to content

Add local unified inbox and managed Discord sync - #5

Merged
Peyton-Spencer merged 40 commits into
feat/discord-imessage-adaptersfrom
feat/unified-inbox
Aug 30, 2026
Merged

Add local unified inbox and managed Discord sync#5
Peyton-Spencer merged 40 commits into
feat/discord-imessage-adaptersfrom
feat/unified-inbox

Conversation

@Peyton-Spencer

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

Copy link
Copy Markdown

What Changed

  • adds a local Inbox route with account status, virtualized conversation/message history, refresh controls, and an iMessage composer
  • adds Discord and iMessage as collapsible, project-like groups in the existing T3 Code sidebar, with search, conversation rows, unread counts, timestamps, and deep links into Inbox
  • adds an explicit Discord sync action; Discord stays disabled by default and setup details remain implementation-neutral in user-facing copy
  • detects Discord Desktop and installs a verified Discrawl v0.13.3 release into Ditto's managed tools directory on first enable
  • runs Discrawl wiretap on enable, then reads the imported local cache through the existing channel adapter RPCs
  • renders Discord messages with Discord-style left alignment, sender grouping, avatars, attachments, and T3 Code's Markdown/table/code renderer
  • automatically loads older messages near the top while preserving visible-list position
  • resolves Discord user and channel mentions with one bounded archive lookup per loaded page, without rewriting mentions inside code spans or fences
  • defaults Ditto Harness embeddings to the dependency-free built-in offline embedder; Ollama remains an optional override
  • fixes two local bootstrap collisions found while testing: macOS Electron extraction now calls /usr/bin/ditto, and Ditto Harness resolves the current sibling crates/node layout

Why

This is the first usable surface on top of #3. A user can open Ditto without an account, enable local Discord history import, browse Discord and iMessage conversations from the normal sidebar, and reply through transports that actually advertise send capability.

The chat sources reuse T3 Code's navigation language without writing foreign channel data into the coding-project or coding-thread tables. The managed helper is opt-in and local. No Discord cache is imported until the user turns sync on, and no Discord user token is extracted.

Fresh installs no longer need Ollama merely to initialize Ditto memory. The current built-in hash embedder prioritizes zero-dependency local operation; a higher-quality bundled model can replace it later without changing this inbox contract.

Stack

Depends on #3 (feat/discord-imessage-adapters). Durable Discord media caching is stacked separately in #6.

Validation

  • pnpm --dir apps/web typecheck
  • pnpm --dir apps/server typecheck
  • pnpm --dir packages/contracts typecheck
  • pnpm vp check (0 errors; 19 existing unrelated warnings)
  • web production build
  • 8 focused inbox/Discrawl tests
  • Computer Use QA in the Electron app for grouped messages, avatars, inline images, Markdown, and resolved mentions
  • fresh desktop launch with backend readiness on the fixed local ports

UI Changes

Adds a first-class Chats section to the existing T3 Code sidebar. Discord and iMessage behave like collapsible project sources, conversations behave like thread rows, and selection is URL-backed so the sidebar and Inbox workspace stay synchronized. Discord messages use the familiar compact left-aligned layout and reuse T3 Code's mature Markdown rendering rather than a second parser.

Checklist

  • This PR is focused on the first testable local inbox slice
  • I explained what changed and why
  • The desktop runtime starts successfully with all local dependencies present

Note

Add unified inbox, native Discord/Telegram sync, and knowledge packets

  • Adds an /inbox route with InboxPage.tsx and ChannelSidebar to display channel accounts and conversations.
  • Adds native Discord and Telegram Go sidecars and Swift accessibility helpers for local message sync on macOS.
  • Introduces DiscordCompositeAdapter to merge live protocol and Discrawl archive data into a single Discord account.
  • Adds knowledge packets allowing users to attach private chat history to tasks via the chat composer.
  • Behavioral Change: ConnectedChannelAccount schema requires the new enabled field; default embedder setting changed from ollama to hash.

Macroscope summarized 747ebe9.

@github-actions github-actions Bot added vouch:trusted PR author is trusted by repo permissions or the VOUCHED list. size:XXL 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 11 21
Claude Total thread wire 13.4 KiB 15.1 KiB
Claude Thread snapshot wire 6.9 KiB 7.3 KiB
Claude Live turn WebSocket wire 6.5 KiB 7.8 KiB
Claude Live turn WebSocket decoded 56.4 KiB 66.4 KiB
Claude Live turn messages 11 21

Baseline: unavailable · PR result: 747ebe9 · 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 marked this pull request as ready for review August 30, 2026 20:19
@Peyton-Spencer
Peyton-Spencer merged commit 1e10c5e into main 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