# UnifiedWriter dev-5.35.0 Editing Stability / Regression

This development milestone intentionally focuses on stabilization after the wide feature expansion through table editing, inline image editing, context menus, DOCX export, review metadata, header/footer and footnote foundations.

## Scope

- Centralize selection-mode exclusivity for text, table, image and comment-oriented selections.
- Keep table and image selection chrome transient; only sanitized DocumentModel changes are saved.
- Preserve image selection state in Undo/Redo snapshots so image resize/delete operations can be reversed more predictably.
- Add a unified diagnostics payload for selection mode, undo/redo depth, IME composition and pending inline typing state.
- Harden clipboard behavior for text, table ranges and selected inline images.
- Allow pasted image clipboard payloads to enter the same Model-first image insertion path as host OpenFile image insertion.
- Guard object selections from accidentally receiving normal paragraph typing/delete operations.

## Design notes

UnifiedWriter still treats the rendered page DOM as a hit-test and rendering surface only. Text selection uses `blockId + offset` ranges; table selection uses a structural cell/range descriptor; image selection uses `blockId + imageId`. The v5.35.0 selection-mode guard makes those surfaces mutually exclusive so toolbar, context-menu, keyboard and clipboard commands do not act on stale selection state.

IME composition remains protected by the input proxy. The editor does not re-render during composition and commits the finalized Japanese/Chinese/Korean input as one model operation.

## Manual checks

1. Select normal text, right-click, and confirm the UnifiedWriter context menu appears.
2. Select an image, press Delete, then Undo; the image should return and remain selectable.
3. Select an image and press Ctrl/Cmd+C; paste into a rich target and confirm an image payload is supplied where the browser allows it.
4. Select a table range, copy/paste tabular text, then Undo/Redo.
5. Enter Japanese text with IME; confirm no re-render occurs mid-composition and Undo removes the committed run.
6. Switch from table selection to text selection and confirm table toolbar/context state does not remain active.
