Skip to content

Commit b882040

Browse files
committed
docs(org): state what useServerDraft can and cannot detect
1 parent 9e9565c commit b882040

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

‎apps/sim/platform/app/(shell)/_components/use-server-draft.ts‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,9 @@ type DraftAction<T> =
3434
/**
3535
* An editing buffer over a value another tab or admin can change. A newer server value is adopted
3636
* while the draft is clean. While it is dirty the edits stay and `conflict` holds the choice, so a
37-
* refetch can neither overwrite an edit nor let a save overwrite a change the editor never saw.
37+
* refetch cannot overwrite an edit. It knows only the values that reach it and checks no version: a
38+
* save before a refetch lands can still overwrite a change the editor never saw, unless the caller
39+
* re-reads the value at save or the route compares versions.
3840
*/
3941
export function useServerDraft<T>({
4042
server,

0 commit comments

Comments
 (0)