feat(demo): add offline demo mode for zero-server activation (#108)
Installers with no self-hosted opencode server hit a dead end at the empty Sessions state, contributing to ~0% 7-day retention. Adds a fully offline, scripted /demo route reusing the real chat components (MessageBubble, ToolCallCard/DiffView, PermissionPrompt) so new users can see what opencode does before connecting anything, then funnels them to Connect / the setup guide. - src/lib/demo-script.ts: pure, hardcoded Message/Part fixture builder (no RN/store/network imports) — the isolation guarantee. - app/demo.tsx: new /demo route rendering the scripted conversation via useMemo'd local state only; permission reply is local setState, never sessionClient.permission.reply(). - app/(tabs)/index.tsx: "Try a demo" button added to the no-connection empty state, placed after the existing add-connection-button so its position/testID for existing Maestro flows is unchanged. - .maestro/flows/demo.yaml: new E2E flow covering the empty-state CTA through conversation, diff expand, permission approve, and the CTA reaching the real connect form. - scripts/run-e2e-flows.sh: registers demo in NEWER_FLOWS (non-blocking) so it actually runs in CI. - i18n: new sessionsList.empty.tryDemoButton and demo.* keys added to both en.json and zh-Hans.json (catalog-parity verified). npm run typecheck: clean. npm test: 175/175 passing. Co-authored-by: engineer <engineer@macbookpro.lan>
This commit is contained in:
@@ -27,7 +27,9 @@ APK="android/app/build/outputs/apk/release/app-release.apk"
|
||||
# selectors/seeding surface) and moving each back into CORE once confirmed
|
||||
# green.
|
||||
CORE_FLOWS=(activation-positive activation-negative-401)
|
||||
NEWER_FLOWS=(directory-picker all-sessions variant-picker diff-scroll)
|
||||
# demo.yaml (offline "Try a demo" mode) needs no mock server — it never
|
||||
# connects — so it's safe to run alongside the others here unmodified.
|
||||
NEWER_FLOWS=(directory-picker all-sessions variant-picker diff-scroll demo)
|
||||
mkdir -p "$ROOT/artifacts/screenshots" "$ROOT/artifacts/diag"
|
||||
|
||||
echo "== installing APK =="
|
||||
|
||||
Reference in New Issue
Block a user