fix(mobile): preserve settings across foldable postures#162
Conversation
|
Thank you very much for testing and using it on a folding phone! Great catch: the settings namespace was chosen from the instantaneous viewport width, so unfolding past the desktop breakpoint silently switched the device to the desktop settings blob. Keeping layout width-driven while the settings identity follows the physical device is exactly the right split. Reviewed in detail and verified locally on top of your branch:
One note for the record: the single failing test elsewhere in test/mobile/settings.test.ts (mobile defaults expecting subagentTrackingEnabled to be false) is pre-existing drift on master, unrelated to this change (that default was deliberately changed to true a while back and this suite is excluded from CI, so the assertion was never updated). Merging. Thanks again! |
…olo renders Resolves the CLAUDE.md paragraph conflict with Ark0N#162, skips the windowTitle recompute for solo-session renders so a detached window cannot reset the push-notification hostTitle prefix to the default, and prettier-formats test/mobile/devices.ts (came in unformatted via the Ark0N#162 merge; CI format:check only covers src/**). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Summary
codeman-app-settings-mobilewhen an Android foldable unfolds past the desktop breakpointProblem
Codeman chose its local settings namespace from the current viewport width. On a foldable phone, unfolding changed the viewport from phone width to desktop width and a WebView reload switched from
codeman-app-settings-mobiletocodeman-app-settings. Device-local opt-ins such as Response Viewer and Extended Keyboard Bar consequently disappeared.Fix
MobileDetection.getDeviceType()remains width-based for responsive layout. The settings namespace and mobile defaults now useMobileDetection.isHandheldDevice(), a stable touch + user-agent/client-hint classification that does not change with fold posture.Validation
isHandheldDevice()stays truenpm run typechecknpm run lintnpm run check:frontend-syntaxnpm run format:checknpm run buildAlso validated against live Codeman deployments using a fresh authenticated browser context at the unfolded Find N5 viewport.