Skip to content

Mobile: confirm account actions and safely clean account-owned connections #2603

Closed

Description

@DoodleBears

Problem / Human requirement

Both mobile Sign out and Delete account need an explicit second confirmation explaining their actual account and remote Host effects. Cancel/dismiss must have zero side effects; only explicit confirmation may execute. Keep sign-out distinct from permanent account deletion. This is independent functional work following #2581; do not expand color/alignment PR #2602 or reuse #2601 merge authorization.

Verified current behavior at f95bca7

  • apps/mobile/src/ui/account-hosts.tsx: Sign out directly calls run('signOut'); no dialog. Delete uses confirmDestructive, with Cancel having no callback and only the destructive button calling run('deleteAccount').
  • host/connect-account.ts: signOut serializes save(undefined) only. native-connect-account.ts deletes SecureStore botharness.connect-account.v1; no account-change event, hostSession callback or binding removal occurs. Local account rows/selection clear after success. This is not remote logout or revocation of existing Host credentials.
  • Saved pairings live separately at deepseekbot.hosts.v3 (legacy deepseekbot.host.v2). SavedHost contains Host ID/routes/device credential/encryption but NO account subject or acquisition provenance. use-pairing.ts saves account-discovered and manual pairs through the same hostSession.pair(host). Account sign-out does not stop the active paired Host client or clear these records.
  • Delete calls authenticated relay DELETE /v1/account, then clears local account session only after HTTP 200. Relay marks the account deleted FIRST, then removes each owned Host tunnel, DNS and relay Host row, then the WorkOS user. No remote Host filesystem/Bot/chat deletion call and no local pairing deletion. Manual/Tailscale pairing records remain. Manual pairings that use that account's Connect tunnel also lose that route when the tunnel is removed, even though their local record is retained.
  • Existing Delete copy says account deletion unlinks computers and blocks Connect access. It does not explain retained local pairings, preserved remote data, or partial failure. Sign-out has no impact copy at all.
  • Failure is not transactional: relay 502 may follow tombstone/tunnel/row removal. Retry with valid auth can resume deletion; success followed by failed local SecureStore clear, or lost response after server success, also needs explicit handling. Do not promise rollback or guaranteed retry once credentials stop refreshing.

Separate PR contract

Implement in a new issue branch/PR, keeping #2602 untouched. No production operation or merge is authorized by this issue.

  1. Native second confirmation for BOTH actions, bilingual concise impact text, explicit Cancel and action button; no network/token refresh/storage/pairing/client changes merely opening or cancelling. Recheck busy and identity at confirmation so duplicate/stale dialogs cannot apply to a different signed-in account.
  2. Define and persist trustworthy account-pairing provenance before adding cleanup. An authenticated stable account subject plus issuer/relay belongs on pairings created through that account; email, Connect hostname, current Host membership or merely using Connect is not proof of acquisition ownership. Preserve manual, QR/Tailscale, other-account and legacy unknown-source pairings. Legacy entries must not be silently assigned to the current user. Account session also currently lacks a stable subject, so acquisition/migration must be addressed explicitly.
  3. Intended Sign out scope: remove this phone's session and only phone pairings proven to originate from that account; stop corresponding local connections. Do not globally unlink server Hosts, delete account, revoke other devices or delete remote data. Define local-cache/push cleanup and failure ordering before reusing hostSession.unpair, which also performs remote credential revocation and local draft/cache cleanup.
  4. Intended Delete scope: retain existing account-wide Connect unlink + permanent WorkOS deletion, plus cleanup of proven account-owned local pairings. Explain that Connect routes are removed for every device using those links. Preserve unrelated/unknown local records and remote Host files/Bots/chats. Avoid implying a manual Connect route survives account-wide tunnel deletion.
  5. Failure/retry state must distinguish pre-request refusal, partial/unknown remote deletion, successful remote deletion with local cleanup failure, and retryable local cleanup. No “nothing changed” or blind repeat guarantee after a destructive request. Ensure another account's credentials are never used to retry an old account deletion.

Proposed bilingual confirmation copy

