Skip to content

feat(workspace): collaborative case writing - #59

Merged
Programcode merged 18 commits into
mainfrom
implement-debate-workspace
Sep 22, 2026
Merged

Programcode merged 18 commits into
mainfrom
implement-debate-workspace

Conversation

@Programcode

@Programcode Programcode commented Sep 21, 2026 •

Copy link
Copy Markdown
Owner

Outcome

  • ships the Debate Workspace case-writing journey with DebateLab styling on desktop and mobile
  • adds real Supabase-backed invitations, metadata, Yjs/Hocuspocus collaboration, durable recovery, versions, suggestions, comments, mentions, and access fencing
  • adds the locked local Auth/Mailpit/PostgreSQL collaboration gate to pull-request CI

Verification

  • npm run typecheck
  • npm run lint
  • npm run docs:check
  • 29 collaboration tests
  • 32 focused workspace/auth tests
  • 262 pgTAP assertions plus quota, invite, and removal/write concurrency checks
  • real local desktop/mobile Auth collaboration journey exercised; mobile passed, desktop reached the accessible diff assertion before its expectation was corrected at 849a3c9
  • prior exact-head full verify: 1,153 unit tests, 201 Edge tests, production build, 210 browser tests passed with 2 retry-passing timing flakes

Environment limits

  • no remote workspace migration, Edge Function, collaboration service, or production backend deployment is included or authorized
  • production email delivery remains gated on an approved sender; local email proof uses Mailpit
  • private Tailscale trial follows the merged milestone as specified

Current head: 849a3c9

Summary by CodeRabbit

  • New Features

    • Added workspaces with document creation, organization, archiving, restoration, duplication, and assignment.
    • Added collaborative editing with offline drafts, live presence, suggestions, comments, reviews, mentions, and version history.
    • Added workspace invitations through join codes or email, membership management, ownership transfers, and access controls.
    • Added version previews, restoration, durable recovery, and responsive desktop/mobile workspace experiences.
    • Added local preview support and English, Spanish, and Hungarian localization.
  • Bug Fixes

    • Improved invitation handoff across sign-in and account switching.
    • Added safer recovery when collaboration access is revoked or services become unavailable.

Copilot AI lite review requested due to automatic review settings September 21, 2026 15:54

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@vercel

vercel Bot commented Sep 21, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
debate-navigator Ready Ready Preview Sep 22, 2026 5:34pm UTC

@coderabbitai

coderabbitai Bot commented Sep 21, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

Navigate logical layers of code changes, visualize relationships, and explore their blast radius.

Warning

Review limit reached

Next included review available in 11 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

Learn how review limits work.

Review configuration:

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Free

Run ID: 1f0551ce-8b7b-4100-a0b0-530c6334a83b

📥 Commits

Reviewing files that changed from the base of the PR and between cb65f62 and 57fef2c.

📒 Files selected for processing (7)
  • e2e/fixtures/workspace-review-ime.html
  • e2e/workspace-collaboration.spec.ts
  • e2e/workspace-review-ime.spec.ts
  • services/collaboration/src/server.test.ts
  • services/collaboration/src/server.ts
  • src/lib/workspace/editor-schema.ts
  • src/test/workspace/review.test.ts
ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Free

Run ID: 6d93e573-7426-4afb-b96a-794b64483d83

📥 Commits

Reviewing files that changed from the base of the PR and between f4df64c and cb65f62.

⛔ Files ignored due to path filters (1)
  • package-lock.json is excluded by !**/package-lock.json
📒 Files selected for processing (8)
  • docs/testing.md
  • e2e/workspace-collaboration.spec.ts
  • package.json
  • src/App.tsx
  • src/locales/en.json
  • src/locales/es.json
  • src/locales/hu.json
  • supabase/README.md

Included review availability: Your plan provides up to 1 included review per hour; 0 remain after this review.


📝 Walkthrough

Walkthrough

This release adds PostgreSQL-backed workspace collaboration, workspace management UI, invitations, review and version workflows, and a local Supabase/Mailpit browser gate. It also adds durable collaboration tests, database RPC coverage, offline drafts, access controls, and recovery validation.

Changes

Workspace collaboration release

Layer / File(s) Summary
Database persistence and RPC contracts
supabase/migrations/*, supabase/tests/*, scripts/test-workspace-mutation-concurrency.sh
Adds durable document state, versions, proposals, comments, replies, notifications, access controls, document RPCs, and concurrency tests.
Durable collaboration service
services/collaboration/*
Adds authenticated Hocuspocus collaboration with PostgreSQL storage, advisory locks, snapshots, proposal decisions, access fencing, notifications, and lifecycle shutdown.
Workspace data and collaborative editor
src/lib/workspace/*, src/components/features/workspace/*, src/hooks/use-online-status.ts
Adds validated workspace APIs, invitations, draft storage, durable acknowledgements, suggestion handling, comments, reviews, version previews, and collaborative editing.
Workspace application and invitations
src/pages/*Workspace*, src/components/auth/*, src/App.tsx, src/locales/*
Adds workspace routes, listing and document pages, membership controls, invitation redemption, account cache isolation, navigation, preferences, and translations.
Local integration gate and validation
.superset/*, e2e/*, playwright.workspace.config.ts, supabase/functions/*, .github/workflows/*
Runs the local Supabase, Mailpit, collaboration, Vite, database, and desktop/mobile browser checks with cleanup and failure artifacts.

Estimated code review effort: 5 (Critical) | ~90 minutes


Note

🎁 Summarized by CodeRabbit Free

Your organization is on the Free plan. CodeRabbit will generate a high-level summary and a walkthrough for each pull request. For a comprehensive line-by-line review, please upgrade your subscription to CodeRabbit Essentials by visiting https://app.coderabbit.ai/settings/billing.

Comment @coderabbitai help to get the list of available commands.

@Programcode

Copy link
Copy Markdown
Owner Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Sep 21, 2026 •

Copy link
Copy Markdown
⚠️ Action not completed

Review rate limited.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@Programcode

Copy link
Copy Markdown
Owner Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Sep 21, 2026 •

Copy link
Copy Markdown
⚠️ Action not completed

Review rate limited.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@Programcode

Copy link
Copy Markdown
Owner Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Sep 21, 2026 •

Copy link
Copy Markdown
⚠️ Action not completed

Review rate limited.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@Programcode

Copy link
Copy Markdown
Owner Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Sep 21, 2026 •

Copy link
Copy Markdown
⚠️ Action not completed

Review rate limited.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@Programcode

Copy link
Copy Markdown
Owner Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Sep 21, 2026 •

Copy link
Copy Markdown
⚠️ Action not completed

Review rate limited.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@Programcode

Copy link
Copy Markdown
Owner Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Sep 21, 2026 •

Copy link
Copy Markdown
✅ Action performed

Review finished.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@Programcode

Copy link
Copy Markdown
Owner Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Sep 22, 2026 •

Copy link
Copy Markdown
⚠️ Action not completed

Review rate limited.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@Programcode

Copy link
Copy Markdown
Owner Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Sep 22, 2026 •

Copy link
Copy Markdown
⚠️ Action not completed

Review rate limited.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@Programcode
Programcode merged commit 56c9ffa into main Sep 22, 2026
7 checks passed

This branch was successfully deployed

1 active deployment
Preview — 57fef2c2 Deployed Sep 22, 2026 by vercel[bot]
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