Skip to content

feat(collabs): add approval inbox and invite-to-existing-video flow#285

Open
rabble wants to merge 16 commits into
mainfrom
feat/collabs-web-tool
Open

feat(collabs): add approval inbox and invite-to-existing-video flow#285
rabble wants to merge 16 commits into
mainfrom
feat/collabs-web-tool

Conversation

@rabble
Copy link
Copy Markdown
Member

@rabble rabble commented Apr 28, 2026

Summary

  • Operator-grade /collabs page (Inbox / Invite / Confirmed tabs) for partner accounts (e.g. Sony, Spider-Man, Tom Holland) to approve collab invites and add collaborators to videos they've already published.
  • Inbox queries the relay for kind 34236 videos that name me in a p-tag, minus videos I've already accepted via kind 34238. Approve = sign + broadcast kind 34238 with ["a", "34236:creator:d-tag"].
  • Invite tab lists my own published videos; picking one opens a dialog that resolves NIP-05 / npub handles and republishes kind 34236 with the same d-tag and appended p-tags. Every original tag (imeta, title, etc.) is preserved verbatim.
  • Confirmed tab reads /api/users/{me}/collabs from funnelcake and shows the videos where my acceptance is confirmed. Sanity check, not the public surface.

Spec: docs/superpowers/specs/2026-04-27-collabs-web-tool-design.md
Plan: docs/superpowers/plans/2026-04-27-collabs-web-tool.md

Known follow-ups (NOT in this PR)

  • Funnelcake feed query is author-only. divine-funnelcake/crates/clickhouse/src/client.rs:get_user_feed filters WHERE vs.pubkey IN (following_list) and ignores video_collaborators_current_data. Until that's fixed, approved collabs do not appear in followers' home feeds. Tracked as a separate funnelcake PR.
  • unwrapListResponse envelope helper lives on fix/funnelcake-envelope-tolerant. This PR uses an inline asVideoArray fallback marked // TODO(collab): replace with shared unwrapListResponse once that lands (src/lib/funnelcakeClient.ts).
  • Card variant="brand" and Button variant="sticker" described in CLAUDE.md don't exist yet; new components fall back to plain <Card> and variant="outline". Future brand sweep can revisit.

Out of scope (deliberately)

Decline / reject button. Remove-collaborator. NIP-59 giftwrap (privacy caveat documented in spec). Funnelcake /collabs/pending endpoint. Mobile-pretty layout. In-tool account switcher.

Test plan

  • `npx tsc --noEmit` clean
  • `npx vitest run` — 571 pass / 0 fail (23 new tests)
  • Manual end-to-end smoke against a real relay with three accounts (Sony / Spider-Man / Tom Holland equivalents): publish video tagging two collaborators from mobile → approve from web on each tagged account → `GET /api/users/{tagged}/collabs` returns the video → Confirmed tab shows it
  • Verify NIP-05 lookup actually resolves for divine.video subdomain accounts (`https://name.divine.video/.well-known/nostr.json?name=_\`)
  • Verify divine-mobile actually publishes kind 34236 with `["p", pubkey, role]` collaborator tags

🤖 Generated with Claude Code

rabble and others added 16 commits April 27, 2026 17:24
Operator-facing desktop tool so partner accounts (Sony, Spider-Man, Tom
Holland, etc.) can log in/out as each account on web — where login
switching actually works — and approve collab invites posted from
mobile, plus invite collaborators onto already-published videos.

Three tabs at /collabs/{inbox,invite,confirmed}. Inbox discovers pending
invites with a relay query (kind 34236 #p=me, minus kind 34238 from me);
approve publishes kind 34238. Invite republishes kind 34236 with the
same d-tag and appended p-tags, preserving every original tag verbatim
(imeta, title, etc.). Confirmed reads /api/users/{me}/collabs.

Public p-tag invite model (no NIP-59 giftwrap in v1); privacy caveat
documented. Funnelcake change deferred — relay query is fine at partner
scale.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
15 TDD tasks split across three chunks: pure helpers + NIP-05 resolver
(Tasks 1-2), data hooks (Tasks 3-7), UI tabs and routing (Tasks 8-15).

Each task is RED/GREEN bite-size with explicit test code, exact paths,
and a single commit. No backend changes required — relay-side discovery
+ existing useNostrPublish flow.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@cloudflare-workers-and-pages
Copy link
Copy Markdown

Deploying divine-web with  Cloudflare Pages  Cloudflare Pages

Latest commit: 1e70771
Status:🚫  Build failed.

View logs

@NotThatKindOfDrLiz NotThatKindOfDrLiz changed the title Collabs web tool: approval inbox + invite-to-existing-video feat(collabs): add approval inbox and invite-to-existing-video flow Apr 29, 2026
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