These are target-contract drafts, not descriptions of code already implemented. Final wording must match the implemented cleanup/migration semantics.

  • Sign out of this phone? / 退出此手机上的登录?
    • EN: “Sign out and remove this account's saved computer connections from this phone. Your account, computers and their data remain. Connections added manually or with an unknown source stay on this phone.”
    • ZH: “退出登录,并移除此手机中归属该账号的电脑连接。账号、电脑及其数据会保留。手动添加或来源不明的连接仍保留在此手机上。”
    • Cancel / 取消 · Sign out / 退出登录
  • Permanently delete your account? / 永久删除账号?
    • EN: “Delete your account and all its DeepSeekBot Connect links. Devices will lose access through those links. This phone will remove connections saved through this account; manual or unknown-source entries stay. Files, Bots and chats on your computers are not deleted. This cannot be undone.”
    • ZH: “删除账号及其全部 DeepSeekBot Connect 关联,所有设备将无法再通过这些关联访问电脑。此手机会移除通过该账号保存的连接;手动或来源不明的记录会保留。电脑上的文件、Bot 和聊天不会删除。此操作无法撤销。”
    • Cancel / 取消 · Delete account / 删除账号

Until account-owned cleanup exists, truthful sign-out text must instead say it signs out on this phone and leaves saved computer connections intact. Do not ship target copy ahead of target behavior.

Safe fixture acceptance

Use only task-owned injected runtimes/stores/relay fakes and later an isolated authorized native account fixture. Never click Human Sign out/Delete; no production account deletion or shared QA-tree modifications.

  • Cancel, dismiss/back and stale/duplicate dialog: zero account/Host API calls, token refreshes, storage writes, disconnects or revocations; unchanged selection/drafts/push state.
  • Confirm Sign out: only owned local pairings/session removed; corresponding active client stops; manual/Tailscale/QR, other-account and unknown legacy pairings and remote resources intact. Offline Host and account switch cases included.
  • Confirm Delete: only matching account's relay resources/user plus eligible local records; other-account resources intact. Manual Connect records retained but route loss accurately explained.
  • Fault injection: session store failure; saved-pairing store failure; tunnel/DNS/WorkOS failures mid-delete; timeout/lost response; deletion succeeds but local clear fails; retry with expired refresh token; no second operation on another account. Assert truthful error state and recoverability without claiming rollback.
  • Both native platforms: dialog copy/buttons, Cancel and confirm using safe fixture, default/intermediate/maximum text × light/dark, screen-reader labels, busy/inertness and duplicate tap. Sole QA owner assigns a fresh cut; Batch58 RELEASED, no environment reuse.

Tracking

Source audit by Codex task codex/local/01a164b0-214b-7371-bf06-ca7c00c54137. No functional implementation claim/PR yet; this issue captures the exact separate delivery scope and current gaps. Color source f95bca7 remains unchanged; #2602 needs independent Human optical/merge review. Functional PR will require its own claim, tests, native safe-fixture evidence and separate merge authorization.

