Codex stop-hook on the 2026-05-10 mobile fallback fix caught a strip-and-reclassify ordering bug. orchestrator.ts mutates `plan.subtasks` in-place at L744 to remove the status-bar subtask on mobile, then 96 lines later re-runs `isMobileFullScreen(plan)` to gate status-bar injection. The new narrow + multi-subtask fallback (`subtasks.length >= 2`) flips on the second call when a plan that originally had [status-bar, content] (2 items, height=0 or non-numeric) drops to 1 item after the strip. Result: status bar correctly classified as needed, then the strip removes it, then the re-classify says "actually it's a Type 0 component" → injection skipped. Round-trip the user back to the original missing-status- bar bug. Fix: reuse the `isMobileScreen` constant computed at L742 (BEFORE the strip). The classification is stable for a given plan — there's no reason to re-evaluate after our own mutation. Comment pins the invariant for the next refactor. |
||
|---|---|---|
| .. | ||
| public | ||
| server | ||
| src | ||
| CLAUDE.md | ||
| components.json | ||
| dev.ts | ||
| package.json | ||
| tsconfig.json | ||
| vite.config.ts | ||