You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 49331fb
Browse filesBrowse the repository at this point in the historyBrowse files
fix(files): fix new-file collab streaming latch and agent-edit duplication
- Latch collab readiness so a new file's post-seed `synced` flap can no longer
re-gate agent streaming (the stream previously showed only the seed and the
rest appeared only on reload)
- Relay defers the durable edit_content merge to an actively-streaming client:
the client shadow stream and the server merge were both writing the same
content into the live doc, duplicating it when the server ran ahead
- Render the collaborator caret bar out of flow so a peer caret never nudges
the surrounding text by ~1px
- Remove dead code: unused FileDocMessageType alias, unnecessary
LiveFileDocMergeOrder export
Covered by tests: readiness latch (flap/offline/latch cases), relay merge
deferral (single- and multi-replica), plus verified-failing guards.
Copy file name to clipboardExpand all lines: apps/sim/app/workspace/[workspaceId]/files/components/file-viewer/rich-markdown-editor/collaboration/caret-presence.ts
Copy file name to clipboardExpand all lines: apps/sim/app/workspace/[workspaceId]/files/components/file-viewer/rich-markdown-editor/rich-markdown-editor.css
+18-12Lines changed: 18 additions & 12 deletions
Original file line number
Diff line number
Diff line change
@@ -472,19 +472,26 @@
472
472
* cell is not hidden behind adjacent cells.
473
473
*/
474
474
.rich-markdown-prose.collaboration-carets__caret{
475
+
/* Zero inline footprint: a positioned anchor with NO width/border/margin, so inserting or moving this
476
+
* inline widget never reflows the surrounding text. The visible bar, dormant cap (::before), name label,
477
+
* and hover slop (::after) are all positioned relative to this anchor and are out of the inline flow. */
475
478
position: relative;
476
-
margin-left:-1px;
477
-
margin-right:-1px;
478
-
border-left-width:1px;
479
-
border-left-style: solid;
480
-
border-left-color:var(--caret-color);
481
-
border-right-width:1px;
482
-
border-right-style: solid;
483
-
border-right-color:var(--caret-color);
484
479
word-break: normal;
485
480
z-index:20;
486
481
}
487
482
483
+
/* The visible caret bar — absolutely positioned so it draws over the text without occupying inline
484
+
* width. `left: -1px` centers the 2px bar on the cursor position; top/bottom span the line box height. */
485
+
.rich-markdown-prose.collaboration-carets__bar{
486
+
position: absolute;
487
+
top:-0.1em;
488
+
bottom:-0.1em;
489
+
left:-1px;
490
+
width:2px;
491
+
background-color:var(--caret-color);
492
+
pointer-events: none;
493
+
}
494
+
488
495
/* Dormant affordance: a small cap at the top of the caret in the collaborator's color,
489
496
* shaped like a collapsed presence name tag (same `rounded-xs` + notch corner as the
490
497
* tables/canvas tags) so the whole presence system reads as one language. It signals
0 commit comments