diff --git a/AGENTS.md b/AGENTS.md index 34140a57..bce5b2b2 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -45,6 +45,6 @@ Update relevant rules, skills and documentation when they are the requested task ordinary feature work can leave a focused docs/notes entry instead. Use the current-source skill installer to refresh managed installed skills. Do not restart a shared service over active work. Do not use the personal Fold -for tests; it is a delivery device. Follow the device leases in app/AGENTS.md. +for tests; it is a delivery device. Follow the device safety guidance in app/AGENTS.md. Ask only for genuinely missing decisions or destructive/out-of-scope actions, not routine steps already covered by the user's request. diff --git a/app/AGENTS.md b/app/AGENTS.md index 6f499545..7193a754 100644 --- a/app/AGENTS.md +++ b/app/AGENTS.md @@ -5,7 +5,7 @@ - This Flutter app is the only client: it replaced the former JavaScript web client and the Kotlin Android app. - No backend changes; report missing capabilities. - Standard Material and Cupertino controls, including buttons/menus in custom graphs/diffs/chat. System typography, theme colors, light/dark, content-driven layout and text scaling. No fixed row/bubble/button dimensions, bespoke palette or CSS token port. Platform differences are intentional. Centralize necessary layout constraints; do not ban legitimate native default spacing or graph coordinates. -- Develop and test on web by default; user-requested Android release APK builds and publication are allowed. Device testing/installations still require explicit authorization and the leases below: no ad-hoc ADB, emulators or device changes. Keep source portable to all three targets. Distinguish APK build/publication from on-device verification; report mobile behavior as unverified when no device test ran. +- Develop and test on web by default; user-requested Android release APK builds and publication are allowed. When the user authorizes device installation or testing, perform it directly on the named device; no pipeline stage or resource lease is required. Keep source portable to all three targets. Distinguish APK build/publication from on-device verification; report mobile behavior as unverified when no device test ran. - Small cohesive files (aim below 250 lines; split by responsibility, not arbitrary fragments). Each task owns a directory and its tests. Do not edit another lane or root pubspec/main unless assigned. - Code quality is a delivery requirement. No minified implementations, silent capability fallbacks, fake data masking missing features, or workarounds that bypass the real defect. A pipeline success does not waive missing behavior, native controls, regression coverage or rendered evidence. Label incomplete work honestly and complete it before claiming parity. - The manager drives authorized routine integration and recovery without repeatedly stopping for permission. Feature implementation stays in pipelines where appropriate; infrastructure blockers can be resolved directly within the user's authorized scope. Verify quiescence, preserve data and rollback, act, and report actual results. Ask only for genuinely new scope or unresolved destructive choices. @@ -22,7 +22,7 @@ Flutter: `/Users/alan/development/flutter/bin/flutter`; Dart beside it. Run pub Rendered changes require real browser interaction/captures; widget tests alone are not browser evidence. Use isolated loopback servers and OS-assigned ports. Browser automation may use Chrome DevTools, with independent scripts under `app/tool/`; do not modify legacy browser drivers. Never disable authentication on exposed services. Keep commits referenced; do not discard unrelated work or delete branches. Deploy only when requested by the user; preserve existing public URLs unless a cutover is part of that request. Land candidates per selected pipeline; manager verifies actual ancestry and records source, checks, landing and deployment separately. -## Devices and the resource pool (Android builds) +## Device testing The ADB executable is `/Users/alan/Library/Android/sdk/platform-tools/adb`. Use that absolute path (or explicitly add its directory to PATH); `adb: command @@ -35,15 +35,12 @@ run and the workspace. Build a scratch server, read back those states, and keep the owned server alive through all UI interactions. The export itself does not leave a server running or configure a device. Never use a dead scratch endpoint. -Only the **UI reviewer**, while its stage holds the runner-granted resource for its -visit, may use a device. Implementers and code reviewers do code, builds, unit -tests and source review only: **no adb, installs, captures, device-setting changes -or main-build restoration**. Never acquire a device using sleep/check loops. The -runner grants exactly one concrete member of the `android-devices` resource pool -and passes it to the stage as `resource_target`; take the `adb -s` target from -`resource_target.metadata.adb_serial` and do not choose a device yourself. +The manager may install, interact, capture and profile directly when authorized +by the user. Check for active shared work first, use an explicit `adb -s` serial, +preserve app data, and record and restore any device settings changed for testing. +Do not require a runner lease or a particular pipeline role. -The pool's two members are: +Known test devices are: - `phone-47241FDAS00DLK` — the operator's **Pixel 9 Pro XL**, adb serial `47241FDAS00DLK` (metadata `kind=phone`). @@ -66,10 +63,8 @@ Create controlled fixtures for changed screens/states (including human-decision on a scratch server/database and throwaway session; never depend on incidental production state, change a real operator session, or restart a deployed service. Use the configured authoritative endpoint, never a scratch URL as a project default. Keep all shell/ADB work -foreground and awaited: no detached/background processes may outlive the lease. -UI review includes restoring the captured original settings and main's build before its -successful return. Confirm every tool has exited. If capture, restoration or cleanup fails, -report the failure explicitly; do not claim verification or readiness. Uncertain termination -must fail closed and keep ownership quarantined, not delete a lock or expire it by age. -Return `output.resource_cleanup_confirmed=false` if restoration/readiness is uncertain; -that generic release veto retains the runner lease even if the harness reports idle. +foreground and awaited: do not leave test processes running after testing. +Restore the captured original settings after testing. Leave the user-requested +build installed unless they request otherwise. Confirm every test tool has exited. +If capture, restoration or cleanup fails, report the failure explicitly; do not +claim verification or readiness. diff --git a/app/notes/pixel9-back-gesture-verification.md b/app/notes/pixel9-back-gesture-verification.md new file mode 100644 index 00000000..74b33366 --- /dev/null +++ b/app/notes/pixel9-back-gesture-verification.md @@ -0,0 +1,52 @@ +# Pixel 9 Pro XL: chat Back gesture verification + +## Request and source + +The user explicitly authorized installation and direct testing on the connected +Pixel 9 Pro XL, and requested removal of the obsolete device-lease rules. +`AGENTS.md` and `app/AGENTS.md` no longer require runner leases or a UI-review +stage for authorized device work. Data preservation and the delivery-only Fold +restriction remain. + +`test/application/chat_scroll_back_test.dart` now exercises both ordinary Back +and Android's `flutter/backgesture` start/update/commit path after scrolling +to the top and back to the bottom. The predictive case asserts that the +Navigator actually enters a user gesture. The 13 focused router/chat tests and +focused analysis pass. These widget tests are not real-time performance tests. + +## Installed and tested + +- Device: Pixel 9 Pro XL, serial `47241FDAS00DLK`, Android 17, + physical display 1008x2244, density 360, gesture navigation. +- Installed the already-published release **0.1.29882413**, package + `net.awan.pipelines.next`, from `build/updates/pipelines.apk` using `adb install -r`. + This was not a newly built or fixed APK. The older `net.awan.pipelines` + installation was left intact; no app data was cleared. +- The default Tailscale hostname did not resolve on this phone. The final test + connection is the existing authenticated server at + `ws://10.0.0.75:8083/connect`. Its sign-in was used normally; authentication was + not disabled. An unsuccessful temporary USB mapping to the socket-only port + was removed. No shared service was restarted. +- Opened Chat, selected the existing **Pipelines Claude** conversation, scrolled + to the loaded history's top (`Load older` visible), then to its bottom, and + performed the native edge Back gesture. Did not press Load older, send a + message, or change its mode/model. +- Three recorded attempts: left-edge Back after captures; left-edge Back + immediately after the scroll sequence; and right-edge Back immediately after + the sequence. All returned to the chat list. The recordings inspected do not + show the reported 1–2 second stall. **The reported delay is not fixed or + disproven; it was not reproduced in these three attempts.** + +## Evidence and cleanup + +Local captures and videos: `build/pixel9-back-gesture/`, including +`12-back-gesture.mp4`, `14-immediate-roundtrip-back.mp4`, +`15-right-edge-roundtrip-back.mp4`, top/bottom screenshots and final UI dumps. +These contain private conversation content and were not published. +`dumpsys gfxinfo` reported zero sampled frames for the Flutter surface, so its +percentiles are not valid performance evidence. + +Touch visualization was restored after each recording. Display size/density and +screen timeout were not changed; the original stay-awake value was 7 and remains +7. Recorders were bounded and awaited. The requested release is left installed +and signed in on the chat list. No APK publication or server deployment occurred. diff --git a/app/test/application/chat_scroll_back_test.dart b/app/test/application/chat_scroll_back_test.dart index 8ddf8520..f97f9682 100644 --- a/app/test/application/chat_scroll_back_test.dart +++ b/app/test/application/chat_scroll_back_test.dart @@ -31,9 +31,10 @@ class _Gateway extends FakeChatGateway { void main() { // Wide windows keep the chat beside its list instead of pushing a page; that // layout is covered by test/features/chat/chat_list_detail_test.dart. - for (final width in [390.0]) { + for (final predictive in [false, true]) { + const width = 390.0; testWidgets( - 'list → chat → top → bottom → one system Back pops a real route at $width', + 'list → chat → top → bottom → one ${predictive ? 'predictive gesture' : 'system Back'} pops a real route at $width', (tester) async { SharedPreferences.setMockInitialValues({}); tester.view.physicalSize = Size(width, 844); @@ -146,7 +147,21 @@ void main() { gateway.emitEvent(chatStepFrame('running')); await tester.pump(); await tester.pump(); - await tester.binding.handlePopRoute(); + if (predictive) { + final route = ModalRoute.of(tester.element(transcript))!; + await _backGesture(tester, 'startBackGesture', progress: 0); + await tester.pump(); + expect(route.navigator!.userGestureInProgress, isTrue); + await _backGesture( + tester, + 'updateBackGestureProgress', + progress: 0.6, + ); + await tester.pump(const Duration(milliseconds: 16)); + await _backGesture(tester, 'commitBackGesture'); + } else { + await tester.binding.handlePopRoute(); + } await tester.pump(); await tester.pump(const Duration(milliseconds: 500)); await tester.pump(); @@ -165,3 +180,24 @@ void main() { ); } } + +Future _backGesture( + WidgetTester tester, + String method, { + double? progress, +}) => tester.binding.defaultBinaryMessenger.handlePlatformMessage( + 'flutter/backgesture', + const StandardMethodCodec().encodeMethodCall( + MethodCall( + method, + progress == null + ? null + : { + 'touchOffset': [5 + 300 * progress, 400], + 'progress': progress, + 'swipeEdge': 0, + }, + ), + ), + (_) {}, +);