test sweep: cover gesture_handler / gesture_detector selection paths (T-91)
test / unit + widget + golden + a11y (push) Failing after 34s
test / integration_test (xvfb) (push) Has been skipped
test / bundle smoke (xvfb 5s) (push) Has been skipped
test / daemon subprocess + web WASM smoke (push) Has been skipped
test / dart doc (lib API) (push) Failing after 1m2s

Adds three widget tests under TerminalView — selection gestures:
double-tap selects a word; long-press (touch) selects a word and
keeps the selection across move-update; mouse drag selects characters
across drag-start and drag-update. Each verifies the side-effect on
the externally-supplied TerminalController.

Coverage: gesture_detector.dart 42/50 -> 50/50; gesture_handler.dart
39/59 -> 55/59. The 4 remaining uncovered lines (147, 148, 151, 152)
are the dead tertiary-tap state methods filed as T-95 — same shape
as T-93 but on middle-click. Floor stays at 69 (69.79% measured;
integer threshold unchanged).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-05-08 18:16:07 +02:00
co-authored by Claude Opus 4.7
parent e966836886
commit 2216092ef4
2 changed files with 202 additions and 107 deletions
+123 -107
View File
@@ -1,5 +1,5 @@
{
"exported_at": "2026-05-08T10:40:03Z",
"exported_at": "2026-05-08T16:16:07Z",
"decisions": [
{
"id": "D-1",
@@ -9,7 +9,7 @@
"status": "active",
"date": "2026-04-20",
"file_path": "decisions/architecture.md",
"synced_at": "2026-05-08 10:39:22"
"synced_at": "2026-05-08 11:03:39"
},
{
"id": "D-3",
@@ -19,7 +19,7 @@
"status": "active",
"date": "2026-04-20",
"file_path": "decisions/architecture.md",
"synced_at": "2026-05-08 10:39:22"
"synced_at": "2026-05-08 11:03:39"
},
{
"id": "D-4",
@@ -29,7 +29,7 @@
"status": "active",
"date": "2026-04-20",
"file_path": "decisions/architecture.md",
"synced_at": "2026-05-08 10:39:22"
"synced_at": "2026-05-08 11:03:39"
},
{
"id": "D-5",
@@ -39,7 +39,7 @@
"status": "active",
"date": "2026-04-20",
"file_path": "decisions/architecture.md",
"synced_at": "2026-05-08 10:39:22"
"synced_at": "2026-05-08 11:03:39"
},
{
"id": "D-6",
@@ -49,7 +49,7 @@
"status": "active",
"date": "2026-04-20",
"file_path": "decisions/architecture.md",
"synced_at": "2026-05-08 10:39:22"
"synced_at": "2026-05-08 11:03:39"
},
{
"id": "D-7",
@@ -59,7 +59,7 @@
"status": "active",
"date": "2026-04-21",
"file_path": "decisions/architecture.md",
"synced_at": "2026-05-08 10:39:22"
"synced_at": "2026-05-08 11:03:39"
},
{
"id": "D-8",
@@ -69,7 +69,7 @@
"status": "active",
"date": "2026-04-21",
"file_path": "decisions/architecture.md",
"synced_at": "2026-05-08 10:39:22"
"synced_at": "2026-05-08 11:03:39"
},
{
"id": "D-9",
@@ -79,7 +79,7 @@
"status": "active",
"date": "2026-04-21",
"file_path": "decisions/architecture.md",
"synced_at": "2026-05-08 10:39:22"
"synced_at": "2026-05-08 11:03:39"
},
{
"id": "D-10",
@@ -89,7 +89,7 @@
"status": "active",
"date": "2026-04-21",
"file_path": "decisions/architecture.md",
"synced_at": "2026-05-08 10:39:22"
"synced_at": "2026-05-08 11:03:39"
},
{
"id": "D-11",
@@ -99,7 +99,7 @@
"status": "active",
"date": "2026-04-21",
"file_path": "decisions/architecture.md",
"synced_at": "2026-05-08 10:39:22"
"synced_at": "2026-05-08 11:03:39"
},
{
"id": "D-12",
@@ -109,7 +109,7 @@
"status": "active",
"date": "2026-04-21",
"file_path": "decisions/architecture.md",
"synced_at": "2026-05-08 10:39:22"
"synced_at": "2026-05-08 11:03:39"
},
{
"id": "D-13",
@@ -119,7 +119,7 @@
"status": "active",
"date": "2026-04-21",
"file_path": "decisions/architecture.md",
"synced_at": "2026-05-08 10:39:22"
"synced_at": "2026-05-08 11:03:39"
},
{
"id": "D-14",
@@ -129,7 +129,7 @@
"status": "active",
"date": "2026-04-21",
"file_path": "decisions/architecture.md",
"synced_at": "2026-05-08 10:39:22"
"synced_at": "2026-05-08 11:03:39"
},
{
"id": "D-15",
@@ -139,7 +139,7 @@
"status": "active",
"date": "2026-04-21",
"file_path": "decisions/extensions.md",
"synced_at": "2026-05-08 10:39:22"
"synced_at": "2026-05-08 11:03:39"
},
{
"id": "D-16",
@@ -149,7 +149,7 @@
"status": "active",
"date": "2026-04-21",
"file_path": "decisions/extensions.md",
"synced_at": "2026-05-08 10:39:22"
"synced_at": "2026-05-08 11:03:39"
},
{
"id": "D-17",
@@ -159,7 +159,7 @@
"status": "active",
"date": "2026-04-21",
"file_path": "decisions/extensions.md",
"synced_at": "2026-05-08 10:39:22"
"synced_at": "2026-05-08 11:03:39"
},
{
"id": "D-18",
@@ -169,7 +169,7 @@
"status": "active",
"date": "2026-04-21",
"file_path": "decisions/extensions.md",
"synced_at": "2026-05-08 10:39:22"
"synced_at": "2026-05-08 11:03:39"
},
{
"id": "D-19",
@@ -179,7 +179,7 @@
"status": "active",
"date": "2026-04-21",
"file_path": "decisions/extensions.md",
"synced_at": "2026-05-08 10:39:22"
"synced_at": "2026-05-08 11:03:39"
},
{
"id": "D-20",
@@ -189,7 +189,7 @@
"status": "active",
"date": "2026-04-21",
"file_path": "decisions/accessibility.md",
"synced_at": "2026-05-08 10:39:22"
"synced_at": "2026-05-08 11:03:39"
},
{
"id": "D-21",
@@ -199,7 +199,7 @@
"status": "active",
"date": "2026-04-21",
"file_path": "decisions/accessibility.md",
"synced_at": "2026-05-08 10:39:22"
"synced_at": "2026-05-08 11:03:39"
},
{
"id": "D-22",
@@ -209,7 +209,7 @@
"status": "active",
"date": "2026-04-21",
"file_path": "decisions/accessibility.md",
"synced_at": "2026-05-08 10:39:22"
"synced_at": "2026-05-08 11:03:39"
},
{
"id": "D-23",
@@ -219,7 +219,7 @@
"status": "active",
"date": "2026-04-21",
"file_path": "decisions/testing.md",
"synced_at": "2026-05-08 10:39:22"
"synced_at": "2026-05-08 11:03:39"
},
{
"id": "D-24",
@@ -229,7 +229,7 @@
"status": "active",
"date": "2026-04-21",
"file_path": "decisions/testing.md",
"synced_at": "2026-05-08 10:39:22"
"synced_at": "2026-05-08 11:03:39"
},
{
"id": "D-25",
@@ -239,7 +239,7 @@
"status": "active",
"date": "2026-04-21",
"file_path": "decisions/testing.md",
"synced_at": "2026-05-08 10:39:22"
"synced_at": "2026-05-08 11:03:39"
},
{
"id": "D-26",
@@ -249,7 +249,7 @@
"status": "active",
"date": "2026-04-21",
"file_path": "decisions/testing.md",
"synced_at": "2026-05-08 10:39:22"
"synced_at": "2026-05-08 11:03:39"
},
{
"id": "D-27",
@@ -259,7 +259,7 @@
"status": "active",
"date": "2026-04-21",
"file_path": "decisions/testing.md",
"synced_at": "2026-05-08 10:39:22"
"synced_at": "2026-05-08 11:03:39"
},
{
"id": "D-28",
@@ -269,7 +269,7 @@
"status": "active",
"date": "2026-04-21",
"file_path": "decisions/testing.md",
"synced_at": "2026-05-08 10:39:22"
"synced_at": "2026-05-08 11:03:39"
},
{
"id": "D-29",
@@ -279,7 +279,7 @@
"status": "active",
"date": "2026-04-21",
"file_path": "decisions/testing.md",
"synced_at": "2026-05-08 10:39:22"
"synced_at": "2026-05-08 11:03:39"
},
{
"id": "D-30",
@@ -289,7 +289,7 @@
"status": "active",
"date": "2026-04-21",
"file_path": "decisions/testing.md",
"synced_at": "2026-05-08 10:39:22"
"synced_at": "2026-05-08 11:03:39"
},
{
"id": "D-31",
@@ -299,7 +299,7 @@
"status": "active",
"date": "2026-04-21",
"file_path": "decisions/tooling.md",
"synced_at": "2026-05-08 10:39:22"
"synced_at": "2026-05-08 11:03:39"
},
{
"id": "D-32",
@@ -309,7 +309,7 @@
"status": "active",
"date": "2026-04-21",
"file_path": "decisions/tooling.md",
"synced_at": "2026-05-08 10:39:22"
"synced_at": "2026-05-08 11:03:39"
},
{
"id": "D-33",
@@ -319,7 +319,7 @@
"status": "active",
"date": "2026-04-21",
"file_path": "decisions/tooling.md",
"synced_at": "2026-05-08 10:39:22"
"synced_at": "2026-05-08 11:03:39"
},
{
"id": "D-34",
@@ -329,7 +329,7 @@
"status": "active",
"date": "2026-04-21",
"file_path": "decisions/process.md",
"synced_at": "2026-05-08 10:39:22"
"synced_at": "2026-05-08 11:03:39"
},
{
"id": "D-35",
@@ -339,7 +339,7 @@
"status": "active",
"date": "2026-04-21",
"file_path": "decisions/process.md",
"synced_at": "2026-05-08 10:39:22"
"synced_at": "2026-05-08 11:03:39"
},
{
"id": "D-36",
@@ -349,7 +349,7 @@
"status": "active",
"date": "2026-04-21",
"file_path": "decisions/process.md",
"synced_at": "2026-05-08 10:39:22"
"synced_at": "2026-05-08 11:03:39"
},
{
"id": "D-37",
@@ -359,7 +359,7 @@
"status": "active",
"date": "2026-04-21",
"file_path": "decisions/process.md",
"synced_at": "2026-05-08 10:39:22"
"synced_at": "2026-05-08 11:03:39"
},
{
"id": "D-38",
@@ -369,7 +369,7 @@
"status": "active",
"date": "2026-04-21",
"file_path": "decisions/process.md",
"synced_at": "2026-05-08 10:39:22"
"synced_at": "2026-05-08 11:03:39"
},
{
"id": "D-39",
@@ -379,7 +379,7 @@
"status": "active",
"date": "2026-04-21",
"file_path": "decisions/process.md",
"synced_at": "2026-05-08 10:39:22"
"synced_at": "2026-05-08 11:03:39"
},
{
"id": "D-40",
@@ -389,7 +389,7 @@
"status": "active",
"date": "2026-04-21",
"file_path": "decisions/process.md",
"synced_at": "2026-05-08 10:39:22"
"synced_at": "2026-05-08 11:03:39"
},
{
"id": "D-41",
@@ -399,7 +399,7 @@
"status": "active",
"date": "2026-04-22",
"file_path": "decisions/architecture.md",
"synced_at": "2026-05-08 10:39:22"
"synced_at": "2026-05-08 11:03:39"
},
{
"id": "D-42",
@@ -409,7 +409,7 @@
"status": "active",
"date": "2026-04-22",
"file_path": "decisions/tooling.md",
"synced_at": "2026-05-08 10:39:22"
"synced_at": "2026-05-08 11:03:39"
},
{
"id": "D-43",
@@ -419,7 +419,7 @@
"status": "active",
"date": "2026-04-22",
"file_path": "decisions/architecture.md",
"synced_at": "2026-05-08 10:39:22"
"synced_at": "2026-05-08 11:03:39"
},
{
"id": "D-44",
@@ -429,7 +429,7 @@
"status": "active",
"date": "2026-04-22",
"file_path": "decisions/architecture.md",
"synced_at": "2026-05-08 10:39:22"
"synced_at": "2026-05-08 11:03:39"
},
{
"id": "D-45",
@@ -439,7 +439,7 @@
"status": "active",
"date": "2026-04-22",
"file_path": "decisions/architecture.md",
"synced_at": "2026-05-08 10:39:22"
"synced_at": "2026-05-08 11:03:39"
},
{
"id": "D-46",
@@ -449,7 +449,7 @@
"status": "active",
"date": "2026-04-22",
"file_path": "decisions/extensions.md",
"synced_at": "2026-05-08 10:39:22"
"synced_at": "2026-05-08 11:03:39"
},
{
"id": "D-47",
@@ -459,7 +459,7 @@
"status": "active",
"date": "2026-04-22",
"file_path": "decisions/architecture.md",
"synced_at": "2026-05-08 10:39:22"
"synced_at": "2026-05-08 11:03:39"
},
{
"id": "D-48",
@@ -469,7 +469,7 @@
"status": "active",
"date": "2026-04-22",
"file_path": "decisions/architecture.md",
"synced_at": "2026-05-08 10:39:22"
"synced_at": "2026-05-08 11:03:39"
},
{
"id": "D-49",
@@ -479,7 +479,7 @@
"status": "active",
"date": "2026-04-22",
"file_path": "decisions/architecture.md",
"synced_at": "2026-05-08 10:39:22"
"synced_at": "2026-05-08 11:03:39"
},
{
"id": "D-50",
@@ -489,7 +489,7 @@
"status": "active",
"date": "2026-04-22",
"file_path": "decisions/architecture.md",
"synced_at": "2026-05-08 10:39:22"
"synced_at": "2026-05-08 11:03:39"
},
{
"id": "D-51",
@@ -499,7 +499,7 @@
"status": "active",
"date": "2026-04-22",
"file_path": "decisions/architecture.md",
"synced_at": "2026-05-08 10:39:22"
"synced_at": "2026-05-08 11:03:39"
},
{
"id": "D-52",
@@ -509,7 +509,7 @@
"status": "active",
"date": "2026-04-22",
"file_path": "decisions/architecture.md",
"synced_at": "2026-05-08 10:39:22"
"synced_at": "2026-05-08 11:03:39"
},
{
"id": "D-53",
@@ -519,7 +519,7 @@
"status": "active",
"date": "2026-04-22",
"file_path": "decisions/architecture.md",
"synced_at": "2026-05-08 10:39:22"
"synced_at": "2026-05-08 11:03:39"
},
{
"id": "D-54",
@@ -529,7 +529,7 @@
"status": "active",
"date": "2026-04-22",
"file_path": "decisions/architecture.md",
"synced_at": "2026-05-08 10:39:22"
"synced_at": "2026-05-08 11:03:39"
},
{
"id": "D-55",
@@ -539,7 +539,7 @@
"status": "active",
"date": "2026-04-23",
"file_path": "decisions/architecture.md",
"synced_at": "2026-05-08 10:39:22"
"synced_at": "2026-05-08 11:03:39"
},
{
"id": "D-56",
@@ -549,7 +549,7 @@
"status": "active",
"date": "2026-04-23",
"file_path": "decisions/architecture.md",
"synced_at": "2026-05-08 10:39:22"
"synced_at": "2026-05-08 11:03:39"
},
{
"id": "D-57",
@@ -559,7 +559,7 @@
"status": "active",
"date": "2026-04-23",
"file_path": "decisions/architecture.md",
"synced_at": "2026-05-08 10:39:22"
"synced_at": "2026-05-08 11:03:39"
},
{
"id": "D-58",
@@ -569,7 +569,7 @@
"status": "active",
"date": "2026-04-23",
"file_path": "decisions/tooling.md",
"synced_at": "2026-05-08 10:39:22"
"synced_at": "2026-05-08 11:03:39"
},
{
"id": "D-59",
@@ -579,7 +579,7 @@
"status": "active",
"date": "2026-04-25",
"file_path": "decisions/tooling.md",
"synced_at": "2026-05-08 10:39:22"
"synced_at": "2026-05-08 11:03:39"
},
{
"id": "D-60",
@@ -589,7 +589,7 @@
"status": "active",
"date": "2026-04-26",
"file_path": "decisions/tooling.md",
"synced_at": "2026-05-08 10:39:22"
"synced_at": "2026-05-08 11:03:39"
},
{
"id": "D-61",
@@ -599,7 +599,7 @@
"status": "active",
"date": "2026-04-26",
"file_path": "decisions/tooling.md",
"synced_at": "2026-05-08 10:39:22"
"synced_at": "2026-05-08 11:03:39"
},
{
"id": "D-62",
@@ -609,7 +609,7 @@
"status": "active",
"date": "2026-04-26",
"file_path": "decisions/tooling.md",
"synced_at": "2026-05-08 10:39:22"
"synced_at": "2026-05-08 11:03:39"
},
{
"id": "D-63",
@@ -619,7 +619,7 @@
"status": "active",
"date": "2026-04-26",
"file_path": "decisions/tooling.md",
"synced_at": "2026-05-08 10:39:22"
"synced_at": "2026-05-08 11:03:39"
},
{
"id": "D-64",
@@ -629,7 +629,7 @@
"status": "active",
"date": "2026-05-03",
"file_path": "decisions/architecture.md",
"synced_at": "2026-05-08 10:39:22"
"synced_at": "2026-05-08 11:03:39"
},
{
"id": "D-65",
@@ -639,7 +639,7 @@
"status": "active",
"date": "2026-04-26",
"file_path": "decisions/tooling.md",
"synced_at": "2026-05-08 10:39:22"
"synced_at": "2026-05-08 11:03:39"
},
{
"id": "D-66",
@@ -649,7 +649,7 @@
"status": "active",
"date": "2026-05-06",
"file_path": "decisions/testing.md",
"synced_at": "2026-05-08 10:39:22"
"synced_at": "2026-05-08 11:03:39"
},
{
"id": "Q-1",
@@ -658,7 +658,7 @@
"title": "Authorisation granularity on the IPC socket",
"status": "open",
"file_path": "decisions/questions-architecture.md",
"synced_at": "2026-05-08 10:39:22"
"synced_at": "2026-05-08 11:03:39"
},
{
"id": "Q-2",
@@ -667,7 +667,7 @@
"title": "Back-pressure on event streams",
"status": "open",
"file_path": "decisions/questions-architecture.md",
"synced_at": "2026-05-08 10:39:22"
"synced_at": "2026-05-08 11:03:39"
},
{
"id": "Q-3",
@@ -676,7 +676,7 @@
"title": "Event persistence + audit/undo",
"status": "open",
"file_path": "decisions/questions-architecture.md",
"synced_at": "2026-05-08 10:39:22"
"synced_at": "2026-05-08 11:03:39"
},
{
"id": "Q-4",
@@ -685,7 +685,7 @@
"title": "`.canvas` schema compatibility with Obsidian",
"status": "open",
"file_path": "decisions/questions-architecture.md",
"synced_at": "2026-05-08 10:39:22"
"synced_at": "2026-05-08 11:03:39"
},
{
"id": "Q-5",
@@ -694,7 +694,7 @@
"title": "IPC wire-format stability + `schema_version:`",
"status": "open",
"file_path": "decisions/questions-architecture.md",
"synced_at": "2026-05-08 10:39:22"
"synced_at": "2026-05-08 11:03:39"
},
{
"id": "Q-6",
@@ -703,7 +703,7 @@
"title": "Window chrome — native frame vs frameless custom",
"status": "resolved",
"file_path": "decisions/questions-architecture.md",
"synced_at": "2026-05-08 10:39:22"
"synced_at": "2026-05-08 11:03:39"
},
{
"id": "Q-7",
@@ -712,7 +712,7 @@
"title": "macOS app bundle signing / notarisation",
"status": "open",
"file_path": "decisions/questions-architecture.md",
"synced_at": "2026-05-08 10:39:22"
"synced_at": "2026-05-08 11:03:39"
},
{
"id": "Q-8",
@@ -721,7 +721,7 @@
"title": "Extension API shape — widgets, subcommands, both?",
"status": "open",
"file_path": "decisions/questions-extensions.md",
"synced_at": "2026-05-08 10:39:22"
"synced_at": "2026-05-08 11:03:39"
},
{
"id": "Q-9",
@@ -730,7 +730,7 @@
"title": "Lua runtime vendoring",
"status": "open",
"file_path": "decisions/questions-extensions.md",
"synced_at": "2026-05-08 10:39:22"
"synced_at": "2026-05-08 11:03:39"
},
{
"id": "Q-10",
@@ -739,7 +739,7 @@
"title": "Extension manifest `schema_version:`",
"status": "open",
"file_path": "decisions/questions-extensions.md",
"synced_at": "2026-05-08 10:39:22"
"synced_at": "2026-05-08 11:03:39"
},
{
"id": "Q-11",
@@ -748,7 +748,7 @@
"title": "Coverage gates — hard thresholds vs soft reporting",
"status": "open",
"file_path": "decisions/questions-testing.md",
"synced_at": "2026-05-08 10:39:22"
"synced_at": "2026-05-08 11:03:39"
},
{
"id": "Q-12",
@@ -757,7 +757,7 @@
"title": "Screen-reader automation (axe-core via Playwright)",
"status": "open",
"file_path": "decisions/questions-testing.md",
"synced_at": "2026-05-08 10:39:22"
"synced_at": "2026-05-08 11:03:39"
},
{
"id": "Q-13",
@@ -766,7 +766,7 @@
"title": "Web production-mode a11y",
"status": "open",
"file_path": "decisions/questions-accessibility.md",
"synced_at": "2026-05-08 10:39:22"
"synced_at": "2026-05-08 11:03:39"
},
{
"id": "Q-14",
@@ -775,7 +775,7 @@
"title": "i18n plurals / gender / date-format tooling",
"status": "open",
"file_path": "decisions/questions-accessibility.md",
"synced_at": "2026-05-08 10:39:22"
"synced_at": "2026-05-08 11:03:39"
},
{
"id": "Q-15",
@@ -784,7 +784,7 @@
"title": "Editor tab — full LSP vs tree-sitter-only highlight",
"status": "open",
"file_path": "decisions/questions-process.md",
"synced_at": "2026-05-08 10:39:22"
"synced_at": "2026-05-08 11:03:39"
},
{
"id": "Q-16",
@@ -793,7 +793,7 @@
"title": "`tree-sitter-dart` grammar maintenance",
"status": "open",
"file_path": "decisions/questions-process.md",
"synced_at": "2026-05-08 10:39:22"
"synced_at": "2026-05-08 11:03:39"
},
{
"id": "Q-17",
@@ -802,7 +802,7 @@
"title": "Icon set growth",
"status": "open",
"file_path": "decisions/questions-process.md",
"synced_at": "2026-05-08 10:39:22"
"synced_at": "2026-05-08 11:03:39"
},
{
"id": "Q-18",
@@ -811,7 +811,7 @@
"title": "Theme hot-reload in release builds",
"status": "open",
"file_path": "decisions/questions-process.md",
"synced_at": "2026-05-08 10:39:22"
"synced_at": "2026-05-08 11:03:39"
},
{
"id": "Q-19",
@@ -820,7 +820,7 @@
"title": "(withdrawn)",
"status": "resolved",
"file_path": "decisions/questions-process.md",
"synced_at": "2026-05-08 10:39:22"
"synced_at": "2026-05-08 11:03:39"
},
{
"id": "Q-20",
@@ -829,7 +829,7 @@
"title": "Kernel DB service — namespaced SQL access?",
"status": "open",
"file_path": "decisions/questions-process.md",
"synced_at": "2026-05-08 10:39:22"
"synced_at": "2026-05-08 11:03:39"
},
{
"id": "Q-21",
@@ -838,7 +838,7 @@
"title": "Pql absorbs planning vs keeps separate",
"status": "open",
"file_path": "decisions/questions-architecture.md",
"synced_at": "2026-05-08 10:39:22"
"synced_at": "2026-05-08 11:03:39"
},
{
"id": "Q-22",
@@ -847,7 +847,7 @@
"title": "Ticket persistence strategy",
"status": "open",
"file_path": "decisions/questions-architecture.md",
"synced_at": "2026-05-08 10:39:22"
"synced_at": "2026-05-08 11:03:39"
},
{
"id": "Q-23",
@@ -856,7 +856,7 @@
"title": "SSH-remote development — run clide against a remote workspace",
"status": "open",
"file_path": "decisions/questions-architecture.md",
"synced_at": "2026-05-08 10:39:22"
"synced_at": "2026-05-08 11:03:39"
},
{
"id": "Q-25",
@@ -865,7 +865,7 @@
"title": "Body text face — mono everywhere vs Josefin Sans UI + mono code",
"status": "open",
"file_path": "decisions/questions-architecture.md",
"synced_at": "2026-05-08 10:39:22"
"synced_at": "2026-05-08 11:03:39"
},
{
"id": "Q-26",
@@ -874,7 +874,7 @@
"title": "Small screen layout (\u003c 1000px)",
"status": "open",
"file_path": "decisions/questions-architecture.md",
"synced_at": "2026-05-08 10:39:22"
"synced_at": "2026-05-08 11:03:39"
},
{
"id": "Q-27",
@@ -883,7 +883,7 @@
"title": "Two-editor split",
"status": "open",
"file_path": "decisions/questions-architecture.md",
"synced_at": "2026-05-08 10:39:22"
"synced_at": "2026-05-08 11:03:39"
},
{
"id": "Q-28",
@@ -892,7 +892,7 @@
"title": "Terminal strip scope — shell only or logs/errors/tests",
"status": "open",
"file_path": "decisions/questions-architecture.md",
"synced_at": "2026-05-08 10:39:22"
"synced_at": "2026-05-08 11:03:39"
},
{
"id": "Q-29",
@@ -901,7 +901,7 @@
"title": "Branch picker location",
"status": "open",
"file_path": "decisions/questions-architecture.md",
"synced_at": "2026-05-08 10:39:22"
"synced_at": "2026-05-08 11:03:39"
},
{
"id": "Q-30",
@@ -910,7 +910,7 @@
"title": "Focus behavior when editor is dirty and viewer is peeked",
"status": "open",
"file_path": "decisions/questions-architecture.md",
"synced_at": "2026-05-08 10:39:22"
"synced_at": "2026-05-08 11:03:39"
},
{
"id": "Q-31",
@@ -919,7 +919,7 @@
"title": "XWayland fallback for frameless — proper Wayland protocol needed",
"status": "open",
"file_path": "decisions/questions-architecture.md",
"synced_at": "2026-05-08 10:39:22"
"synced_at": "2026-05-08 11:03:39"
},
{
"id": "R-2",
@@ -929,7 +929,7 @@
"status": "active",
"date": "2026-04-20",
"file_path": "decisions/rejected.md",
"synced_at": "2026-05-08 10:39:22"
"synced_at": "2026-05-08 11:03:39"
},
{
"id": "R-3",
@@ -939,7 +939,7 @@
"status": "active",
"date": "2026-04-21",
"file_path": "decisions/rejected.md",
"synced_at": "2026-05-08 10:39:22"
"synced_at": "2026-05-08 11:03:39"
},
{
"id": "R-4",
@@ -949,7 +949,7 @@
"status": "active",
"date": "2026-04-21",
"file_path": "decisions/rejected.md",
"synced_at": "2026-05-08 10:39:22"
"synced_at": "2026-05-08 11:03:39"
},
{
"id": "R-5",
@@ -959,7 +959,7 @@
"status": "active",
"date": "2026-04-21",
"file_path": "decisions/rejected.md",
"synced_at": "2026-05-08 10:39:22"
"synced_at": "2026-05-08 11:03:39"
},
{
"id": "R-6",
@@ -969,7 +969,7 @@
"status": "active",
"date": "2026-04-21",
"file_path": "decisions/rejected.md",
"synced_at": "2026-05-08 10:39:22"
"synced_at": "2026-05-08 11:03:39"
},
{
"id": "R-7",
@@ -979,7 +979,7 @@
"status": "active",
"date": "2026-04-21",
"file_path": "decisions/rejected.md",
"synced_at": "2026-05-08 10:39:22"
"synced_at": "2026-05-08 11:03:39"
},
{
"id": "R-8",
@@ -989,7 +989,7 @@
"status": "active",
"date": "2026-04-21",
"file_path": "decisions/rejected.md",
"synced_at": "2026-05-08 10:39:22"
"synced_at": "2026-05-08 11:03:39"
},
{
"id": "R-9",
@@ -999,7 +999,7 @@
"status": "active",
"date": "2026-04-21",
"file_path": "decisions/rejected.md",
"synced_at": "2026-05-08 10:39:22"
"synced_at": "2026-05-08 11:03:39"
},
{
"id": "R-10",
@@ -1009,7 +1009,7 @@
"status": "active",
"date": "2026-04-21",
"file_path": "decisions/rejected.md",
"synced_at": "2026-05-08 10:39:22"
"synced_at": "2026-05-08 11:03:39"
},
{
"id": "R-11",
@@ -1019,7 +1019,7 @@
"status": "active",
"date": "2026-04-21",
"file_path": "decisions/rejected.md",
"synced_at": "2026-05-08 10:39:22"
"synced_at": "2026-05-08 11:03:39"
},
{
"id": "R-12",
@@ -1029,7 +1029,7 @@
"status": "active",
"date": "2026-04-22",
"file_path": "decisions/rejected.md",
"synced_at": "2026-05-08 10:39:22"
"synced_at": "2026-05-08 11:03:39"
}
],
"decision_refs": [
@@ -2820,6 +2820,16 @@
"priority": "medium",
"created_at": "2026-05-07 19:08:29",
"updated_at": "2026-05-07 19:08:52"
},
{
"id": "T-95",
"type": "bug",
"title": "TerminalGestureHandler tertiary-tap wired to secondary; middle-button mis-typed",
"description": "**File:** `lib/src/terminal/src/ui/gesture/gesture_handler.dart` (build wiring + state-method body) + `lib/src/terminal/src/ui/gesture/gesture_detector.dart` (dead public API).\n\n**Bug:** Middle-clicks (\"tertiary tap\") are routed through the wrong handler chain, and even the unreachable target carries a button-enum typo. Same shape as T-93 but on a different gesture pair.\n\nTrace:\n\n1. `TerminalGestureHandler.build` (gesture_handler.dart:6582) wires:\n ```dart\n onTertiaryTapDown: onSecondaryTapDown,\n onTertiaryTapUp: onSecondaryTapUp,\n ```\n Right-hand sides are the state's `onSecondaryTapDown` / `onSecondaryTapUp` *methods* (lines 138144), not the tertiary equivalents. So a middle-click reaches `_tapDown(widget.onSecondaryTapDown, details, TerminalMouseButton.right)` — i.e. fires the **secondary** callback with **button=right**.\n2. The state's `onTertiaryTapDown` and `onTertiaryTapUp` methods (lines 147152) are therefore **dead** — they're declared but never invoked anywhere.\n3. `onTertiaryTapUp` at line 152 has a copy-paste error: `TerminalMouseButton.right` where the function is named tertiary and the comment paragraph clearly intends middle. Even if the wiring were correct, the button reported on tertiary-up would be wrong.\n4. The `onTertiaryTapDown` / `onTertiaryTapUp` *parameters* on `TerminalGestureHandler` (lines 2425, 4547) and `TerminalGestureDetector` (lines 1314, 3031) are **dead public surface** — no in-tree caller passes them, like T-93's `onTapUp`.\n\n**Two layers of \"dead\" again:**\n\n- The wiring is wrong, so middle-clicks dispatch as if they were right-clicks.\n- The public API to receive proper middle-click notifications doesn't reach any caller, so even if a consumer passes `onTertiaryTapDown:` to `TerminalView`, it would do nothing today (TerminalView doesn't expose tertiary callbacks).\n\n**User-visible impact:**\n\nA consumer relying on right-click for context-menu behaviour on `TerminalView` will accidentally trigger that menu on middle-click as well, which is wrong on every desktop platform (middle-click is conventionally paste / scroll-wheel-button). Tests of secondary-tap will pass for both right- and middle-clicks, masking the issue.\n\n**Resolutions, like T-93:**\n\n- **A. Fix the wiring + typo.** In `TerminalGestureHandler.build`, change `onTertiaryTapDown: onSecondaryTapDown` to `onTertiaryTapDown: onTertiaryTapDown` (and same for Up). Fix line 152's `TerminalMouseButton.right` → `middle`. Adds a parameter on `TerminalView` (`onTertiaryTapDown` / `onTertiaryTapUp`) so consumers can register middle-click handlers. Test surfaces the new path.\n- **B. Delete the dead surface.** Remove `onTertiaryTapDown` / `onTertiaryTapUp` parameters from both `TerminalGestureHandler` and `TerminalGestureDetector`, plus the state's tertiary methods. If middle-click ever needs distinct handling, add it back deliberately. Cleanest because no caller depends on tertiary today.\n\nRecommendation: **option B**. Same logic as T-93's recommendation — the surface is documented but unwired and unused. Adding it back later with a real consumer + tests is cheaper than fixing dead surface today.\n\n**Aside:** there's a related dead branch in `onDragStart` (line 176):\n```dart\ndetails.kind == PointerDeviceKind.mouse\n ? renderTerminal.selectCharacters(details.localPosition)\n : renderTerminal.selectWord(details.localPosition);\n```\nThe `PanGestureRecognizer` in `TerminalGestureDetector` is registered with `supportedDevices: {PointerDeviceKind.mouse}` (gesture_detector.dart:143) — so non-mouse drags can't reach `onDragStart`. The `selectWord` else-branch is unreachable through the current wiring. Consider removing it as part of the same cleanup pass, or extending PanGestureRecognizer to accept touch.\n\n**Acceptance:**\n\n- Either:\n - **A:** Tertiary tap parameters on `TerminalView` exist and fire on middle-click with `button=middle`. Regression test verifies a middle click reaches the user callback with the resolved cell offset.\n - **B:** `onTertiaryTapDown` / `onTertiaryTapUp` removed from `TerminalGestureHandler`, `TerminalGestureDetector`, and the state's tertiary methods. Existing tests still pass.\n- The `selectWord` branch in `onDragStart` is either reachable (extend PanGestureRecognizer.supportedDevices) or removed.\n\n**Surfaced from:** T-91 ui/ gesture sweep. The `onTertiaryTap*` lines (gesture_handler.dart:147-152) showed as uncovered in the lcov diff — the gestures sweep skipped writing tests for them because they're unreachable production code.\n\n**Cross-references:** T-91 (epic parent), T-93 (same shape on `onTapUp`), T-89 (coverage epic).\n",
"status": "backlog",
"priority": "medium",
"created_at": "2026-05-08 10:48:59",
"updated_at": "2026-05-08 11:01:01"
}
],
"ticket_deps": null,
@@ -4512,6 +4522,12 @@
"old_value": "backlog",
"new_value": "cancelled",
"changed_at": "2026-05-07 19:08:52"
},
{
"ticket_id": "T-95",
"field": "description",
"new_value": "**File:** `lib/src/terminal/src/ui/gesture/gesture_handler.dart` (build wiring + state-method body) + `lib/src/terminal/src/ui/gesture/gesture_detector.dart` (dead public API).\n\n**Bug:** Middle-clicks (\"tertiary tap\") are routed through the wrong handler chain, and even the unreachable target carries a button-enum typo. Same shape as T-93 but on a different gesture pair.\n\nTrace:\n\n1. `TerminalGestureHandler.build` (gesture_handler.dart:6582) wires:\n ```dart\n onTertiaryTapDown: onSecondaryTapDown,\n onTertiaryTapUp: onSecondaryTapUp,\n ```\n Right-hand sides are the state's `onSecondaryTapDown` / `onSecondaryTapUp` *methods* (lines 138144), not the tertiary equivalents. So a middle-click reaches `_tapDown(widget.onSecondaryTapDown, details, TerminalMouseButton.right)` — i.e. fires the **secondary** callback with **button=right**.\n2. The state's `onTertiaryTapDown` and `onTertiaryTapUp` methods (lines 147152) are therefore **dead** — they're declared but never invoked anywhere.\n3. `onTertiaryTapUp` at line 152 has a copy-paste error: `TerminalMouseButton.right` where the function is named tertiary and the comment paragraph clearly intends middle. Even if the wiring were correct, the button reported on tertiary-up would be wrong.\n4. The `onTertiaryTapDown` / `onTertiaryTapUp` *parameters* on `TerminalGestureHandler` (lines 2425, 4547) and `TerminalGestureDetector` (lines 1314, 3031) are **dead public surface** — no in-tree caller passes them, like T-93's `onTapUp`.\n\n**Two layers of \"dead\" again:**\n\n- The wiring is wrong, so middle-clicks dispatch as if they were right-clicks.\n- The public API to receive proper middle-click notifications doesn't reach any caller, so even if a consumer passes `onTertiaryTapDown:` to `TerminalView`, it would do nothing today (TerminalView doesn't expose tertiary callbacks).\n\n**User-visible impact:**\n\nA consumer relying on right-click for context-menu behaviour on `TerminalView` will accidentally trigger that menu on middle-click as well, which is wrong on every desktop platform (middle-click is conventionally paste / scroll-wheel-button). Tests of secondary-tap will pass for both right- and middle-clicks, masking the issue.\n\n**Resolutions, like T-93:**\n\n- **A. Fix the wiring + typo.** In `TerminalGestureHandler.build`, change `onTertiaryTapDown: onSecondaryTapDown` to `onTertiaryTapDown: onTertiaryTapDown` (and same for Up). Fix line 152's `TerminalMouseButton.right` → `middle`. Adds a parameter on `TerminalView` (`onTertiaryTapDown` / `onTertiaryTapUp`) so consumers can register middle-click handlers. Test surfaces the new path.\n- **B. Delete the dead surface.** Remove `onTertiaryTapDown` / `onTertiaryTapUp` parameters from both `TerminalGestureHandler` and `TerminalGestureDetector`, plus the state's tertiary methods. If middle-click ever needs distinct handling, add it back deliberately. Cleanest because no caller depends on tertiary today.\n\nRecommendation: **option B**. Same logic as T-93's recommendation — the surface is documented but unwired and unused. Adding it back later with a real consumer + tests is cheaper than fixing dead surface today.\n\n**Aside:** there's a related dead branch in `onDragStart` (line 176):\n```dart\ndetails.kind == PointerDeviceKind.mouse\n ? renderTerminal.selectCharacters(details.localPosition)\n : renderTerminal.selectWord(details.localPosition);\n```\nThe `PanGestureRecognizer` in `TerminalGestureDetector` is registered with `supportedDevices: {PointerDeviceKind.mouse}` (gesture_detector.dart:143) — so non-mouse drags can't reach `onDragStart`. The `selectWord` else-branch is unreachable through the current wiring. Consider removing it as part of the same cleanup pass, or extending PanGestureRecognizer to accept touch.\n\n**Acceptance:**\n\n- Either:\n - **A:** Tertiary tap parameters on `TerminalView` exist and fire on middle-click with `button=middle`. Regression test verifies a middle click reaches the user callback with the resolved cell offset.\n - **B:** `onTertiaryTapDown` / `onTertiaryTapUp` removed from `TerminalGestureHandler`, `TerminalGestureDetector`, and the state's tertiary methods. Existing tests still pass.\n- The `selectWord` branch in `onDragStart` is either reachable (extend PanGestureRecognizer.supportedDevices) or removed.\n\n**Surfaced from:** T-91 ui/ gesture sweep. The `onTertiaryTap*` lines (gesture_handler.dart:147-152) showed as uncovered in the lcov diff — the gestures sweep skipped writing tests for them because they're unreachable production code.\n\n**Cross-references:** T-91 (epic parent), T-93 (same shape on `onTapUp`), T-89 (coverage epic).\n",
"changed_at": "2026-05-08 11:01:01"
}
]
}
+79
View File
@@ -339,6 +339,85 @@ void main() {
});
});
group('TerminalView — selection gestures', () {
// Cover the gesture_handler.dart selection paths and the gesture_detector
// double-tap detection branch. Each test sets up a TerminalView with a
// controller it can inspect; the gestures are wired into the
// RenderTerminal which mutates `controller.selection`.
// Empty cells (codepoint 0) and ASCII space are word separators in
// `defaultWordSeparators`, so taps must land on a non-separator cell for
// selectWord to return non-null. Write a wide stripe of 'a's at row 0
// and tap near the top-left so the gesture lands on actual content.
Offset contentPosition(WidgetTester tester) {
final tl = tester.getTopLeft(find.byType(TerminalView));
return tl + const Offset(20, 5);
}
testWidgets('double-tap sets a word selection on the controller', (tester) async {
final t = _OutputRecorder().build();
t.write('a' * 30);
final controller = TerminalController();
addTearDown(controller.dispose);
await tester.pumpWidget(_host(TerminalView(t, controller: controller)));
await tester.pump();
final pos = contentPosition(tester);
// Two tap-up cycles within kDoubleTapTimeout (~300 ms). The second
// tap-down hits the within-tolerance branch in gesture_detector and
// fires onDoubleTapDown, which in turn calls renderTerminal.selectWord.
await tester.tapAt(pos);
await tester.tapAt(pos);
await tester.pump(const Duration(seconds: 1));
expect(controller.selection, isNotNull);
});
testWidgets('long-press (touch) selects a word', (tester) async {
final t = _OutputRecorder().build();
t.write('a' * 30);
final controller = TerminalController();
addTearDown(controller.dispose);
await tester.pumpWidget(_host(TerminalView(t, controller: controller)));
await tester.pump();
final pos = contentPosition(tester);
final gesture = await tester.startGesture(pos, kind: PointerDeviceKind.touch);
// LongPressGestureRecognizer's threshold is kLongPressTimeout (~500 ms);
// pump past it to win the gesture.
await tester.pump(const Duration(milliseconds: 600));
// onLongPressStart → renderTerminal.selectWord → controller.selection set.
expect(controller.selection, isNotNull);
// Move during long-press → onLongPressMoveUpdate, second branch of
// selectWord with two offsets.
await gesture.moveBy(const Offset(40, 0));
await tester.pump();
expect(controller.selection, isNotNull);
await gesture.up();
await tester.pump(const Duration(seconds: 1));
});
testWidgets('mouse drag selects characters (selectCharacters branch)', (tester) async {
final t = _OutputRecorder().build();
t.write('a' * 30);
final controller = TerminalController();
addTearDown(controller.dispose);
await tester.pumpWidget(_host(TerminalView(t, controller: controller)));
await tester.pump();
final pos = contentPosition(tester);
final gesture = await tester.startGesture(pos, kind: PointerDeviceKind.mouse);
// PanGestureRecognizer needs movement beyond kPanSlop to win — push
// past it before reading the selection.
await gesture.moveBy(const Offset(40, 0));
await tester.pump();
// onDragStart fired with mouse kind → selectCharacters(from); subsequent
// onDragUpdate → selectCharacters(from, to). Either way, controller has
// a selection.
expect(controller.selection, isNotNull);
await gesture.moveBy(const Offset(20, 0));
await tester.pump();
expect(controller.selection, isNotNull);
await gesture.up();
await tester.pump(const Duration(seconds: 1));
});
});
group('TerminalView — keyboard visibility', () {
testWidgets('platform keyboard show fires _onKeyboardShow on the focused view', (tester) async {
final t = _OutputRecorder().build();