fix(app): annotations tab split, editor-wide undo keys, keyboard point fits, typed radius message

This commit is contained in:
bchanot committed 2026-11-04 14:00:57 +01:00
1 parent 447d0a4272
commit 3f15762d95
25 files changed
+1398 -653

No files matched your search

@@ -277,6 +277,22 @@ describe('a frame change (rule 7)', () => {
expect(store.getState().documentText).toBe(before)
})
it('is refused when it makes a point too_small, nothing kept', async () => {
await openWith(
insert(drawnText(), point('anno-a', 2500, 2500, 400)),
'0 0 5000 5000',
)
const before = store.getState().documentText
const outcome = crop({ min_x: 0, min_y: 0, width: 200000, height: 200000 })
expect(outcome).toMatchObject({ ok: false, reason: 'refused' })
if (outcome.ok || outcome.reason !== 'refused')
throw new Error('not refused')
expect(outcome.refusal.issues.map((i) => i.code)).toContain(
'annotation.geometry.too_small',
)
expect(store.getState().documentText).toBe(before)
})
it('is accepted when only an already-invalid point is affected', async () => {
await openReady({ text: insert(drawnText(), point('anno-a', 150, 50, 5)) })
expect(crop({ min_x: 0, min_y: 0, width: 80, height: 80 }).ok).toBe(true)