Skip to content

feat!: remove presence; artifact editing is single-user until @corbits/presence returns (CL-8189) - #779

Merged
TheGreatAxios merged 3 commits into
mainfrom
cl-8189-remove-presence
Sep 17, 2026
Merged

TheGreatAxios merged 3 commits into
mainfrom
cl-8189-remove-presence

Conversation

@TheGreatAxios

Copy link
Copy Markdown
Contributor

Summary

  • Presence (who's-here, cursors, typing, Y.Doc co-editing) is dropped from Workbench entirely for now. The library is preserved upstream at corbitsdev/corbits-presence and returns, if it does, as its own re-pin.
  • The artifact editor is now a plain single-user controlled textarea (ArtifactTextEditor), debounced-saved through a new PUT /api/tenants/:tenantId/artifacts/:artifactId route added to packages/artifacts-hub (uses @corbits/artifacts' existing writeArtifactVersion) — this is the only save path a doc-kind artifact ever gets now. Previously the only save path was presence's Y.Doc debounced snapshot persistence, which had no HTTP equivalent.
  • Deleted packages/presence entirely, the hub's presence room registry/mount in apps/hub/src/index.ts, apps/web/src/presence/, and every @corbits/presence/yjs/y-protocols dependency.
  • Regenerated tsconfig references and .changeset/config.json; shrank the report-error baseline for the deleted catch clauses.

Deleted tests

Per owner ruling, tests encoding the old co-edit/presence behavior were deleted rather than adapted:

  • apps/hub/test/artifact-doc-persistence.test.ts (presence → writeArtifactVersion wiring)
  • apps/hub/test/presence-mount.test.ts
  • apps/web/test/use-presence-room.test.tsx
  • apps/web/test/artifact-cursor-overlay.test.tsx
  • packages/artifact-ui/test/artifact-text-editor.test.tsx (Y.Doc-based)
  • packages/artifact-ui/src/y-text-diff.test.ts (and its source, y-text-diff.ts)
  • packages/presence/** (whole package, tests included)
  • Co-editing describe block in apps/web/test/canvas-column.test.tsx — replaced with a single-user equivalent covering the same read-only/editable/typing-saves behavior.
  • save-state.test.ts's "editing" (co-editor) cases — the editing ArtifactSaveState kind is gone, replaced by saving.

What the artifact editor save path is now

ArtifactTextEditor (packages/artifact-ui) is a plain controlled <textarea>. On change it debounces 1s then calls onSave(content). The host (apps/web/src/shell/app-shell.tsx) wires that to saveArtifactContent (apps/web/src/shell/library-artifacts.ts), which does PUT /api/tenants/:tenantId/artifacts/:artifactId with { content }. That route (new, in packages/artifacts-hub/src/routes.ts) calls @corbits/artifacts' writeArtifactVersion and returns the updated row; the host renders "Saving…" / "Saved · vN" / "Unsaved changes" off the response.

Test plan

  • bun run typecheck
  • bun run lint
  • bun run check:structural
  • bun --cwd apps/hub test (DB-gated suites skip locally, no DATABASE_URL)
  • bun --cwd apps/web test
  • bun --cwd packages/artifact-ui test

@linear-code

linear-code Bot commented Sep 17, 2026

Copy link
Copy Markdown

CL-8189

@TheGreatAxios
TheGreatAxios force-pushed the cl-8189-remove-presence branch from 5a7a88f to b4d47f9 Compare September 17, 2026 18:50
…s (CL-8189)

Presence (packages/presence) is removed from Workbench and preserved
upstream at corbitsdev/corbits-presence. Deleted tests: every test that
exercised @corbits/presence, Y.Doc co-editing, or the cursor overlay —
they encode behavior that no longer exists, not behavior to keep passing.
Presence (who's-here, cursors, typing, Y.Doc co-editing) is dropped from
Workbench entirely for now; the library is preserved at
corbitsdev/corbits-presence for whenever it returns. It was only used by
the artifact co-edit surface.

The artifact editor becomes a plain controlled textarea, debounced-saved
through a new PUT /api/tenants/:id/artifacts/:artifactId route (added to
packages/artifacts-hub, using @corbits/artifacts' existing
writeArtifactVersion) — the only save path before this was presence's
Y.Doc snapshot persistence, which never had an HTTP equivalent.

Removes the hub's presence room registry/routes mount, apps/web's
presence client and cursor overlay, the yjs/y-protocols dependency, and
@corbits/presence from every consuming package.json.
Regenerate .changeset/config.json and tsconfig.build.json for the
deleted packages/presence workspace; shrink the report-error baseline
for the deleted catch clauses; drop docs/presence.md; settle bun.lock.
@TheGreatAxios
TheGreatAxios force-pushed the cl-8189-remove-presence branch from b4d47f9 to 9a71040 Compare September 17, 2026 18:51
@TheGreatAxios
TheGreatAxios merged commit 045f3ee into main Sep 17, 2026
9 of 11 checks passed
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