Commit 94fd7bf
Shubham Agarwal
refactor(mobile-app): move Metro logging into .powernative
Replace the process-owning Metro wrapper design with template-owned
logging. The template metro.config.js now writes sanitized Metro output
to .powernative/metro-logs during normal npm run dev, so manual starts
and agent starts use the same log source and there is no second-Metro-on-
8082 failure mode.
The logger captures both stdout/stderr and HTTP bundle failures. A probe
against a generated app confirmed the important distinction: stdout tee
alone captures startup logs, but bundle failures are returned as HTTP
responses and do not hit stdout. The middleware wrapper logs non-2xx
responses so /debug-app can see UnableToResolveError and similar bundle
failures.
metro-session.js is reduced from a process manager to a small status/tail
helper. It no longer starts, stops, detaches, or owns Metro; it only
locates the latest .powernative log, verifies the logged PID still owns
the logged port, and tails by byte cursor for /debug-app.
Docs and skills now describe npm run dev as the normal path, .powernative
as the authoritative debug source, and terminal IDs as optional-only UI
context. The old wrapper-owned .expo/metro-session state/log story is
removed.
Validation: node --check for the helper and template Metro config, 29
mobile script tests pass, and all repository validators pass.1 parent b94abf9 commit 94fd7bf
13 files changed
Lines changed: 423 additions & 1544 deletions
File tree
- plugins/mobile-apps
- scripts
- tests
- skills
- create-mobile-app
- debug-app
- deploy
- template
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
26 | 26 | | |
27 | 27 | | |
28 | 28 | | |
29 | | - | |
| 29 | + | |
30 | 30 | | |
31 | 31 | | |
32 | 32 | | |
| |||
73 | 73 | | |
74 | 74 | | |
75 | 75 | | |
76 | | - | |
| 76 | + | |
77 | 77 | | |
78 | 78 | | |
79 | 79 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
80 | 80 | | |
81 | 81 | | |
82 | 82 | | |
83 | | - | |
84 | | - | |
85 | | - | |
86 | | - | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
87 | 87 | | |
88 | 88 | | |
89 | | - | |
90 | | - | |
| 89 | + | |
91 | 90 | | |
92 | 91 | | |
93 | 92 | | |
94 | 93 | | |
95 | 94 | | |
96 | | - | |
97 | | - | |
98 | | - | |
99 | | - | |
100 | | - | |
101 | | - | |
| 95 | + | |
| 96 | + | |
102 | 97 | | |
103 | 98 | | |
104 | 99 | | |
| |||
227 | 222 | | |
228 | 223 | | |
229 | 224 | | |
230 | | - | |
| 225 | + | |
231 | 226 | | |
232 | 227 | | |
233 | 228 | | |
| |||
0 commit comments