docs: holistic touch interaction spec and design (gesture dispatcher + left rail) - #4736
docs: holistic touch interaction spec and design (gesture dispatcher + left rail)#4736btli wants to merge 7 commits into
Conversation
Captures the requirements mined from the touch PR train (omnigent-ai#3154/omnigent-ai#3985 swipe actions, omnigent-ai#4057/omnigent-ai#4060/omnigent-ai#4065 row gestures, omnigent-ai#3589/omnigent-ai#4551 contested strip, omnigent-ai#1395 mobile shells, omnigent-ai#4723 safe-area) into one specification (TR-1..29) and a three-phase design: input-capability foundation, unified gesture dispatcher (resurrecting the abandoned useRowGesture work), and a gated left-rail mobile navigation phase. Signed-off-by: Bryan Li <bryan.li@gmail.com>
pointerType-based recognition replacing capability gating; normative threshold, edge-ownership/back-dismissal, gesture-parity, and touch-action tables; corrected railTabs destination set (Browser kept, Sessions/Settings as extensions); TableBubbleMenu inventory; hover- affordance fallback requirement; testable perf gates; RTL logical directions; corrected Android bridge breakpoint claim; resize robustness outcomes; dispatcher scoped away from uncontended handles. Signed-off-by: Bryan Li <bryan.li@gmail.com>
Replace invalid geometric disjointness with first-crossed-wins precedence (HOLD_DRIFT_PX corrected to the train's 20px, provenance fixed); split Android back vs browser back with History-API layer participation; remove nonexistent iOS edge dismissal from TR-24; preserve pinch-zoom on rows and rail edge with second-pointer yield; pin the perf gate to a named device and scripted benchmark; universal 24px handle hit targets incl. pen; fix TR-20 cross-reference; invariants dominate tuning ranges. Signed-off-by: Bryan Li <bryan.li@gmail.com>
- Add SCROLL_ACTIVATION_PX to the TR-11 threshold table; TR-13 and the design state machine reference it - Define the multi-pointer rule for awarded sequences (first pointer wins), not just undecided ones - TR-14: close-path reconciliation — non-popstate dismissals consume their layer's history entry so back never no-ops on an orphan - TR-19: state the 44px drop-target size directly instead of citing handle-only TR-7 - Raise HOLD_DRIFT_PX tuning floor to 16 so the wobble defect fixed in c21fec9 cannot be re-admitted by a legal retune - Design doc: propagate round-2 fixes (drop disjoint-region wording, correct iOS edge-pan to open-only, drop stray coarse-pointer qualifier) Signed-off-by: Bryan Li <bryan.li@gmail.com>
…, multi-pointer note consistency - TR-11: replace single-radius hold eligibility with the train's two-radius model (c21fec9): activation radii govern motion-trending surfaces only; the HOLD_DRIFT_PX circle governs hold-offering surfaces, so wobble can no longer demote a forming hold to scroll and HOLD_DRIFT_PX is reachable. Invariant: HOLD_DRIFT_PX > max(SCROLL_ACTIVATION_PX, SWIPE_ACTIVATION_PX). - TR-14/15/23/24 + design doc: normative swipe-to-close for the open rail — on-surface start-directed swipe, all platforms including iOS, dispatcher- owned, consumes the layer's history entry; parity via scrim/close/Escape. - TR-28: table notes now defer to TR-11's undecided/awarded multi-pointer split; add touch-action row for the open rail overlay + scrim. Signed-off-by: Bryan Li <bryan.li@gmail.com>
…e pan-y caveat, award wording - TR-11: horizontal-first circle exit on a surface with no swipe intent releases to native scroll (no award); |dx| == |dy| ties resolve vertical-first; propagated to the design state machine. - TR-11: the hold-circle bound covers the dispatcher's own arbitration only — restore c21fec9's caveat that a native pan-y pointercancel releases to scroll earlier; suppressing native pan is forbidden per TR-16(a). - TR-11 + table: 'nothing awards' corrected to 'no motion-based award' (TR-12's time-based arming/menu and post-arm drag proceed inside the circle). Signed-off-by: Bryan Li <bryan.li@gmail.com>
…ive-pan suppression prohibition Signed-off-by: Bryan Li <bryan.li@gmail.com>
Tribunal verdict: CLEAN ✅Both blocking review engines attested CLEAN on the final artifact Process: 3-vendor adversarial debate on the approach (dispatcher+rail vs dispatcher-only vs rail-only), then 7 adversarial review rounds across two independent engines (Codex / Claude). 35 findings raised → 35 fixed, 0 dismissed (19 → 9 → 8 → 3 → 3 → 1 → 0). No finding ever challenged the architecture; all were spec-precision items. Highlights hardened through review:
Advisory seats (kimi/agy/cursor) were unavailable this run; shipped on the blocking pair per doctrine — no advisory escalations outstanding. Review ledger: |
|
Closing per maintainer/author direction: planning/spec documents don't belong in the repository. The spec and design doc (tribunal-reviewed, final at |
|
Closed. If you want to pick this back up, comment |
Part of #4790
Related issue
Closes #
Summary
docs/touch-interaction-spec.md: a holistic touch-interaction specification (TR-1..29) capturing the requirements scattered across the touch PR train — session-row swipe actions (feat(web): swipe session rows to archive or delete on touch #3154 → feat(web): swipe session rows to archive or delete on touch #3985), row long-press/drag arbitration (Keep mobile ungroup drop zone below sessions #4057/feat(web): project folder context menu on right-click and long-press #4060/fix(web): suppress session menu during touch drag #4065), the contested header strip (fix(android): keep the server switcher centred over the chat column, clear of header controls #3589/fix(desktop): move the server picker out of the title bar into the sidebar #4551), mobile shells parity (fix(ap-web): show the shells list in the mobile session menu, like desktop #1395), drawer safe-area ([Bug] Shells drawer header renders under the status bar / Dynamic Island on iOS #4723), the five mouse-only resize hooks, and the missing pointer-capability detection.docs/touch-interaction-design.md: a three-phase architecture — Phase 0 input-capability + pointer-event foundation, Phase 1 unified gesture dispatcher (resurrecting the abandoneduseRowGesturework from8dd70928c/c21fec929), Phase 2 gated left-rail mobile navigation adapting the existingWorkspacePaneltab model.ELI5: the app keeps guessing "is this a phone?" by screen width and lets five different pieces of code fight over every finger-drag. The spec says: detect touch directly, give each surface one referee for gestures, and give mobile one navigation rail — built in that order.
Test Plan
Docs-only change; no code paths affected. Verified all file/line and commit citations against
main(ce6dba9c8) and the abandoned branches (feature/mobile-slide-actions-v2,train/polly/session-row-gesture-fix) during a three-vendor codebase investigation.pre-commithooks ran clean on commit.Demo
N/A (docs only).
Type of change
Test coverage
Coverage notes
Documentation-only PR; no executable behavior to test. Citations were manually verified against the repository at the referenced commits.