Activity

  1. DoodleBears commented on Oct 22, 2026

    @DoodleBears
    ContributorAuthor

    Agent work claim

    • Agent: Codex
    • Task: codex/local/01a164b0-214b-7371-bf06-ca7c00c54137 (not a DSH Session)
    • Issue scope: both-action native confirmation, proven account-owned local pairing cleanup, truthful deletion failure/retry handling and isolated safe fixture; independent of fix(mobile): color and align account action symbols #2602 colors
    • Branch: codex/2603-account-confirmation
    • Started: 2026-10-23 UTC
    • State: active; Human explicitly authorized implementation and coordinated native testing. No merge or production account actions authorized.
  2. added
    agent:activeOne or more coding-agent tasks currently claim this issue; see claim comments for task IDs
    on Oct 22, 2026
  3. DoodleBears commented on Oct 22, 2026

    @DoodleBears
    ContributorAuthor

    Agent work continuation

    • Agent: Codex
    • Task: codex/local/01a164fc-d3fd-7d10-9e86-415381f16211 (not a DSH Session)
    • Continues the same T3 task and branch codex/2603-account-confirmation after the prior provider run expired; prior task codex/local/01a164b0-214b-7371-bf06-ca7c00c54137 is not working in parallel.
    • Checked issue comments and Draft fix(mobile): confirm account actions and clean owned connections #2604: no competing claim.
    • Scope: address independent review findings, verify safe fixtures and hand the exact source to the sole native QA owner. fix(mobile): color and align account action symbols #2602 remains separate.
    • State: active. Human authorized continuation; no merge, deployment or real account operations.
  4. DoodleBears commented on Oct 22, 2026

    @DoodleBears
    ContributorAuthor

    Agent work handoff

    • Tasks: codex/local/01a164b0-214b-7371-bf06-ca7c00c54137 (initial implementation), codex/local/01a164fc-d3fd-7d10-9e86-415381f16211 (review fixes and native handoff).
    • State: handed-off for native QA; source owner remains available for findings.
    • Draft fix(mobile): confirm account actions and clean owned connections #2604 head 05b20d6d3c3841a800054f26a993e8ee541391c6, integrated main/base bdcc996a1ae1fa6d83439647bda4e4643b2b21ae. Independent of color PR fix(mobile): color and align account action symbols #2602.
    • Implemented both confirmations, provenance-scoped cleanup, stable legacy sign-in identity, durable journals, observed-success retry, explicitly confirmed local-only recovery and a safe dev fixture. Unreadable startup storage cannot falsely complete sign-out.
    • 1,254 mobile tests pass, 9 skipped; typecheck/lint/format/ledger/diff pass. Independent Standards/Spec findings resolved.
    • Next-batch READY sent to the sole native QA owner. Remaining: safe fixture native dialogs/interactions/accessibility and screenshots, real-device status, separate live-service qualification and Human acceptance. No Human account action, merge, release or deployment.
  5. removed
    agent:activeOne or more coding-agent tasks currently claim this issue; see claim comments for task IDs
    on Oct 22, 2026
  6. DoodleBears commented on Oct 22, 2026

    @DoodleBears
    ContributorAuthor

    Agent work claim — successor

    • Agent: Codex
    • Task: codex/local/01a16534-c59b-7a90-b7b9-d2aa1149c60f (not a DSH Session)
    • Issue scope: receive fix(mobile): confirm account actions and clean owned connections #2604 native QA results from the existing sole device runner, address only concrete findings, preserve the independent fix(mobile): color and align account action symbols #2602 scope and Draft state.
    • Branch: codex/2603-account-confirmation; verified clean head 05b20d6d3c3841a800054f26a993e8ee541391c6.
    • Started: 2026-10-22 20:05 UTC (2026-10-23 JST).
    • Supersedes the source handoff from codex/local/01a164fc-d3fd-7d10-9e86-415381f16211. Human explicitly transferred this work; the prior T3 source thread is settled and is not working in parallel. Latest issue comments contain no competing claim.
    • State: active, awaiting the existing QA owner's batch/result confirmation. READY is not a lease; no source-owned device, Host, Metro or native build. No merge, release, deploy or real-account deletion authorization.
    • Remote verification: fix(mobile): confirm account actions and clean owned connections #2604 is Draft at the same exact head; verify run 39838333218 passed its applicable jobs. Real-model scenarios skipped; CodeRabbit skipped Draft review. Current main is 843d84b1c304a6dfac4c405c1da70ebfe2512ed1; candidate retains integrated base bdcc996a1ae1fa6d83439647bda4e4643b2b21ae pending the next owner cut.
  7. added
    agent:activeOne or more coding-agent tasks currently claim this issue; see claim comments for task IDs
    on Oct 22, 2026
  8. DoodleBears commented on Oct 22, 2026

    @DoodleBears
    ContributorAuthor

    Agent work claim — integration-only successor

  9. DoodleBears commented on Oct 22, 2026

    @DoodleBears
    ContributorAuthor

    Agent work handoff — #2602 + #2604 integration only

    Task codex/local/01a1654c-9569-7cb3-a355-ed6c79137709; state handed-off for source-owner review and future owner-cut native QA. Integration claim.

    Published combo qa/2602-2604, exact head 1e0ef7e3af5d9462385f817002b40d882459884d. This is a source-tested integration candidate, not a Release acceptance SHA.

    Input Exact revision
    Fresh main 3fe369353b6a9f784341f24fba9b555fa2744eab
    #2602 620bf28da53739624bff07c3a148ea07cd6b1590
    #2604 05b20d6d3c3841a800054f26a993e8ee541391c6

    All three are ancestors of the published combo. Both source PR refs were read back unchanged after publishing. Main already contains #2609; recording diagnosis and Batch60 remain with their owner.

    Conflict resolution: keep #2602's AccountAction, account-sign-out testID, custom danger text/icon, scaled slot/optical offset, callback and disabled guard; take #2604's pendingDeletion ? cleanupConfirm : signOut label. That label also feeds the accessible name. Delete retains its destructive role. Against #2602's panel, the product adjustment is exactly this one label expression. Auto-merged account controller, account ownership/serialization, cleanup journal, pairing-save guard, error/retry and Android panel are unchanged from #2604. No additional product behavior or native inputs were introduced by the integration.

    Combined verification: mobile typecheck PASS; full mobile suite 1,265 passed / 9 skipped; repository lint PASS with existing warnings; formatting, ledger and diff checks PASS. Eight new tests traverse the actual iOS panel + account controller + closed in-memory fixture (native component adapters mocked): both confirmations, cancellation/no effects, duplicate submit, busy/loading, and five failure/recovery scenarios. Recovery preserves the visible and accessible copy, custom icon and style props; only proven owned connections are removed. Existing regressions cover stale identity, expired credentials, pairing races, durable cleanup/restart and actual HostSession client teardown. These are source/component checks, not native rendering, VoiceOver or live-service deletion evidence. Existing source change fragments remain sufficient; no second feature implementation or duplicate PR was opened.

    Remaining gates / QA: source owners review the exact combo, then the shared queue owner cuts a future account batch using this branch instead of separately merging #2602/#2604. Preserve the independent source owners and original PRs. No account device runner is assigned by this handoff. Qualify binary/native fingerprint and loaded JS at that cut; old Batch58 evidence and Batch60 Release package do not qualify this combo. Use /qa/account-actions?scenario=success only with both __DEV__ and .dev app ID, verify the fixture title and fixture@example.invalid, reset between actions. Capture English/Chinese × light/dark × default/intermediate/maximum: red text/icons, optical alignment, wrapping, visible/accessibility names, disabled/busy inertness, both consequence dialogs and Cancel. Exercise local-write, session-write, delete-partial, expired-retry, completion-write; compare counters before opening/after Cancel/after confirmation, reject duplicate/stale confirmations, preserve manual/legacy/other records, and distinguish local-only cleanup from remote deletion. Android/native accessibility and Human optical/behavior acceptance remain separate and pending. No real account operations.

    Resources and authority: isolated source worktree and private logs retained; installer, typecheck, lint/format and test processes exited, no matching task test worker remained. No Host, Metro, watcher, preview, tunnel, browser driver, Simulator, native build or phone operation started by this task; no task listener needs release. Shared QA resources untouched. No main merge, release/deploy, install/signing or real-account deletion authorization used. The combo owner retains branch cleanup responsibility after both original PRs merge; do not delete source or evidence now.

  10. added a commit that references this issue on Oct 22, 2026
  11. DoodleBears commented on Oct 22, 2026

    @DoodleBears
    ContributorAuthor

    Agent work completed — authorized account integration merge

    • Task: codex/local/01a1654c-9569-7cb3-a355-ed6c79137709; state completed for integration/source merge. Source owners retain native/functional follow-up.
    • Human explicitly instructed merge after the handoff disclosed remaining review/native/Human gates. #2611 merged normally at 0f6ca29bd99514d76b90c5018a78ebe06d33c3f3, 2026-10-22 21:07:20 UTC / 2026-10-23 06:07:20 JST. No administrator bypass used.
    • Exact tested head 1e0ef7e3af5d9462385f817002b40d882459884d, base 3fe369353b6a9f784341f24fba9b555fa2744eab; merge tree equals tested tree 84323c29aecf36cb1d722a289d448d15595ace03. Both source heads remain ancestors. GitHub automatically marked fix(mobile): color and align account action symbols #2602 and fix(mobile): confirm account actions and clean owned connections #2604 MERGED; their original branch refs remain unchanged.
    • Full CI 39853253941 PASS: static/type/build, all three test shards, mobile verification, Android module tests, docs and isolated Host smoke. Real-model E2E was skipped. Local combined mobile checks were 1,265 passed / 9 skipped. CodeRabbit was still PENDING at merge, with no posted reviews or line findings; it was not a required repository check. No automatic review approval is claimed.
    • Future account QA intake now uses main containing 0f6ca29bd99514d76b90c5018a78ebe06d33c3f3, replacing the combo branch. Safe fixture/native screenshot, VoiceOver, Android and Human optical/behavior gates remain pending. This is not Release acceptance or publication; no account operation, phone install or shared QA resource action was performed.
    • Per combo lifecycle rules, remote qa/2602-2604 was deleted only after both source PRs were merged. Exact commit, PR and private evidence remain retained; original source branches and main checkout work remain untouched. No task runtime services were started or left running. agent:active remains while other source/Release claims are active.
  12. DoodleBears commented on Oct 22, 2026

    @DoodleBears
    ContributorAuthor

    Human-authorized issue closure

    Closing at the Human's explicit request following the merge of #2611 (0f6ca29bd99514d76b90c5018a78ebe06d33c3f3), which includes #2602 and #2604. Implementation and integration are merged; full combined CI passed.

    This closure does not mark the remaining native fixture, accessibility, Human optical/behavior or live-service checks as passed. Their exact-source checklist remains in the shared device QA queue and the integration/QA handoff. Existing source owners retain follow-up on concrete findings. CodeRabbit is still pending at this closure; no automatic-review approval is claimed. No release/deployment, device operation or real-account action is authorized by closing this issue.

    Task: codex/local/01a1654c-9569-7cb3-a355-ed6c79137709.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    agent:activeOne or more coding-agent tasks currently claim this issue; see claim comments for task IDs

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions