mirror of
https://github.com/windmill-labs/windmill.git
synced 2026-10-04 00:02:17 +00:00
* fix: tell the user when a draft conflict has stopped their edits saving Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> * fix: give nothing up until the other version has actually loaded Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> * fix: ignore a reload the editor has moved on from, and settle saves before resolving Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> * fix: settle the key before a forced resolution, and cover quiesce with tests Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> * fix: let a resolution tell it belongs to an editor that is gone Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> * fix: end a conflict resolution when the editing session does, not the component Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> * fix: show the resource conflict in the fixed banner, and scope busy to its session Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> * fix: keep the conflict alert in editors no host wraps Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> * fix: free a reopened editor from a resolution the closed one left in flight Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> * fix: make switching workspace-specific versions a new conflict session Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> * fix: keep the local draft when a conflict resolution is abandoned Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> * fix: let a newer session outrank a resolution that outlived its editor Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> * fix: end a conflict resolution with the session that started it Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> * fix: reopen a conflicted editor on the version the server refused Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> * fix: keep a refused draft deletion a deletion Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> * fix: ungate the editor when a resolution loads the other draft Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> * fix: settle the draft key before reading the version to load Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> * fix: settle the key again after reading, for edits made under the read Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
32 lines
926 B
TypeScript
32 lines
926 B
TypeScript
import { describe, it, expect } from 'vitest'
|
|
|
|
import { createDraftConflictSession } from './draftConflictSession.svelte'
|
|
|
|
/**
|
|
* A resolution the user has walked away from must neither speak for what replaced it nor hold its
|
|
* buttons disabled until it settles.
|
|
*/
|
|
describe('createDraftConflictSession', () => {
|
|
it('frees the next session from a resolution the last one left in flight', () => {
|
|
const session = createDraftConflictSession()
|
|
|
|
const stale = session.start()
|
|
expect(session.busy).toBe(true)
|
|
|
|
session.end()
|
|
expect(session.busy).toBe(false)
|
|
expect(session.holds(stale)).toBe(false)
|
|
|
|
const fresh = session.start()
|
|
expect(session.busy).toBe(true)
|
|
expect(session.holds(fresh)).toBe(true)
|
|
|
|
// The stale request settles last: it must not release the live session's claim.
|
|
session.finish(stale)
|
|
expect(session.busy).toBe(true)
|
|
|
|
session.finish(fresh)
|
|
expect(session.busy).toBe(false)
|
|
})
|
|
})
|