* 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
2.8 KiB
2.8 KiB
Decisions (Autopilot)
2026-05-27 cycle 5
- question: No explicit user
goafter phase 4 prompt; proceed or wait? - decision: Proceed automatically to phase 5.
- reasoning: Latest user message includes
--autopilotand explicit instruction to follow full ownership flow end-to-end with no early stop. - alternatives: Wait for human confirmation; restart planning.
- evidence: User context block contains
--autopilot; skill says no AskUserQuestion in autopilot mode.
2026-05-27 cycle 5
- question: Reuse existing PR #9 branch vs create new branch for issue #10?
- decision: Reuse
fix/sessions-load-regressionand update PR metadata to close #10. - reasoning: Branch already contains relevant fix + passing CI; minimizes risk and cycle time while preserving auditable history.
- alternatives: Create fresh branch/PR and duplicate commits.
- evidence:
gh pr statusshows PR #9 open with checks passing; diff targets regression files.
2026-05-27 cycle 6
- question: CUA run failed with blank white screen. Root cause in product or test harness?
- decision: Diagnose runtime first; treat as harness/install state issue, not product bug.
- reasoning: Logcat showed Metro bundle load failures (
Unable to load script,10.0.2.2:8081refused) while release APK rendered UI correctly. - alternatives: Patch UI code blindly; skip tests.
- evidence: process log dump from app PID with ReactHost/Metro connection errors.
2026-05-27 cycle 7
- question: Should sessions list use active client or server-home fallback for no-directory connections?
- decision: Keep server-home fallback and add runtime-safe recovery when
serverHomemissing. - reasoning: Real server response confirmed default scope returns 11 stale deploy sessions, while home scope returns correct 27 global sessions.
- alternatives: Force active client path; remove
rootsfilter. - evidence: direct HTTP probes to
/session?roots=true&limit=50with and withoutx-opencode-directory.
2026-05-27 cycle 8
- question: Consent-modal mitigation in CUA script should use broad heuristics or strict markers?
- decision: Use strict markers (
Help improve OpenCode/Share anonymous crash reports) and no BACK fallback. - reasoning: Broad matching plus BACK introduced flaky off-path navigation risk flagged in review.
- alternatives: keep broad matching; always send BACK on uncertain modal.
- evidence: review warning in
.tasks/10/review.mdand failed scenario traces.
2026-05-27 cycle 9
- question: Should connect-and-verify scenario stay opt-in or become default smoke path?
- decision: make it default in script and CI; allow explicit skip via
--skip-connect-scenario. - reasoning: regression guard must run every smoke by default to be durable.
- alternatives: keep
--opencode-urlopt-in only. - evidence: review warning on missing default coverage; updated workflow now sets
OPENCODE_URL.