diff --git a/.claude/audits/2026-11-03-v1-2-6-label-proposals.md b/.claude/audits/2026-11-03-v1-2-6-label-proposals.md
index 356269a2..f160690f 100644
--- a/.claude/audits/2026-11-03-v1-2-6-label-proposals.md
+++ b/.claude/audits/2026-11-03-v1-2-6-label-proposals.md
@@ -508,3 +508,17 @@ Shown by a voluntary sign-out only when the editor holds unsaved changes, a reco
| `shell.sign_out_loss_body` | Des modifications non enregistrées ou des copies locales de cet onglet seraient perdues. Les enregistrer sur le serveur avant de vous déconnecter les conserve. | Unsaved changes or the local copies held in this tab would be lost. Saving them to the server before signing out keeps them. | New: names what is lost and the way to keep it |
| `shell.sign_out_loss_cancel` | Annuler | Cancel | New: keeps the session and the copies |
| `shell.sign_out_loss_confirm` | Se déconnecter quand même | Sign out anyway | New: purges this account's copies, then signs out |
+
+## Lot N3 (owner decision 7, ruling R23: repair on attach to an unmeasured view, C41)
+
+Shown when a drawing attached to a view that was unmeasured would put the geometry of its annotations out of the new frame. Plural keys use `_one` / `_other`.
+
+| Key | FR | EN | Old wording and why |
+|---|---|---|---|
+| `editor.views.frame.newly_invalid_repairable` | Ces éléments sortent du nouveau cadre : {names}. Choisissez de nouveau l'illustration pour les réparer en l'attachant. | These elements fall outside the new frame: {names}. Choose the drawing again to repair them as you attach it. | New: shown after « Annuler » in the repair dialog. `editor.views.frame.newly_invalid` (« Déplacez d'abord ces éléments (onglet Annotations) ») stays for a measured view (C33); on an unmeasured view that tab is locked (C32) |
+| `editor.views.repair.title` | Réparer les annotations hors du nouveau cadre | Repair the annotations outside the new frame | New: dialog title |
+| `editor.views.repair.body_one` / `_other` | {count} annotation sort / {count} annotations sortent du nouveau cadre de cette illustration. Les valeurs proposées sont calculées dans ce cadre. Rien n'est appliqué avant « Attacher et appliquer » : l'illustration et les nouvelles valeurs sont alors appliquées ensemble, et un seul Annuler les restaure ensemble. | {count} annotation falls / {count} annotations fall outside the new frame of this drawing. The proposed values are computed in that frame. Nothing is applied before "Attach and apply": the drawing and the new values are then applied together, and a single Undo restores them together. | New: names the proposal, the atomic apply and the single undo |
+| `editor.views.repair.row` | {kind} « {name} » | {kind} "{name}" | New: heading of one annotation row |
+| `editor.views.repair.path_blocked` | Ce tracé n'a pas de coordonnées à corriger ici. Remplacez-le par un polygone pour pouvoir attacher l'illustration. | This path has no coordinates to correct here. Replace it with a polygon to be able to attach the drawing. | New: a path cannot be edited numerically; the existing « Remplacer par un polygone » converts it inside the form |
+| `editor.views.repair.refused` | Rien n'a été appliqué : le contrôle du document refuse ces valeurs. | Nothing was applied: the document check refuses these values. | New: the core refused the end state; the core's messages follow per annotation |
+| `editor.views.repair.apply` / `cancel` | Attacher et appliquer / Annuler | Attach and apply / Cancel | New: dialog buttons (« Attacher et appliquer » is the owner's wording) |
diff --git a/apps/app/e2e/shell/editor-geometry.spec.ts b/apps/app/e2e/shell/editor-geometry.spec.ts
index 7001830a..6b6f8fa6 100644
--- a/apps/app/e2e/shell/editor-geometry.spec.ts
+++ b/apps/app/e2e/shell/editor-geometry.spec.ts
@@ -9,7 +9,9 @@ import {
geometryField,
openEditor,
pointOf,
+ saveDraft,
seedDraft,
+ serverDocument,
selectTab,
shapeWith,
standardShape,
@@ -221,6 +223,97 @@ test.describe('editor geometry (adversarial)', () => {
await expect(width).toHaveValue('300')
})
+ test('attaching a drawing to an unmeasured view repairs the annotations outside its frame', async ({
+ page,
+ requests,
+ }) => {
+ const zone = {
+ ...pointOf('out-zone', 'main', { cx: 0, cy: 0, r: 1 }, 'Zone hors cadre'),
+ kind: 'zone',
+ geometry: {
+ type: 'polygon',
+ points: [
+ [10, 10],
+ [400, 10],
+ [400, 400],
+ ],
+ },
+ }
+ const point = pointOf(
+ 'out-point',
+ 'main',
+ { cx: 500, cy: 400, r: 20 },
+ 'Point hors cadre',
+ )
+ const actor = await editorActor('fr')
+ requests.forbid(actor.account.email, actor.account.password)
+ const seed = await seedDraft(actor, {
+ drawing: null,
+ shape: (document) => {
+ standardShape(document)
+ const views = document.views as { id: string }[]
+ document.views = views.filter((view) => view.id === 'main')
+ document.annotations = [point, zone]
+ },
+ })
+ await openEditor(page, dict, actor, seed.sheetId)
+ await selectTab(page, dict, 'views')
+ await page.getByTestId('view-main-file').setInputFiles({
+ name: 'petit.svg',
+ mimeType: 'image/svg+xml',
+ buffer: Buffer.from(
+ '',
+ ),
+ })
+ const dialog = page.getByRole('dialog', {
+ name: dict['editor.views.repair.title'],
+ })
+ await expect(dialog).toBeVisible()
+ const row = dialog.getByTestId('repair-out-point')
+ await expect(
+ row.getByLabel(dict['editor.annotations.geometry.cx']),
+ ).toHaveValue('85')
+ await expectAccessible(page, 'the repair dialog')
+
+ // A value the core refuses: nothing applied, the typed value kept.
+ const cx = row.getByLabel(dict['editor.annotations.geometry.cx'])
+ await cx.fill('900')
+ await cx.press('Enter')
+ await dialog
+ .getByRole('button', { name: dict['editor.views.repair.apply'] })
+ .click()
+ await expect(
+ dialog.getByText(dict['editor.views.repair.refused']),
+ ).toBeVisible()
+ await expect(cx).toHaveValue('900')
+
+ await cx.fill('60')
+ await cx.press('Enter')
+ await dialog
+ .getByRole('button', { name: dict['editor.views.repair.apply'] })
+ .click()
+ await expect(dialog).toBeHidden()
+ await expect(page.getByText(dict['editor.upload.done'])).toBeVisible()
+
+ await saveDraft(page, dict, seed.revision + 1)
+ const saved = await serverDocument<{
+ views: { id: string; svg_asset_id: string | null }[]
+ annotations: { id: string; geometry: Record }[]
+ }>(seed.draftId)
+ expect(saved.views[0].svg_asset_id).not.toBeNull()
+ const byId = Object.fromEntries(saved.annotations.map((a) => [a.id, a]))
+ expect(byId['out-point'].geometry).toMatchObject({ type: 'circle', cx: 60 })
+ expect(byId['out-zone'].geometry).toEqual({
+ type: 'polygon',
+ points: [
+ [10, 10],
+ [100, 10],
+ [100, 100],
+ ],
+ })
+ })
+
test('an unmeasured view: drawing tools and add buttons disabled, the hint shown', async ({
page,
requests,
diff --git a/apps/app/src/components/editor/findings/FindingCreateForm.tsx b/apps/app/src/components/editor/findings/FindingCreateForm.tsx
index 06270b6f..bbc2f33b 100644
--- a/apps/app/src/components/editor/findings/FindingCreateForm.tsx
+++ b/apps/app/src/components/editor/findings/FindingCreateForm.tsx
@@ -114,9 +114,8 @@ function useFormTitle(pending: PendingFinding): string {
const t = useT()
const doc = useSheetDocument()
const locale = useLocaleStore((s) => s.locale)
- if (pending.kind !== 'category' || !doc || !pending.parent) {
- return t(`editor.findings.new.${pending.kind}`)
- }
+ if (pending.kind !== 'category') return t(`editor.findings.new.${pending.kind}`)
+ if (!doc || !pending.parent) return t('editor.findings.add_category')
const zone = elementLabel(
doc,
{ kind: 'zone', id: pending.parent.zoneId },
diff --git a/apps/app/src/components/editor/views/RepairDialog.tsx b/apps/app/src/components/editor/views/RepairDialog.tsx
new file mode 100644
index 00000000..493340d6
--- /dev/null
+++ b/apps/app/src/components/editor/views/RepairDialog.tsx
@@ -0,0 +1,196 @@
+import { useState } from 'react'
+import type { Annotation, Geometry } from '@faunosteo/core-wasm/types'
+import Button from '@/components/ui/Button'
+import Dialog from '@/components/ui/Dialog'
+import GeometryGroup from '@/components/editor/annotations/GeometryGroup'
+import { annotationName } from '@/components/editor/annotations/AnnotationList'
+import { isEditable } from '@/editor/annotations/geometryEdit'
+import { usePlural } from '@/editor/plural'
+import {
+ applyRepair,
+ blockedIds,
+ initialGeometries,
+ listedAnnotations,
+ polygonReplacement,
+ type RepairOffer,
+ type RepairResult,
+} from '@/editor/repair'
+import { useSheetDocument } from '@/editor/sheetDocument'
+import { useT } from '@/i18n/useT'
+import { useLocaleStore } from '@/state/localeStore'
+
+export interface RepairDialogProps {
+ /** The refused attach to repair; null keeps the dialog closed. */
+ offer: RepairOffer | null
+ onApplied: () => void
+ onCancel: () => void
+}
+
+/**
+ * The temporary form of an attach refused for annotations outside the new frame (owner
+ * decision 7). Values are proposals in the new frame; nothing reaches the document before
+ * « Attacher et appliquer », which sends ONE batch the core judges on its end state.
+ */
+export default function RepairDialog({ offer, ...actions }: RepairDialogProps) {
+ const t = useT()
+ const plural = usePlural()
+ const count = offer ? new Set(offer.refusal.annotationIds).size : 0
+ return (
+
+ )
+}
+
+/** The temporary state of the form: proposals, typed edits and the last refusal. */
+function useRepairState(offer: RepairOffer, onApplied: () => void) {
+ const t = useT()
+ const locale = useLocaleStore((s) => s.locale)
+ const doc = useSheetDocument()
+ const [annotations] = useState(() =>
+ doc ? listedAnnotations(offer, doc) : [],
+ )
+ const [geometries, setGeometries] = useState(() =>
+ initialGeometries(offer, annotations),
+ )
+ const [result, setResult] = useState(null)
+ const apply = () => {
+ const applied = applyRepair(offer, geometries, { t, locale })
+ if (applied.ok) onApplied()
+ else setResult(applied)
+ }
+ const change = (id: string, geometry: Geometry) =>
+ setGeometries((current) => ({ ...current, [id]: geometry }))
+ return { annotations, geometries, result, apply, change }
+}
+
+function RepairForm({
+ offer,
+ onApplied,
+ onCancel,
+}: Omit & { offer: RepairOffer }) {
+ const t = useT()
+ const state = useRepairState(offer, onApplied)
+ const refused = state.result && !state.result.ok ? state.result : null
+ return (
+