# Peek UX Rules Design principles and interaction rules for the Peek app. --- ## General Principles ### Interaction Priority When multiple interactions could trigger from the same gesture, follow this priority: 1. **Text selection** - Fine-grained, intentional interaction wins 2. **Interactive elements** - Buttons, inputs, links have their own behaviors 3. **Window-level actions** - Dragging, resizing, etc. ### Don't Fight the Platform - Respect native behaviors where possible - Use standard keyboard shortcuts (Cmd+C, Cmd+V, etc.) - Match platform conventions for focus, selection, scrolling --- ## Window Dragging Frameless windows can be dragged by click-and-hold anywhere on the window body. Dragging is handled by a single unified system in `preload.js` that runs in every window. Individual windows do NOT need their own drag code. ### Activation | Parameter | Value | Purpose | |-----------|-------|---------| | Hold delay | 150ms | Time before drag activates | | Movement threshold | 5px | Cancel if mouse moves before delay | The window position is fetched eagerly on mousedown (overlapping with the hold timer) so that dragging begins instantly when the timer fires. ### Rules **1. Text selection wins over dragging** - If text is selected during the hold period, drag won't activate - If text gets selected during an active drag, drag ends immediately - Rationale: Text selection is more intentional/fine-grained **2. Interactive elements are excluded** These never trigger drag: - ``, `