fix(app): rescue copy importable, trapping draft held, replace confirmed
The JSON rescue copy could not be restored in the app, a draft that traps the engine left the tab on a reload screen and spent a recovery on every read, and an unsaved or in-progress report could be lost by a reload outside the editor or by New report / Import without warning. Home import reads the copy (content-sniffed, 16 MiB cap, strict UTF-8) through the core's draft.restore before any session change; a trapping (draft, archive) pair is held in the resolution panel and only re-read on Retry; ReplaceSessionDialog guards New report and Import; the beforeunload guard is app-wide while unsaved. Supersedes BDR-055's "never held" for `internal` only.
This commit is contained in:
1 parent
9464651140
commit
9bd9acaf58
22 files changed
+1090
-68
No files matched your search
@@ -177,6 +177,10 @@ describe('a new report over a held draft', () => {
|
||||
const submit = screen.getByRole('button', { name: fr['new_report.submit'] })
|
||||
await waitFor(() => expect(submit).toBeEnabled())
|
||||
await user.click(submit)
|
||||
// A draft sits in the slot: replacing it is confirmed first.
|
||||
await user.click(
|
||||
await screen.findByRole('button', { name: fr['session.replace.confirm']! }),
|
||||
)
|
||||
await waitFor(() =>
|
||||
expect(window.alert).toHaveBeenCalledWith(fr['session.held_blocked']),
|
||||
)
|
||||
|
||||
Reference in new issue
Block a user