Skip to content
Open
Show file tree
Hide file tree
Changes from 19 commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
49688f3
fix(mobile-apps): harden Dataverse schema creation
Jul 27, 2026
3860205
Potential fix for pull request finding
kanu-shubham Jul 27, 2026
38938f5
refactor(mobile-apps): drop create-payload script; unblock draft plan…
Jul 28, 2026
e7437d7
docs(mobile-apps): keep pre-flight note inside the blockquote
Jul 28, 2026
e1a3251
perf(mobile-apps): short-circuit Dataverse tenant resolution
Jul 28, 2026
881eaca
perf(mobile-apps): batch Dataverse metadata reads into single queries
Jul 28, 2026
c1311c9
perf(mobile-apps): fold key/M:N pre-flights into the snapshot
Jul 28, 2026
2797ba8
fix(mobile-apps): pre-flight lookups and calc columns for idempotent …
Jul 28, 2026
3922e37
fix(mobile-apps): never block the user on a data-modelling conflict
Jul 29, 2026
fbd90e2
docs(mobile-apps): complete decision set and fix dead reference link
Jul 29, 2026
ac30603
Optimize Dataverse metadata execution
Aug 13, 2026
94e3a20
Address Dataverse V2 review feedback
Aug 14, 2026
9e2e389
Fix Windows test PATH resolution
Aug 14, 2026
596602c
Make Azure CLI test doubles portable
Aug 14, 2026
58b6086
harden Dataverse derived metadata reconciliation
Aug 14, 2026
f17a7f2
Harden mobile Dataverse runtime contracts
Aug 18, 2026
5181c52
Enforce route checks in mobile create flow
Aug 18, 2026
7ffd79d
Make mobile identity and GUID contracts deterministic
Aug 18, 2026
f2c8068
Remove obsolete mobile GUID helper guidance
Aug 18, 2026
741c3f8
Align Dataverse planning conflict decisions
Aug 18, 2026
7ffe629
Potential fix for pull request finding
kanu-shubham Aug 18, 2026
9428959
Normalize route paths on Windows
Aug 18, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
40 changes: 40 additions & 0 deletions .github/workflows/mobile-apps-script-tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
# Functional unit tests for the mobile-apps plugin across supported operating
# systems and Node versions. These scripts spawn Azure CLI shims and manipulate
# filesystem paths, so cross-platform coverage protects real behavior.
name: mobile-apps-script-tests

on:
pull_request:
branches:
- main
paths:
- "plugins/mobile-apps/**"
- ".github/workflows/mobile-apps-script-tests.yml"

jobs:
test-mobile-apps-scripts:
name: test-mobile-apps-scripts (${{ matrix.os }}, node ${{ matrix.node }})
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os:
- ubuntu-latest
- windows-latest
- macos-latest
node:
- 20
- 22
steps:
- name: checkout
uses: actions/checkout@v4

- name: setup-node
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node }}

- name: run-mobile-apps-script-tests
shell: bash
working-directory: plugins/mobile-apps
run: node --test scripts/tests/*.test.js
136 changes: 83 additions & 53 deletions plugins/mobile-apps/agents/data-model-architect.md

Large diffs are not rendered by default.

22 changes: 13 additions & 9 deletions plugins/mobile-apps/agents/native-app-planner.md
Original file line number Diff line number Diff line change
Expand Up @@ -498,13 +498,16 @@ Reject loop = re-spawn `screen-planner` with the user's feedback (layout, screen
### Step 5c — Cross-entity Read Audit (Round 2 data-model pass)

**Print before spawning:**
> "→ Auditing the locked screen plan for cross-entity reads (calc-column candidates from related_entity_fields blocks)…"
> "→ Auditing the locked screen plan for supported cross-entity read paths…"

**Run condition:** execute this step ONLY after Gate 4b has been approved AND the screen-planner's per-screen specs include at least one `related_entity_fields` block. Skip silently otherwise (no cross-entity reads = no calc-column proposals needed).
**Run condition:** execute this step ONLY after Gate 4b has been approved AND the screen-planner's per-screen specs include at least one `related_entity_fields` block. Skip silently otherwise.

**Detection (cheap):** before spawning, `Grep` the locked plan for `related_entity_fields:` in `<working_dir>/native-app-plan.md`. Zero matches → skip Step 5c entirely, mark `[x]` and proceed to Step 6. One or more matches → spawn the audit pass below.

This step exists because of the runtime constraint documented at [`shared/references/data-performance.md` § Cross-entity Reads](${PLUGIN_ROOT}/shared/references/data-performance.md#cross-entity-reads) — the SDK has no `$expand`, so cross-entity fields on hot paths (lists, dashboards) MUST be denormalized via calculated columns at the data-model layer. The screen-planner emits `related_entity_fields` per screen; this step turns those into calc-column proposals.
This step exists because the SDK has no `$expand`. It verifies that every
cross-entity field uses a formatted lookup or bounded chained fetch, and flags
hot-path fields that require an externally supplied projection. It never
synthesizes calculated/formula metadata.

#### 5c.1 — Spawn `data-model-architect` in `cross-entity-audit` mode

Expand All @@ -530,22 +533,23 @@ Wait for return; apply the Step 3.0 status switch:
- `DONE_WITH_CONCERNS: <list>` → embed addendum, propagate concerns into your own final `DONE_WITH_CONCERNS:`.
- `NEEDS_CONTEXT:` / `BLOCKED:` — propagate up per the standard switch.

#### 5c.2 — Gate 1 addendum (calc-column approval)
#### 5c.2 — Gate 1 addendum (cross-entity read paths)

If 5c.1 wrote a `### Cross-entity Reads` addendum, present it to the user as a Gate 1 addendum (NOT a fresh Gate 1 — the original schema is already approved and unchanged):

```
## Gate 1 — Addendum: Cross-entity Reads

The screen plan you approved at Gate 4b reads N fields from related entities (gate names on inspections, customer phones on orders, etc.). Because the Power Apps SDK has no $expand, those fields need calculated columns on the parent tables to display efficiently — otherwise list screens would either render "—" or trigger N+1 fetches per row.
The screen plan reads N fields from related entities. The generated SDK has no
$expand, so each field must use a formatted lookup, a bounded chained fetch, or
an external server-owned projection.

Proposed calculated columns (auto-derived from your screen plan, no schema reshape):
Proposed read paths:

[paste the ### Cross-entity Reads table from _dm_section.md]

[paste the Chained-fetch fields (informational) table if present — these need NO schema change, the screen-builder handles them at scaffold time]

Approve to add these calc columns to the data model? (Reject → revise the audit. Approve → /setup-datamodel will create them in Phase 6.1b.)
Approve these read paths? Any `external-projection-required` row remains a
blocker until the user supplies that projection outside this workflow.
```

Reject loop = re-spawn data-model-architect in `mode: cross-entity-audit` with the user's feedback (e.g. "drop cr3e9_tailnumber_calc, the list doesn't actually show it"). Approve = mark `[x]` Gate 1 addendum approved, proceed to Step 6.
Expand Down
Loading
Loading