Files
opencode-mobile/.tasks/10/worklog.md
Den 32f7af4e11 fix(sessions): recover home-scoped list after fresh connect
* fix(sessions): use active connection client directly, remove roots filter

Root cause A: loadSessions was calling clientForDirectory(serverHome) which
scoped the session list to /home/azureuser — a different project than the
server's active CWD. Sessions in the current project (e.g. opencode-mobile)
were never returned.

Root cause B: roots:true filtered out sessions that have a parentID (sub-task /
AUTO-REVIEW sessions), hiding valid sessions from the list.

Fix: use connState.client directly (the connection's active directory) and drop
the roots filter so all sessions for that project are visible.

Also adds a verify_session_list CUA smoke scenario that navigates back to the
sessions tab after creating a session and asserts the list is non-empty —
covering the regression path that was previously untested.

* fix(sessions): fetch serverHome in addConnection so loadSessions shows correct sessions

Root cause: addConnection() built the HTTP client but never fetched serverHome
(only loadConnections and setActiveConnection did). When the user adds a new
connection (fresh install / first sign-in), serverHome = null, so loadSessions
fell through to connState.client (the server's CWD). On this dev server the CWD
is the deploy directory — 11 old May-19 sessions that are not the user's recent
work sessions.

Fix: addConnection now fetches currentProject + serverHome via the same
Promise.all as setActiveConnection, before calling set(). This ensures
loadSessions immediately uses clientForDirectory(serverHome) → the global
project → the user's actual recent parent sessions.

Also adds --opencode-url flag to the CUA smoke script, which appends a
connect_and_verify_sessions scenario that reproduces the regression:
  python scripts/android-cua-smoke.py --opencode-url http://100.108.64.76:4096

* fix(sessions): recover home scope after fresh connect

Resolve stale deploy-only session list by recovering server home during first load and keeping regression coverage in default Android CUA smoke and CI.

* chore(release): bump version to 0.4.0
2026-05-26 19:50:17 -07:00

1.3 KiB

  • cycle 1: created issue #10, initialized task state.
  • cycle 2: defined problem/goal/success metric in design doc.
  • cycle 3: expanded full design with alternatives, risks, and touched surface.
  • cycle 4: wrote parallelized implementation plan with balanced tradeoff.
  • cycle 5: autopilot approved plan; real smoke failed due debug bundle/Metro dependency and telemetry consent modal blocking flow.
  • cycle 6: reproduced stale deploy-only sessions on release app after connect; confirmed server default scope=11 vs home scope=27.
  • cycle 7: implemented loadSessions fallback to fetch/persist server home when missing, plus connection-switch guard.
  • cycle 8: hardened CUA runner with app-foreground prep and targeted telemetry-consent dismissal.
  • cycle 9: built/install patched release APK; manual deterministic fresh-state connect flow now shows home-scoped sessions (workspace + dental entries), not deploy-only list.
  • cycle 10: independent review flagged 3 warnings; fixed race and over-broad consent fallback; review rerun pending.
  • cycle 11: added default connect-and-verify scenario coverage in CUA script + CI workflow; final implementation review now PASS.
  • cycle 12: re-ran real feature testing from fresh app state; deterministic ADB assertions + focused CUA both PASS; test-report refreshed.