Skip to content

feat(pipes): share pipes across a team from the desktop#3738

Closed
louis030195 wants to merge 2 commits into
mainfrom
claude/zealous-lalande-98e51d
Closed

feat(pipes): share pipes across a team from the desktop#3738
louis030195 wants to merge 2 commits into
mainfrom
claude/zealous-lalande-98e51d

Conversation

@louis030195

@louis030195 louis030195 commented May 31, 2026

Copy link
Copy Markdown
Collaborator

Brings team pipe-sharing back into the desktop app, peer-to-peer, with the UX rules from the latest design pass.

User flow

team pipe-sharing user flow

same flow as ASCII
1. YOU SHARE                2. MARKED SHARED         3. TEAMMATE SEES IT       4. ON · READ-ONLY · FORK
 ticket-autofill  ⋯          Your pipes                From your team 🛡         🛡 ticket-autofill [team] [on●]
  ├ optimize with ai         🛡 ticket-autofill        🛡 ticket-autofill        ┌───────────────────────────┐
  ├ share with team  ◀        [shared]      [on ●]      [team·you]  off [ ○]     │ shared by your team —      │
  └ fork…                    keys stay local;          installed automatically, │ read-only.    [fork to edit]│
                             only prompt+schedule       OFF by default →         └───────────────────────────┘
                             are shared                  flip toggle to run

What

  • Share / unshare — any team member shares one of their own pipes with the team (encrypted via use-team), or unshares it. A shared badge marks pipes you've shared.
  • Recipients opt in — teammates see shared pipes OFF by default (installed disabled), badged team · <sharer>, and turn them on with the existing enable toggle.
  • Read-only + fork — received team pipes are read-only (prompt editor disabled, edit/publish/delete hidden). Recipients fork to edit → an editable personal copy, off by default.
  • A received pipe installs locally only when it's in the team config, and is never overwritten once on disk, so each member's on/off choice is preserved (mirrors the enterprise managed-pipe install).

Scope / safety

  • Entirely gated behind team membership (team.team). No UI or behavior change for users not in a team — the sync effect early-returns and the menu items don't render.
  • Pure frontend; reuses the existing use-team hook + /api/team/configs backend and the local pipes API. No Rust/Tauri command changes (bindings unaffected).

Verification

  • bunx tsc --noEmit — clean
  • bun run build (next build) — clean, all routes exported
  • ⚠️ Not runtime-tested end-to-end (needs a live team + signed-in cloud session, unavailable in this environment). Worth a quick manual pass with a real team before merge.

Known gap

  • Unshare removes the team config + read-only lock, but a teammate's already-installed copy lingers locally (no removal-on-unshare yet — same shape as the existing syncManagedPipes gap).

🤖 Generated with Claude Code

Louis Beaumont and others added 2 commits May 31, 2026 10:32
Any team member can share one of their own pipes with the team
(encrypted via use-team) or unshare it. Teammates see shared pipes
OFF by default and opt in with the existing enable toggle; shared
pipes are read-only — recipients fork to get an editable, personal
copy. A shared pipe installs locally only when present in the team
config, and is never overwritten once on disk, so each member's
on/off choice is preserved.

Gated behind team membership — no UI change for users not in a team.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@github-actions

github-actions Bot commented Jun 8, 2026

Copy link
Copy Markdown
Contributor

Closing this because there has been no activity for a while.

Feel free to reopen if this is still relevant.

@github-actions github-actions Bot closed this Jun 8, 2026
louis030195 added a commit that referenced this pull request Jun 10, 2026
…are (#3971)

* feat(pipes): team pipe sharing with versioning, auto-update, and unshare

Share a pipe with your team from the desktop app (E2E-encrypted team
configs). Improves on the stale-closed #3738 design:

- versioned shares: payload carries an integer version; re-sharing bumps
  it ("push update to team (vN)" appears when local content differs)
- recipients' copies carry a `# team-shared:vN` marker (mirrors
  enterprise-managed pipes) and auto-update on version bumps while
  preserving each member's own on/off choice
- new installs arrive OFF by default, read-only in the editor; "fork to
  edit" strips the marker and stops auto-updates
- unshare now propagates: marked copies whose share disappeared are
  disabled (never deleted), gated on a successful configs fetch so a
  failed fetch can never mass-disable
- security: only raw_content travels (the author's parsed config object
  can hold secrets and is no longer pushed); share keys are validated
  against path traversal before any filesystem write
- enterprise managed pipes get the same removal fix: policy sync now
  always runs and disables enterprise-marked pipes dropped from the
  policy (pruning only when the server actually returned the field)

Pure sync logic lives in lib/team-pipes.ts with unit tests.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

* feat(pipes): store team pipe shares plaintext, drop the key ceremony

Product decision: nobody asked for E2E on pipe shares, and the team key
management (invite-link fragments, keys that don't follow accounts,
missingKey limbo, unrecoverable data) was the main UX killer. Pipes are
workflow prompts, not credentials, and the enterprise managed-pipes path
is already server-readable. TLS + at-rest encryption still apply. E2E
stays for config types that carry real secrets (AI presets).

- plaintext envelope reuses the same /api/team/configs columns with a
  sentinel nonce ("plaintext") — zero backend changes, the server treats
  value_encrypted as an opaque string either way
- new pushConfigPlain in use-team (no team key required); fetchConfigs
  now parses plaintext rows even when the team key is missing, so
  members in key-limbo still receive shared pipes
- share/unshare UI gated on team admin role — the backend 403s
  team-scope writes from members, so don't show them a dead button
  (member-level sharing later = one-line backend loosening)
- mockup updated to match

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

---------

Co-authored-by: Louis Beaumont <louis@screenpi.pe>
Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
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