Skip to content

docs: add technical plan for dispute chat shared key and multimedia support#478

Merged
grunch merged 2 commits intomainfrom
chat-user-admin
Feb 17, 2026
Merged

docs: add technical plan for dispute chat shared key and multimedia support#478
grunch merged 2 commits intomainfrom
chat-user-admin

Conversation

@Catrya
Copy link
Member

@Catrya Catrya commented Feb 16, 2026

Technical plan for migrating dispute chat (user-admin) from direct gift wrap encryption to shared key (ECDH), unifying it with the P2P chat mechanism, and enabling multimedia (images/files) via Blossom servers.

Phases

  • Phase 1: Switch dispute chat to shared key encryption (protocol change, coordinate with admin dev)
  • Phase 2: Unify message model from DisputeChat to NostrEvent (internal refactor)
  • Phase 3: Render multimedia in dispute chat (decouple widgets, reuse P2P rendering)
  • Phase 4: Send multimedia from dispute chat (attachment button, upload flow)
  • Phase 5: Code cleanup and deduplication (extract shared utilities, remove dead code)

Each phase = 1 PR, with tests and manual testing checklist.

Full plan: docs/DISPUTE_CHAT_MULTIMEDIA_PLAN.md

Summary by CodeRabbit

  • Documentation
    • Added a comprehensive roadmap for dispute chat improvements: phased rollout for shared-key encryption, unified message model, multimedia rendering and sending, attachment/encryption flows, testing and acceptance criteria, timelines, risk notes, and coordination guidance for staged deployment.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Feb 16, 2026

No actionable comments were generated in the recent review. 🎉


Walkthrough

Adds a new planning document that defines a five‑phase migration to a shared‑key (ECDH adminSharedKey) dispute chat model and phased multimedia support via Blossom servers, specifying protocol changes, data/model updates, tests, UI considerations, timelines, and coordination notes.

Changes

Cohort / File(s) Summary
Planning document
docs/DISPUTE_CHAT_MULTIMEDIA_PLAN.md
New detailed multi‑phase plan (Phases 1–5) describing migration to shared key encryption for dispute chat, unification of message model, multimedia rendering/sending via Blossom servers, encryption/attachment flows, notifier/data model updates, test lists, UI notes, timelines, risks, and coordination tasks.

Sequence Diagram(s)

sequenceDiagram
  participant Client as Client (Web/Mobile)
  participant Server as App Server
  participant Blossom as Blossom Media Server
  participant DB as Database
  participant Notifier as Notifier Service

  Client->>Server: open dispute chat / request key (ECDH)
  Server->>Client: deliver adminSharedKey (encrypted)
  Client->>Server: send encrypted text/message + attachment metadata
  Server->>Blossom: upload encrypted attachment (store & return URL)
  Blossom-->>Server: attachment URL / storage confirmation
  Server->>DB: persist message record (refs to attachment URL, crypto metadata)
  Server->>Notifier: emit message event (includes minimal metadata)
  Notifier->>Client: push notification / event
  Client->>Blossom: fetch/render encrypted attachment via signed URL (decrypt locally)
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Poem

🐰 A tiny plan hops into view,
Keys handshake, then blossoms too —
Phases laid out, step by step,
Media, crypto, tests adept.
A rabbit cheers this careful cue! 🌸🔐

🚥 Pre-merge checks | ✅ 4
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The PR title directly and clearly describes the main change: adding a technical plan document for dispute chat shared key encryption and multimedia support.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Merge Conflict Detection ✅ Passed ✅ No merge conflicts detected when merging into main

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch chat-user-admin

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 and usage tips.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Fix all issues with AI agents
In `@docs/DISPUTE_CHAT_MULTIMEDIA_PLAN.md`:
- Line 89: Add language specifiers ("text") to the fenced code blocks used for
test pseudocode in DISPUTE_CHAT_MULTIMEDIA_PLAN.md; locate the eight opening
backticks that precede the test group headings (e.g., group('Dispute Shared Key
Computation'), group('p2pWrap / p2pUnwrap round-trip'),
group('DisputeChatNotifier message model'), group('Dispute chat message type
detection'), group('P2P EncryptedImageMessage regression after decoupling'),
group('Dispute chat file upload'), group('NostrUtils.sharedKeyToBytes'), and
group('MediaCacheMixin')) and change the opening ``` to ```text for each block
to satisfy markdownlint MD040.
🧹 Nitpick comments (1)
docs/DISPUTE_CHAT_MULTIMEDIA_PLAN.md (1)

76-83: Clarify the subscription approach decision.

The document presents an alternative approach for subscription management but doesn't specify which one should be implemented. Consider adding a clear recommendation or decision marker (e.g., "Recommended: Integrate into SubscriptionManager...") to help implementers choose the right path.

Copy link
Member

@grunch grunch left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@grunch grunch merged commit e00259d into main Feb 17, 2026
2 checks passed
@grunch grunch deleted the chat-user-admin branch February 17, 2026 14:47
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.

2 participants