fix(mobile): keep the Send on Enter draft when going Home

goHome() nulled activeSessionId without stashing the field, so picking the
session again cleared the draft. Stash it first.

Docs: src/web/CLAUDE.md lists cjkInputHoldUntilEnter among the per-device
keys the strict schema does not declare, and notes the sendEnterKey()
exception for the visible CJK field.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Kamil KaliszandClaude Opus 5.5 committed 2026-11-16 20:38:20 +01:00
1 parent 64ee504247
commit 80d719df5f
3 files changed
+12 -2

No files matched your search

+3
View File
@@ -11127,6 +11127,9 @@ class CodemanApp {
this._retireUrlSession();
// Home is a choice to leave the grid too; it is remembered for Tiles.
this.closeTileGrid?.({ keepStored: true, reselect: false });
// A Send on Enter draft goes with its session: the null below hides that
// session from the next _cleanupPreviousSession, which would clear it unstashed.
if (typeof CjkInput !== 'undefined' && this.activeSessionId) CjkInput.stashDraft?.(this.activeSessionId);
// Deselect active session and show welcome screen
this.activeSessionId = null;
try { localStorage.removeItem('codeman-active-session'); } catch {}