feat(files): improve editor recovery and editing controls - #7519
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
|
@cubic-dev-ai review this PR |
@waleedlatif1 I have started the AI code review. It will take a few minutes to complete. |
Greptile SummaryThis PR strengthens collaborative file editing and recovery across the browser, application, realtime relay, Redis, and durable storage layers.
Confidence Score: 5/5The PR appears safe to merge because all previous findings are resolved and the latest changes introduce no new actionable issue. The latest revision only replaces untyped Redis test-client scaffolding with scoped interfaces and shared stream-entry types. The current code also reflects the fixes or accepted resolutions recorded in every previous thread, leaving no outstanding merge blocker.
|
| Filename | Overview |
|---|---|
| apps/realtime/src/handlers/file-doc-store.ts | Adds generation-fenced Redis replay, append, invalidation, seeding, and compaction behavior with bounded resource use. |
| apps/realtime/src/handlers/file-doc.ts | Strengthens collaborative-room admission, authorization revalidation, synchronization, and invalidation handling. |
| apps/realtime/src/handlers/file-doc-store.test.ts | Expands Redis stream race and recovery coverage and replaces the previously flagged any annotations with scoped test interfaces. |
| apps/sim/app/workspace/[workspaceId]/files/components/file-viewer/rich-markdown-editor/collaboration/file-doc-provider.ts | Adds acknowledged-update recovery and compatibility handling for disconnected and legacy collaborative sessions. |
| apps/sim/app/workspace/[workspaceId]/files/components/file-viewer/rich-markdown-editor/collaboration/pending-update-journal.ts | Implements bounded, validated browser recovery records with malformed-entry quarantine. |
| apps/sim/lib/collab-doc/persist.ts | Coordinates durable collaborative snapshots and Markdown pointers under transactional version checks. |
| packages/realtime-protocol/src/file-doc.ts | Extends the shared collaboration protocol used by the browser and realtime relay. |
Flowchart
%%{init: {'theme': 'neutral'}}%%
flowchart LR
Editor[Rich Markdown editor] --> Journal[Bounded pending-update journal]
Journal --> Provider[File document provider]
Provider <--> Protocol[Realtime protocol]
Protocol <--> Relay[Realtime file-document handler]
Relay <--> Redis[(Generation-fenced Redis stream)]
Relay --> App[Application seed and reconciliation APIs]
App --> Outbox[Transactional outbox]
App --> Database[(Durable file and snapshot state)]
Reviews (17): Last reviewed commit: "chore(files): type the Redis test client" | Re-trigger Greptile
|
@cubic-dev-ai review this PR |
@waleedlatif1 I have started the AI code review. It will take a few minutes to complete. |
|
@cubic-dev-ai review this PR |
@waleedlatif1 I have started the AI code review. It will take a few minutes to complete. |
|
@cubic-dev-ai review this PR |
@waleedlatif1 I have started the AI code review. It will take a few minutes to complete. |
|
@cubic-dev-ai review this PR |
@waleedlatif1 I have started the AI code review. It will take a few minutes to complete. |
|
@cubic-dev-ai review this PR |
@waleedlatif1 I have started the AI code review. It will take a few minutes to complete. |
|
@cubic-dev-ai review this PR |
@waleedlatif1 I have started the AI code review. It will take a few minutes to complete. |
There was a problem hiding this comment.
All reported issues were addressed across 84 files
Reply with feedback, questions, or to request a fix.
Fix all with cubic | Re-trigger cubic
|
@cubic-dev-ai review this PR |
@waleedlatif1 I have started the AI code review. It will take a few minutes to complete. |
|
@cubic-dev-ai review this PR |
@waleedlatif1 I have started the AI code review. It will take a few minutes to complete. |
|
@greptile Please re-review the actual PR diff against staging. The table-event concern may be valid upstream, but The last commit merged staging to resolve overlapping file-document compaction changes. Only We have not fixed or claimed a hard per-entry table-event bound here. Please assess the editor PR against its staging base rather than attributing the merge's first-parent upstream changes to it. The file-document resolution retains the byte trigger, cooldown and compaction marker alongside bounded replay, constant-space prefix accounting and generation-fenced atomic snapshot/trim; focused tests and a two-replica real Redis probe passed. |
Summary
Type of Change
Testing
Checklist