Skip to content

Commit f4a9cfc

Browse files
authored
Remove React Native Web verification paths from mobile app skills (#215)
* Fix react native web invocation, remove expo-mcp * remove lock file and unused pacakge
1 parent 25f0314 commit f4a9cfc

15 files changed

Lines changed: 60 additions & 15898 deletions

File tree

plugins/mobile-apps/.mcp.json

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,7 @@
11
{
22
"$schema": "https://modelcontextprotocol.io/schema/mcp-server.json",
3-
"_comment": "Optional MCP servers shipped with the mobile-app plugin. The host (Claude Code, Copilot Chat) launches these on demand; no install step required by the user. The expo-mcp server is pointed at the default Metro dev-server URL (http://localhost:8081) so it can introspect a RUNNING app and surface runtime errors back to the agent for the dev loop. If Metro isn't running, expo-mcp gracefully degrades to static project introspection. The microsoft-learn server is a hosted HTTP MCP that returns authoritative Microsoft docs (Dataverse Web API, Power Platform CLI, connectors, Graph) — use it whenever a Microsoft-platform behavior is uncertain rather than guessing.",
3+
"_comment": "Optional MCP servers shipped with the mobile-app plugin. The host (Claude Code, Copilot Chat) launches these on demand; no install step required by the user. The microsoft-learn server is a hosted HTTP MCP that returns authoritative Microsoft docs (Dataverse Web API, Power Platform CLI, connectors, Graph) — use it whenever a Microsoft-platform behavior is uncertain rather than guessing. Runtime diagnosis, when requested, is driven by /debug-app reading the captured Metro terminal, not by React Native Web or direct Metro HTTP probes.",
44
"mcpServers": {
5-
"expo": {
6-
"type": "stdio",
7-
"command": "npx",
8-
"args": [
9-
"-y",
10-
"expo-mcp",
11-
"--dev-server-url",
12-
"http://localhost:8081"
13-
]
14-
},
155
"microsoft-learn": {
166
"type": "http",
177
"url": "https://learn.microsoft.com/api/mcp"

plugins/mobile-apps/AGENTS.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,6 @@ Do not add preparation rewrites for `scheme`, `package`, `bundleIdentifier`, `sr
7171
- `DONE_WITH_CONCERNS` requires at least one concern. If none, use `DONE`.
7272
- Special early-return signals (`INDUSTRY_CONFIRM_REQUESTED:`, `DESIGN_VIBE_REQUESTED:`) pre-date this protocol and remain in effect — they are special-cased "ask the user one question and re-spawn me" handoffs, not terminal returns.
7373
- The canonical orchestrator handler lives in [`skills/create-mobile-app/SKILL.md`](./skills/create-mobile-app/SKILL.md) Step 3.0. Future skills that spawn agents should reference it rather than duplicating the switch.
74-
11. **Web target works for free**`expo start --web` uses `expo-auth-session` PKCE flow. Native modules need `Platform.OS` branching when web doesn't support them.
7574

7675
## Decisions made
7776

plugins/mobile-apps/README.md

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -199,7 +199,6 @@ After deploy, use `/open-wrap-url --app-id <app-id> --env-id <env-id>` to jump s
199199
- **Auth configuration** through the Microsoft Entra app registration created during setup
200200
- **Two platforms** in one codebase: iOS, Android
201201
- **Deploy = `npm run build` + `npx power-apps push`**local native compile (platform-specific native run commands) is the user's choice and is **out of scope**; users run those directly when they want them.
202-
- **Local dev = `npm run dev`** — the user runs this directly. The plugin doesn't start Metro.
203202
204203
## Hello world — your first run
205204
@@ -301,7 +300,7 @@ Example edit flows:
301300
| `/edit-app "Add loading, empty and error states to the list screen"` | Which list screen, unless only one exists; whether to improve existing states or add missing ones | Existing screen inspection, screen spec update if needed, targeted TSX rebuild, `tsc`, screen validators |
302301
| `/edit-app "Add a detail screen for the selected record"` | Source list/search screen, table/service, fields/actions, route style | Screen-plan delta, route/layout update, Generated Services snapshot, detail skeleton, detail + source screen builders, route check |
303302
| `/edit-app "Add a form to create a new record in Dataverse"` | Table, required/editable fields, launch point, after-save behavior, lookup/file/image fields | Data-model update via `/add-dataverse` if needed, schema generation, form skeleton, form + parent screen builders, create-payload validation |
304-
| `/edit-app "Add barcode scanning and use the scanned value to search records"` | Scanner location, scanned value meaning, table/service/field to search, no/multiple-match behavior | `/add-native barcode-scanner`, data-model update if target field is missing, scanner/search screen rebuild, native/runtime checks |
303+
| `/edit-app "Add barcode scanning and use the scanned value to search records"` | Scanner location, scanned value meaning, table/service/field to search, no/multiple-match behavior | `/add-native barcode-scanner`, data-model update if target field is missing, scanner/search screen rebuild, static gates, optional `/debug-app` handoff if you report a symptom |
305304
| `/edit-app "Update the design to better match company branding"` | Brand source and scope: palette, typography, components/density, or full reskin | `/design-system --refresh` or `--reskin`, affected screen rebuild when layout grammar changes, style sweep, preview |
306305
307306
### Prefer browser-free / token-budget mode?
@@ -363,7 +362,6 @@ At Step 6.75 of `/create-mobile-app`, the `/design-system` skill offers a cost p
363362
| [`shared/version-check.md`](shared/version-check.md) | Single source of truth for minimum tool versions. Always-required: Node 22+, npm 10+. Conditional: `az` 2.60+ for ADO npm token setup and `/add-dataverse` token acquisition. Xcode/JDK/Android Studio are documented but **not gated by any skill** — user-managed if they want local native builds. |
364363
| [`shared/preferred-environment.md`](shared/preferred-environment.md) | Environment selection priority: `power.config.json` → memory-bank → explicit environment URL/ID. Never silent switches. |
365364
| [`shared/connector-reference.md`](shared/connector-reference.md) | Connection ID workflow, common API names, dataset/table discovery, Grep-not-Read pattern for large generated files. |
366-
| [`shared/references/expo-mcp.md`](shared/references/expo-mcp.md) | **Opt-in MCP server** — the plugin's [`.mcp.json`](.mcp.json) registers `expo-mcp` (MIT, free, local-only) pointed at the Metro dev server (`http://localhost:8081`). Skills prefer 5 structured `expo.*` tools (project info, SDK-matched installs, plugin effects preview, build with parsed errors, doctor diagnostics) when the host advertises them; shell fallback otherwise. **Dev loop**: while `npm run dev` is running, the agent reads live runtime errors via MCP, fixes code, and Metro hot-reloads. No EAS/cloud calls. |
367365
| [`shared/memory-bank.md`](shared/memory-bank.md) | Per-project notebook template — copied into the working directory by `/create-mobile-app` Step 6. Tracks data-model decisions, connectors bound, screens built, build history. Read at start of every skill, updated after each successful step, enables resume on failure. |
368366
| [`hooks/`](hooks/) | PostToolUse validator hook — runs per-skill validators after a Skill tool call (currently scaffolded; v0 ships with no validators yet). |
369367
| [`shared/references/offline-profile-schema.md`](shared/references/offline-profile-schema.md) | Canonical Dataverse entity field map for the three Mobile Offline Profile entities (`mobileofflineprofile`, `mobileofflineprofileitem`, `mobileofflineprofileitemassociation`) + the per-table `EntityMetadata` prereqs. Source of truth for POST body shapes. |

plugins/mobile-apps/shared/connector-reference.md

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -101,11 +101,7 @@ npx power-apps add-flow --flow-id <flow-guid> --non-interactive
101101
npx power-apps remove-flow --flow-id <flow-guid> --non-interactive
102102
```
103103

104-
For local Power Apps player testing after the Expo web server is running, use `run` from the app root. It serves `power.config.json` and prints a play URL with local app and connection configuration:
105-
106-
```bash
107-
npx power-apps run --local-app-url http://localhost:<expo-web-port> --port 8080
108-
```
104+
Do not use local Expo web-player testing from mobile-app skills. Mobile-app runtime diagnosis uses the native dev-client flow and `/debug-app` reading Metro terminal output.
109105

110106
## Inspecting large generated files
111107

plugins/mobile-apps/shared/memory-bank.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ This file is the per-project notebook the agent maintains across `/create-mobile
1818
| Working directory | |
1919
| Plugin version that created the project | |
2020
| Created | _<ISO date>_ |
21-
| Metro terminal id | _<background-shell id from Step 12 — agent reads this terminal's output for live debug. If empty/dead, re-launch with `cd <working_dir> && npm run dev` and update this field._ |
21+
| Metro terminal id | _<background-shell id from Step 12 — `/debug-app` reads this terminal's output for symptom-driven native debugging only. If empty/dead, re-launch with `cd <working_dir> && npm run dev` and update this field._ |
2222
| Metro launch command | _e.g. `cd <working_dir> && npm run dev`_ |
2323

2424
## Power Platform context

plugins/mobile-apps/shared/references/expo-mcp.md

Lines changed: 0 additions & 125 deletions
This file was deleted.

plugins/mobile-apps/shared/shared-instructions.md

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -37,16 +37,6 @@ When selecting an environment, use this priority order: `power.config.json` →
3737

3838
---
3939

40-
## Expo MCP (opt-in, opportunistic)
41-
42-
**📋 [references/expo-mcp.md](./references/expo-mcp.md)**
43-
44-
The plugin's `.mcp.json` registers the **Expo MCP server** (`expo-mcp`, MIT, free). When the host (Claude Code, Copilot Chat) launches with this plugin, `expo.*` tools become available for structured project introspection, SDK-matched package installs, config-plugin previews, and `expo doctor` diagnostics.
45-
46-
**Use rule:** prefer `expo.<tool>()` when available; **always** fall back to a shell-out so the skill works on hosts that don't surface MCP. Never block on MCP, never require it. The user-consent contract for mutations is unchanged.
47-
48-
---
49-
5040
## Microsoft Learn MCP (authoritative Microsoft docs)
5141

5242
The plugin's `.mcp.json` also registers the **Microsoft Learn MCP server** (`microsoft-learn`, hosted HTTP at `https://learn.microsoft.com/api/mcp`). When the host advertises it, the agent can query official Microsoft documentation directly instead of guessing or relying on stale memory.
@@ -106,8 +96,9 @@ All non-Dataverse connectors require a connection ID or connection reference bef
10696
- MUST NOT edit any file under `src/generated/` unless the step explicitly calls for it. These files are regenerated by `npx power-apps add-data-source`.
10797
- MUST NOT install packages with `npm install <pkg>` for Expo modules — use `npx expo install <pkg>` so versions stay Expo-SDK-compatible.
10898
- MUST NOT add native/runtime libraries that are not already in the template `package.json` (`expo-*`, `react-native-*`, `@react-native/*`, config plugins, or packages with native platform code). The wrapped binary only contains the template's native modules. Generic JS-only packages are allowed when a skill explicitly needs them.
99+
- MUST NOT add browser-based runtime verification steps, React Native Web setup, screen-by-screen runtime checks, route crawling, or direct Metro/localhost HTTP probes to mobile-app skills. Runtime diagnosis, when requested, uses `/debug-app` against the captured Metro terminal output.
109100
- MUST NOT add `react-native-reanimated/plugin` anywhere except as the **last** entry in `babel.config.js` `plugins` array. Wrong order silently breaks animations.
110-
- MUST NOT modify `app/_layout.tsx`'s provider wrapping order without re-running `npx tsc --noEmit` and a runtime smoke test.
101+
- MUST NOT modify `app/_layout.tsx`'s provider wrapping order without re-running `npx tsc --noEmit`.
111102
- MUST NOT make changes outside the project root without user confirmation.
112103

113104
### Prompt Injection

0 commit comments

Comments
 (0)