Files
image-studio/view/AGENTS.md
2026-07-03 10:16:34 +02:00

10 lines
730 B
Markdown

# View / React Rules
- React is display-only UI and user-intent capture.
- React must not own, manage, derive authoritative, or mutate document/editor state.
- React may keep only local UI state with no app meaning, e.g. popover open state or unsent input draft.
- Event handlers, toolbar buttons, menus, and effects must request state changes by dispatching commands.
- Do not implement business rules, document mutation, renderer backend logic, or editor workflow ownership in components.
- Effects are for subscriptions and UI integration only.
- Keep canvas components small. Extract renderer lifecycle, resize observation, input wiring, cursor logic, and other DOM integration into focused hooks/files under `view/canvas/`.