Skip to content

Commit fa36799

Browse files
author
Akshay Maloo
authored
genpage skill improvements (#37)
* Improve power-apps plugin: Playwright verification, UX, and PAC CLI updates - Add Playwright MCP server for post-deployment browser verification - Add Step 9 (Verify in Browser) with direct genux page URL navigation - Add common Playwright error handling guidance - Require PAC CLI >= 2.3.1 with pac help for version check - Add --model parameter to all upload commands - Improve gather requirements flow (new/edit, page type picker, data source, requirements) - Add planning step to workflow before code generation - Add forward-slash warning for Windows bash path escaping - Add recommended permissions section to AGENTS.md - Whitelist Playwright MCP tools and npx in settings.json
1 parent 311afce commit fa36799

20 files changed

Lines changed: 246 additions & 182 deletions

.claude/settings.json

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,19 @@
22
"permissions": {
33
"allow": [
44
"Bash(pac *)",
5+
"Bash(pac model *)",
6+
"Bash(pac auth *)",
57
"Bash(node *)",
68
"Bash(dotnet *)",
9+
"Bash(cd:*)",
710
"Bash(powershell *)",
11+
"Bash(npx *)",
12+
"Bash(dir:*)",
813
"Read",
914
"Write",
10-
"Edit"
15+
"Edit",
16+
"mcp__playwright__*",
17+
"mcp__*__browser_*"
1118
]
1219
}
1320
}

.claude/settings.local.json

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
{
2+
"permissions": {
3+
"allow": [
4+
"Bash(cd:*)",
5+
"Bash(echo:*)"
6+
]
7+
}
8+
}

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ Create and deploy Power Pages sites using modern development approaches.
5555

5656
**Currently supported**: Code Sites (SPAs) with React, Angular, Vue, or Astro
5757

58-
### Power Apps (`plugins/power-apps`) — *Coming Soon*
58+
### Power Apps (`plugins/model-apps`) — *Coming Soon*
5959

6060
> **Note**: This plugin is under active development and not yet available in the marketplace.
6161

@@ -72,7 +72,7 @@ To develop and test plugins locally, follow these steps:
7272

7373
```bash
7474
claude --plugin-dir /path/to/power-platform-skills/plugins/power-pages
75-
claude --plugin-dir /path/to/power-platform-skills/plugins/power-apps
75+
claude --plugin-dir /path/to/power-platform-skills/plugins/model-apps
7676
```
7777

7878
## Running Without Interruption
@@ -151,7 +151,7 @@ power-platform-skills/
151151
│ │ ├── commands/
152152
│ │ ├── shared/
153153
│ │ └── skills/
154-
│ └── power-apps/ # Power Apps plugin
154+
│ └── model-apps/ # Model Apps plugin
155155
│ ├── .claude-plugin/
156156
│ │ └── plugin.json
157157
│ ├── commands/

