fix(store): hold session texts whose set-aside fails, never overwrite them

This commit is contained in:
bchanot committed 2026-10-14 23:11:59 +02:00
1 parent 1312b366b1
commit e34b7f282e
19 files changed
+1093 -86

No files matched your search

+3 -1
View File
@@ -86,6 +86,7 @@ describe('drafts written through the core', () => {
nextAppointment: { kind: 'period', text: 'dans 3 semaines' },
},
sheet.sheet.ref,
sheet,
)
await expectN1ReadsTheDraft()
})
@@ -102,6 +103,7 @@ describe('drafts written through the core', () => {
recommendations: '',
},
sheet.sheet.ref,
sheet,
)
const apply = (obs: ReturnType<typeof current>) =>
useReportStore.getState().updateObservation(0, obs)
@@ -164,7 +166,7 @@ describe('drafts written through the core', () => {
)
useReportStore
.getState()
.hydrateImport({ report: rebase.report, archive: read.archive })
.hydrateImport({ report: rebase.report, archive: read.archive }, sheet)
await expectN1ReadsTheDraft()
const archive: unknown = JSON.parse(sessionStorage.getItem(ARCHIVE_KEY)!)
expect(ReportArchiveEnvelopeSchema.safeParse(archive).success).toBe(true)