Commit Graph

8 Commits

Author SHA1 Message Date
e4c5804170 Add touch and input handling specification (doc/touch.md)
- Gioui primitives: pointer.InputOp, key.InputOp, key.FocusOp, SoftKeyboardOp
- Op/Event flow: Logic computes elements, Renderer submits ops, Main batches events
- Coordinate mapping: UI space → text space → byte space, with hit-region tags
- Gesture state machine: tap, double-tap, long-press, drag-select, scroll
- Gesture disambiguation: timing thresholds (500ms long-press, 300ms double-tap, 16DP drag)
- Selection logic: selection_start/selection_end byte offsets
- Input batching: Main accumulates events, sends batch to Logic per frame
- Keyboard interaction: focus acquisition/loss, key event table, IME composition
- Scroll momentum: fling logic with exponential decay, scroll clamping

Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
2026-05-08 12:01:06 -04:00
8bd9376fa9 Correct runtime architecture: batched input, config channel, frame receiver logic
- Update block diagram to show correct channel/mutex flow
- Frame receiver now calls w.Invalidate() inside the mutex lock
- Logic goroutine now waits on batched []InputEvent and configChan
- Main loop batches events and sends outside the lock
- Remove select-with-default batching from logic

Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
2026-05-08 10:56:34 -04:00
f8f81b1fec Update architecture: input batching, priority workers, memory monitoring
- Add input batching to Logic goroutine via non-blocking select loop
- Add two-tier priority queue (high/low) to Worker pool
- Add §10 Memory Monitoring and Management (heap stats, debug page, future governor)
- Update diagram and channel topology to reflect new channels

Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
2026-05-08 10:10:06 -04:00
4b048b679e Add runtime architecture specification
- New doc/architecture.md: concurrency model, goroutine responsibilities,
  channel topology, deadlock analysis, sync/async partitioning
- Update SPEC.md §3: split into code organization + runtime architecture,
  cross-reference to architecture.md

Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
2026-05-08 08:24:04 -04:00
485fc59e06 Spec: resolve open design decisions
- Line index: cached on disk in .pad/indices/, invalidated by mtime/size,
  incremental updates during editing sessions
- Atomic writes: temp files live in .pad/tmp/, excluded from Syncthing via .stignore
- State storage: multi-file JSON approach (state.json, cursors.json, undo/*.json)
  over SQLite — simpler, debuggable, sufficient for expected workload
- Undo limits: 1 MB inline cap on deleted field; larger deletions stored in
  separate backup files; 10 MB total disk budget for undo directory
- Added search and word wrap sections to the editor spec
- Updated performance guarantees with search/jump targets
2026-05-07 20:23:24 -04:00
dfc112f5d4 Update specs to match Element interface implementation
- Element is an interface with Region() and Visible() methods
- Concrete types have unexported region/visible/id fields
- Constructors (NewLabel, NewListView) replace embedded Element struct
- Theme simplified to FontSize only
- Removed OnSelect/OnPress callback IDs from element types
- Added internal/ui/ to architecture in spec.md

Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
2026-05-07 18:19:54 -04:00
6720359360 Add Gioui scaffolding with Label and ListView rendering
- Element interface with Region() and Visible() methods
- Label and ListView element types with constructors
- Renderer that clips and draws elements in slice order
- Main app loop with Gioui window and frame events

Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
2026-05-07 17:45:56 -04:00
97d869db6c Initial commit: project specification 2026-05-07 12:24:15 -04:00