plugins/power-apps/.claude-plugin/plugin.json renamed to plugins/model-apps/.claude-plugin/plugin.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"name": "power-apps",
2+
"name": "model-apps",
33
"version": "1.0.0",
44
"description": "Build and deploy Power Apps generative pages for model-driven apps.",
55
"author": {
@@ -10,7 +10,7 @@
1010
"repository": "https://github.com/microsoft/power-platform-skills/",
1111
"license": "MIT",
1212
"keywords": [
13-
"power-apps",
13+
"model-apps",
1414
"generative-pages",
1515
"genux",
1616
"genpage",

plugins/model-apps/.mcp.json

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
{
2+
"playwright": {
3+
"command": "node",
4+
"args": [
5+
"${CLAUDE_PLUGIN_ROOT}/scripts/launch-playwright-mcp.js"
6+
]
7+
}
8+
}
Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
# AGENTS.md — Power Apps Plugin
1+
# AGENTS.md — Model Apps Plugin
22

3-
This file provides guidance to AI Agents when working with the **power-apps** plugin.
3+
This file provides guidance to AI Agents when working with the **model-apps** plugin.
44

55
## What This Plugin Is
66

@@ -13,20 +13,22 @@ Single-session workflow — each `/genpage` invocation completes the full cycle:
1313
Test this plugin locally:
1414

1515
```bash
16-
claude --plugin-dir /path/to/plugins/power-apps
16+
claude --plugin-dir /path/to/plugins/model-apps
1717
```
1818

1919
## Architecture
2020

2121
```
2222
.claude-plugin/plugin.json ← Plugin metadata (name, version, keywords)
23+
.mcp.json ← MCP server config (Playwright for browser verification)
2324
AGENTS.md ← Plugin guidance for AI agents (this file)
2425
CLAUDE.md ← Symlink → AGENTS.md
2526
references/ ← Shared reference docs
26-
genux-rules-reference.md ← Full code-gen rules, DataAPI types, layout patterns, common errors
27-
pac-cli-reference.md ← PAC CLI commands and parameters
27+
genpage-rules-reference.md ← Full code-gen rules, DataAPI types, layout patterns, common errors
2828
troubleshooting.md ← Common issues and fixes
2929
samples/ ← Example .tsx files (8 samples)
30+
scripts/
31+
launch-playwright-mcp.js ← Playwright MCP server launcher (detects system browser)
3032
skills/
3133
genpage/
3234
SKILL.md ← Skill definition with frontmatter (model, allowed-tools)
@@ -79,3 +81,4 @@ After modifying this plugin:
7981
2. Test skill invocation with `/genpage`
8082
3. Verify tool restrictions work (should only allow pac, powershell, node commands)
8183
4. Test with both Dataverse entity pages and mock data pages
84+
5. Verify Playwright browser verification works (navigate, snapshot, click, screenshot)
File renamed without changes.

plugins/power-apps/references/genux-rules-reference.md renamed to plugins/model-apps/references/genpage-rules-reference.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
# Genux Code Generation Rules Reference
1+
# Generative Pages Code Generation Rules Reference
22

3-
Comprehensive rules for generating genux page code. Read this file during code generation (Step 6).
3+
Comprehensive rules for generating generative page code. Read this file during code generation (Step 6).
44

55
---
66

plugins/power-apps/references/troubleshooting.md renamed to plugins/model-apps/references/troubleshooting.md

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,12 @@ Common issues when building and deploying generative pages.
44

55
---
66

7-
## PAC CLI Not Found
7+
## PAC CLI Not Found or Outdated
88

99
- Install: `dotnet tool install --global Microsoft.PowerApps.CLI.Tool`
10+
- Update: `dotnet tool update --global Microsoft.PowerApps.CLI.Tool`
1011
- Or download from the [Microsoft Power Platform CLI](https://learn.microsoft.com/en-us/power-platform/developer/cli/introduction) page
11-
- Verify: `pac --version`
12+
- Verify: `pac help` (version must be >= 2.3.1)
1213

1314
---
1415

@@ -57,3 +58,13 @@ Common issues when building and deploying generative pages.
5758
- Keep `RuntimeTypes.ts` in the same directory as the `.tsx` file
5859
- Regenerate schema if Dataverse metadata has changed
5960
- If column names don't match, re-run `generate-types` — never guess column names
61+
62+
---
63+
64+
## Playwright Browser Verification Issues
65+
66+
- "Target page, context or browser has been closed" → retry the navigation; Playwright sessions can expire
67+
- "Ref not found" → take a fresh `browser_snapshot` before clicking any element; stale refs are invalid
68+
- Sign-in page appears → Playwright uses the system browser session; user must sign in manually first
69+
- Page renders blank → wait longer with `browser_wait_for`; genux pages can take several seconds to render
70+
- Browser not found → `launch-playwright-mcp.js` detects Edge/Chrome automatically; ensure one is installed
File renamed without changes.

0 commit comments

Comments
 (0)