openpencil/apps/web/src
Fini 160ab4c86c fix(ai): isMobileFullScreen treats narrow + multi-subtask as mobile
User-reported 2026-05-10: DeepSeek "Bistro" mobile food app shipped
without the iOS status-bar chrome that the orchestrator is supposed
to inject for every mobile screen.

Forensic chain: status-bar injection at orchestrator.ts:916/977 is
gated by `isMobileFullScreen(plan)`, which required
`plan.rootFrame.height >= 480`. The LLM plan came back with width=375
but a non-numeric height ("fit_content" or similar). The plan parser's
`asNonNegativeNumber` rejected the string and fell back to the
landing-page preset's `rootHeight: 0`. So the runtime check saw
height=0 → returned false → no status bar.

Fix: when width is mobile-shaped (≤480) and declared height isn't
the canonical tall-page number, fall back to the subtask count. A
plan with 2+ subtasks is structurally a multi-section mobile page;
a Type 0 component (single card / badge / modal) is always 1 subtask.
The new branch keeps Type 0 components correctly classified as
non-mobile-screen (no chrome injection, no mobile-app skill) while
catching real mobile pages whose height got lost in plan coercion.

Tests: 7 cases covering the canonical mobile, desktop, Type 0, and
the new narrow + height-0 + multi-subtask path.
2026-05-10 15:10:00 +08:00
..
__tests__ V0.7.0 (#95) 2026-04-11 23:25:13 +08:00
canvas fix(ai): clean card-image corners + strip wrapper stroke/cornerRadius with fill 2026-05-09 21:42:00 +08:00
components Merge origin/v0.8.0 into feat/rust-ification 2026-05-03 21:00:00 +08:00
constants V0.7.0 (#95) 2026-04-11 23:25:13 +08:00
hooks V0.7.3 (#111) 2026-04-15 22:19:12 +08:00
i18n V0.7.1 (#102) 2026-04-13 21:30:23 +08:00
lib fix(ai): refresh DeepSeek defaults to v4 model series 2026-04-26 06:29:53 +08:00
routes V0.7.0 (#95) 2026-04-11 23:25:13 +08:00
services fix(ai): isMobileFullScreen treats narrow + multi-subtask as mobile 2026-05-10 15:10:00 +08:00
stores Merge origin/v0.8.0 into feat/rust-ification 2026-05-03 21:00:00 +08:00
types V0.7.2-bugfix (#109) 2026-04-14 21:42:56 +08:00
uikit V0.7.0 (#95) 2026-04-11 23:25:13 +08:00
utils Merge branch 'v0.8.0' of github.com:ZSeven-W/openpencil into v0.8.0 2026-05-05 22:51:00 +08:00
variables V0.7.0 (#95) 2026-04-11 23:25:13 +08:00
router.tsx V0.7.0 (#95) 2026-04-11 23:25:13 +08:00
routeTree.gen.ts V0.5.0 (#67) 2026-03-22 09:44:04 +08:00
styles.css V0.7.0 (#95) 2026-04-11 23:25:13 +08:00