-
Notifications
You must be signed in to change notification settings - Fork 3.7k
feat(realtime): shared room spine + live Files/Tables collaboration + Yjs document editing #5991
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
waleedlatif1
wants to merge
75
commits into
staging
Choose a base branch
from
realtime-rooms
base: staging
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
75 commits
Select commit
Hold shift + click to select a range
a319424
feat(realtime): add shared room identity + authorization spine (#5929)
waleedlatif1 d4d2238
refactor(realtime): generalize presence server to multi-room [2/N] (#…
waleedlatif1 4a0f241
feat(files): live presence avatars + live file tree via realtime room…
waleedlatif1 a639af3
refactor(tables): adopt shared durable event-log core (#5934)
waleedlatif1 9a899d8
fix(realtime): address post-merge review-comment findings (#5937)
waleedlatif1 a1bb9f3
feat(realtime): Yjs relay server for collaborative document editing […
waleedlatif1 45cb10b
feat(files): collaborative document editing — client provider + edito…
waleedlatif1 790d93a
feat(tables): live collaboration — cell-selection presence + live mut…
waleedlatif1 0a36d64
feat(realtime): accurate in-file presence + collaborative-caret polis…
waleedlatif1 cddcb73
feat(files): smarter bullet delete/indent and untitled-file title syn…
mzxchandra 120526f
Merge origin/staging into realtime-rooms
waleedlatif1 1f15cfc
Merge remote-tracking branch 'origin/staging' into realtime-rooms
waleedlatif1 bdf47c8
fix(realtime): access-revalidation multi-room safety + cleanup pass
waleedlatif1 aeda9b0
fix(realtime,tables): close table-presence race + v1/copilot live-col…
waleedlatif1 a7aa317
fix(tables): close two copilot live-collab signal gaps + harden prese…
waleedlatif1 3de7af1
Merge remote-tracking branch 'origin/staging' into realtime-rooms
waleedlatif1 869679f
fix(realtime): guard table join commit + rollback against supersessio…
waleedlatif1 0383d79
Merge remote-tracking branch 'origin/staging' into realtime-rooms
waleedlatif1 dee847b
fix(realtime): guard table join leave-prior against superseding join
waleedlatif1 ccfe294
fix(realtime): roll back a table join superseded during addUserToRoom
waleedlatif1 5cfa299
refactor(realtime): DRY table-join supersession guards; fix stale com…
waleedlatif1 2c40b3f
Merge remote-tracking branch 'origin/staging' into realtime-rooms
waleedlatif1 f09aa17
fix(realtime): file-doc rebind must not drop the current doc or leave…
waleedlatif1 2347dfc
refactor(realtime): serialize table join/leave to fix map-corruption …
waleedlatif1 43cfd6f
Merge remote-tracking branch 'origin/staging' into realtime-rooms
waleedlatif1 06cf68f
fix(realtime): always roll back a failed table join; re-elect file-do…
waleedlatif1 6ab59b9
fix(realtime): close revoke-race ghost presence in workflow join
waleedlatif1 59d7140
Merge remote-tracking branch 'origin/staging' into realtime-rooms
waleedlatif1 5c3b03c
refactor(realtime): serialize workflow join/leave; drop dead room-aut…
waleedlatif1 2bfb58e
fix(realtime): align session TTL, harden committed joins from post-su…
waleedlatif1 dfb6353
Merge remote-tracking branch 'origin/staging' into realtime-rooms
waleedlatif1 42d1d32
fix(realtime): narrow join commit-guard to post-success; skip empty p…
waleedlatif1 a694f75
Merge remote-tracking branch 'origin/staging' into realtime-rooms
waleedlatif1 8ae486a
fix(realtime): harden seeder recovery, join-generation, and misc robu…
waleedlatif1 19a5abd
fix(realtime): gate isReady() on loaded script SHAs, not just connection
waleedlatif1 7421628
fix(files): offline read-only fallback when the realtime doc never syncs
waleedlatif1 a58f928
fix(realtime): validate workflow join id before generation bump; scop…
waleedlatif1 2643970
Merge remote-tracking branch 'origin/staging' into realtime-rooms
waleedlatif1 f9f43c3
fix(files): drop late sync frames once fatal; file-doc join error sup…
waleedlatif1 06ecb6e
Merge remote-tracking branch 'origin/staging' into realtime-rooms
waleedlatif1 ba72663
feat(collab-doc): server-authoritative Yjs seeding (#6008)
waleedlatif1 66eef09
feat(collab-doc): Sim merge endpoint for copilot-into-doc (Stage C fo…
waleedlatif1 17f17e8
feat(collab-doc): realtime apply-edit — merge copilot markdown into a…
waleedlatif1 e43e9a1
feat(collab-doc): stream copilot edits into open editors (Stage C)
waleedlatif1 470b9d0
fix(collab-doc): strip frontmatter on merge; gate live-merge to markdown
waleedlatif1 a7a55c9
fix(collab-doc): make frontmatter collaborative so a merge can't reve…
waleedlatif1 43726ed
fix(collab-doc): re-sync draft on a frontmatter-only merge
waleedlatif1 6cf455b
fix(collab-doc): order the apply-edit/merge timeouts (outer > inner)
waleedlatif1 3c580f3
fix(collab-doc): address deep-audit findings (jsdom trace, timeouts, …
waleedlatif1 7844e9a
Merge remote-tracking branch 'origin/staging' into collab-doc-stage-c
waleedlatif1 499b6c0
Merge remote-tracking branch 'origin/staging' into realtime-rooms
waleedlatif1 0fd0e89
Merge remote-tracking branch 'origin/realtime-rooms' into collab-doc-…
waleedlatif1 c8ecfc0
feat(collab-doc): multi-replica shared Yjs backend + server-side mark…
waleedlatif1 5558be8
Merge pull request #6021 from simstudioai/collab-doc-stage-c
waleedlatif1 161b031
fix(collab-doc): harden distributed locks and durability from review
waleedlatif1 b528509
fix(collab-doc): only persist a doc a user actually edited
waleedlatif1 be2c9ad
fix(collab-doc): close review-round race/durability gaps
waleedlatif1 2f1933c
fix(collab-doc): unstick seed retry and persist tailed edits
waleedlatif1 9476b21
fix(collab-doc): match client markdown post-processing on server persist
waleedlatif1 f62e99f
fix(collab-doc): close durability gaps at deploy boundaries + audit p…
waleedlatif1 b9d2e67
Merge pull request #6036 from simstudioai/collab-doc-multireplica
waleedlatif1 320e18c
Merge remote-tracking branch 'origin/staging' into rt-rooms-sync
waleedlatif1 d3ca016
improvement(realtime): post-review fixes for collab dirty-state + rel…
waleedlatif1 7de77ea
Merge pull request #6043 from simstudioai/collab-review-fixes
waleedlatif1 ced03b3
fix(realtime): make collab-doc seeding atomic to close split-brain wi…
waleedlatif1 f83af6e
docs(realtime): align seed comments with the atomic-append correctnes…
waleedlatif1 079cf13
Merge pull request #6048 from simstudioai/collab-seed-atomic
waleedlatif1 c639d61
Merge origin/staging into realtime-rooms
waleedlatif1 4419951
feat(realtime): live workspace tables list, sharing one invalidation-…
waleedlatif1 2c88758
Merge origin/staging into realtime-rooms
waleedlatif1 11747bd
feat(collab-doc): Hocuspocus binary persistence + Next 16 seed/persis…
waleedlatif1 de595f4
Merge remote-tracking branch 'origin/staging' into realtime-rooms
waleedlatif1 fd34853
fix(collab-doc): stream every external file write into open editors, …
waleedlatif1 caa0a73
fix(rich-markdown-editor): defer non-collab settle/stream mutations o…
waleedlatif1 525c340
feat(tables): show live cell-selection carets in the embedded chat pa…
waleedlatif1 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,29 @@ | ||
| import { db, user } from '@sim/db' | ||
| import { createLogger } from '@sim/logger' | ||
| import { eq } from 'drizzle-orm' | ||
| import type { AuthenticatedSocket } from '@/middleware/auth' | ||
|
|
||
| const logger = createLogger('PresenceAvatar') | ||
|
|
||
| /** | ||
| * The avatar URL for a presence entry: the socket's authenticated image when | ||
| * present, otherwise a single lookup of the user's stored image. Never throws — | ||
| * presence must not fail on an avatar lookup, so a DB error resolves to `null`. | ||
| */ | ||
| export async function resolveAvatarUrl( | ||
| socket: AuthenticatedSocket, | ||
| userId: string | ||
| ): Promise<string | null> { | ||
| if (socket.userImage) return socket.userImage | ||
| try { | ||
| const [record] = await db | ||
| .select({ image: user.image }) | ||
| .from(user) | ||
| .where(eq(user.id, userId)) | ||
| .limit(1) | ||
| return record?.image ?? null | ||
| } catch (error) { | ||
| logger.warn('Failed to load user avatar for presence', { userId, error }) | ||
| return null | ||
| } | ||
| } |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.