app-validation
Skill10 starsChanged 32 days agoMITView on GitHub
What to validate and how to drive Playwright for this template's app. Use alongside the playwright-cli skill — playwright-cli covers the tool's commands; this skill covers performance rules, the required validation checklist, the Fabric portal embed flow, and spec file guidance.
- Reads credentials
10 other projects use a version of this, 5 of them edited.
Adopted by
Most recently taken up by
- microsoft/DataHub-App-for-Microsoft-Copilot-Agents-Cowork-and-Autopilotsword for word, first seen Nov 8, 2026
- microsoft/ValueLens-for-Microsoft-Copilotword for word, first seen Oct 25, 2026
- microsoft/ConsumptionCentral-for-Microsoft-Copilotword for word, first seen Oct 25, 2026
- microsoft/frontiertour27-LTG291-turn-your-data-into-production-apps-with-rayfinedited, first seen Oct 17, 2026
- microsoft/frontiertour27-BRK390-building-ai-applications-with-microsoft-databases-and-fabricedited, first seen Oct 17, 2026
- microsoft/rayfinedited, first seen Oct 13, 2026
Used with
Projects with it also use rayfin, rayfin-connectors and 1 more.
Other files people use alongside this one.
Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
MicrosoftSkillrayfin
Use when doing ANY task involving Rayfin — scaffolding, data models, decorators, auth, deployment, CLI commands, or client setup. Triggers: rayfin, rayfin init, rayfin up, rayfin login, RayfinClient, @entity, @role, @anonymous, @authenticated, @text, @uuid, @int, @decimal, @boolean, @date, @email, @set, @one, @many, DAB, Data API Builder, rayfin.yml, publishableKey, signUp, signIn, signOut, sendMagicLink, handleMagicLinkCallback, ensureSignedInWithFabric, Fabric SSO, Entra ID, rayfin up db apply, rayfin up staticapp deploy, schema.ts, OpaqueSession, onSessionChange, GraphQL select, GraphQL create, GraphQL update, GraphQL delete, findById, executePaginated, RLS policy, row-level security, claims.sub, claims.email, TC39 decorators, config generation, dialect, mssql, postgresql
Also in 5 projects that use this
MicrosoftSkillrayfin-connectors
Use for Rayfin connectors that wire existing Fabric SQL data sources (Lakehouse, Warehouse, SQL Database) into an app as GraphQL-backed entities. Triggers: rayfin connector, rayfin up connector apply, connectors:, fabric-sqlanalytics, fabric-warehouse, fabric-sqldatabase, kusto, kql, eventhouse, workspaceId, itemId, operations:, AppConnectorsSchema, ConnectorsSchema, rayfin/connectors/, metadata.json, connector @role policy, connector claims.sub filter, connector claims.email filter, ConnectorsRayfinClient, rayfin-client.ts, client.connectors, connectorConfig, GraphQLBackedConnector, RestrictedDataApi, schema.ts aggregate, generate entities from metadata, add a use case on specific entities, wire connector into client, call a connector from the SDK, rayfin connector inspect, inspect connector data, sample connector rows, fabric-semanticmodel, --entity, --query, DAX EVALUATE, read-only sample query, rayfin connector search, discover connectable sources, find fabric sources to add, --all-workspaces, --workspace-id, connector search interactive picker, rayfin connector invoke, invoke a connector operation, run executeQuery, --input, --file, RAYFIN_FEATURE_FLAGS, resultSetRowCountLimit, limit rows, row limit, cap rows, too many rows, overflow
Also in 3 projects that use this
- +1 more from microsoft
Other versions10 projects use a version of this.
Word for word · 3
Edited · 5
- microsoft/rayfin★ 64693% same
- microsoft/aitour27-LTG291-turn-your-data-into-production-apps-with-rayfin★ 293% same
- microsoft/frontiertour27-LTG291-turn-your-data-into-production-apps-with-rayfin★ 293% same
- microsoft/aitour27-BRK390-building-ai-applications-with-microsoft-databases-and-fabric★ 193% same
- microsoft/frontiertour27-BRK390-building-ai-applications-with-microsoft-databases-and-fabric★ 193% same
Wrote their own version · 2
- khadinakbarlabs/shopify-app-builder★ 2same name
- microsoft/fabric-org-app-template★ 1same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository9 other files it gives its agents.
- app/AGENTS.mdAGENTS.md
- app-designSkill
- dax-authoringSkill
- fabric-cliSkill
- fabric-sdkSkill
- playwright-cliSkill
- query-designSkill
- schema-discoverySkill
- visualsSkill
The file
Show its rules and text
We split this skill into the rules it gives an agent
21 rules. 9 are common, 4 are distinctive, and 8 are very specific to this project.
9
Common
Most of the 7 edited versions we read keep these.
4
Distinctive
This author's own choices. Worth a look.
8
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 13
NEVER: test directly against localhost - the app will not work correctly.
- Very specific: line 31
Only take a screenshot if the user explicitly requests one.
- Common: line 37
No console errors from the app.
- Common: line 41
Verify key layout containers have non-zero computed padding and gap values.
- Very specific: line 42
Verify each visual's card background matches the app's other cards — it comes from containerClassName, not from a wrapper div.
- Distinctive: line 43
Verify card chrome is not painted twice — by both a wrapper and the visual's own container.
- Common: line 44
Verify bar and arc stroke colors match card background (not primary text color).
- Common: line 45
Verify axis label and data-label colors are consistent across charts using shared foreground-secondary semantics.
- Common: line 46
Verify grouped/multi-series bar charts do not show auto-injected data labels unless explicitly requested by design.
- Distinctive: line 47
Verify every visual displays its expected content.
- Common: line 48
Verify chart render height is healthy for each chart canvas/SVG.
- Very specific: line 49
Verify standalone (non-grid) chart sections use definite height instead of only minHeight when chart wrappers use h-full.
- Very specific: line 60
Before launching the browser, check that the combined values in .env.local and .env.fabric include all three values required to identify an …
- Distinctive: line 66
If any value is missing, provision the app using the exact target Fabric workspace URI supplied by the user or task:
- Very specific: line 72
If no target workspace URI was supplied, ask the user for one.
- Distinctive: line 76
Run the Vite development server in a separate, long-running terminal and confirm that the URL reported by Vite responds before opening the …
- Very specific: line 82
If Vite uses a non-default URL (a URL that is not http://localhost:5173), set DEV_URL to that URL in the same shell command that runs npm …
- Very specific: line 127
If blockedByLNA: true, the Chromium flag isn't taking effect — confirm --config=.playwright-config.json was passed.
- Common: line 137
Add spec files alongside source files as needed — for components, hooks, utilities, and query factory functions.
- Common: line 146
Never create a spec file just to satisfy coverage targets.
- Common: line 148
Keep each spec focused on one unit.
“Common” is measured: kept by at least 6 in 10 of the 7 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
App Validation
Use this skill together with the playwright-cli skill when validating the running app in a browser. The playwright-cli skill is upstream-managed and only covers the tool itself; this skill captures everything specific to this template. This app can only be tested and validated with the Fabric portal embed flow. See Testing inside the Fabric portal embed.
NEVER test directly against localhost - the app will not work correctly.
Performance Rules
Use minimal initial_wait
Always use initial_wait: 1 for all playwright-cli tool calls to avoid unnecessary delays. Do not increase it unless explicitly required.
Carve-out: the first
openagainst the Fabric portal embed (*.fabric.microsoft.com/...?devUri=...) takes 20–40s to render the appbackend chrome. Useinitial_wait: 30once for that call, then1afterward. See Testing inside the Fabric portal embed.
Skip auth — always
NEVER interact with or validate the token/auth prompt page. Inside your run-code call, inject the auth token via sessionStorage.setItem (or localStorage.setItem) and mock API responses with page.route() before calling page.reload(). The app must skip the auth prompt and render actual content immediately.
Carve-out: this rule applies to apps that gate themselves behind a token check the agent controls. For real AAD redirects (e.g. the Fabric portal sign-in flow at
login.microsoftonline.com), do not click sign-in buttons or fill credentials, and do not mocksessionStorage— use a--persistentprofile instead so the user signs in once and cookies replay on subsequent runs. See Testing inside the Fabric portal embed.
Skip screenshots unless asked
Only take a screenshot if the user explicitly requests one. Use snapshot (YAML accessibility tree) for validation.
Required Checks
- UI elements render correctly and are visible.
- Text meets accessibility standards.
- No console errors from the app. Ignore Fabric portal noise - see console-error-filter.
Visual Consistency Checks
- Verify key layout containers have non-zero computed padding and gap values. Zero spacing usually indicates an invalid token class mapping.
- Verify each visual's card background matches the app's other cards — it comes from
containerClassName, not from a wrapper div. - Verify card chrome is not painted twice — by both a wrapper and the visual's own container.
- Verify bar and arc stroke colors match card background (not primary text color).
- Verify axis label and data-label colors are consistent across charts using shared foreground-secondary semantics.
- Verify grouped/multi-series bar charts do not show auto-injected data labels unless explicitly requested by design.
- Verify every visual displays its expected content. Charts must render visible, correctly positioned data marks; grids must render their expected headers and cells.
- Verify chart render height is healthy for each chart canvas/SVG. Treat charts rendering below ~100px as suspicious and below ~50px as likely squished.
- Verify standalone (non-grid) chart sections use definite
heightinstead of onlyminHeightwhen chart wrappers useh-full. - Compare computed
fontSize,fontFamily, andcoloracross relatedinput,select, andbuttoncontrols in the same toolbar/filter row. - Include a
page.evaluatestyle check in validation runs that reports spacing/token and form typography mismatches as structured failures. - Include a
page.evaluatechart-height check that inspects chart canvas/SVG client heights and reports squished-chart mismatches.
Testing inside the Fabric portal embed
The URL under test should be *.fabric.microsoft.com and contain devUri=, so the app is being rendered inside the Fabric portal as a deeply-nested iframe (portal → *pbiabd.powerbi.com/appbackend → http://localhost:5173). Use the template's wired-up flow instead of the generic open recipe.
Provisioning preflight
Before launching the browser, check that the combined values in .env.local and .env.fabric include all three values required to identify an existing Fabric AppBackend:
VITE_FABRIC_PORTAL_URLVITE_FABRIC_WORKSPACE_IDVITE_FABRIC_ITEM_ID
If any value is missing, provision the app using the exact target Fabric workspace URI supplied by the user or task:
npx rayfin up --workspace-uri "<target-workspace-uri>"If no target workspace URI was supplied, ask the user for one. rayfin up provisions the Fabric AppBackend and writes the required values to the environment files; it does not need to be rerun before every validation when valid deployment configuration already exists.
Start the development server
Run the Vite development server in a separate, long-running terminal and confirm that the URL reported by Vite responds before opening the Fabric portal:
npm run devIf Vite uses a non-default URL (a URL that is not http://localhost:5173), set DEV_URL to that URL in the same shell command that runs npm run test:fabric.
Launch the Fabric browser session
npm run test:fabricThis runs scripts/open-fabric-portal.mjs, which composes the embed URL from the VITE_FABRIC_* environment files and launches a named persistent session with the right Chromium flags:
playwright-cli -s=fabric open --persistent --config=.playwright-config.json "<embed-url>"npm run test:fabric only opens the browser session. It does not provision the AppBackend, start the development server, or perform the required checks. Use subsequent playwright-cli -s=fabric commands to inspect and validate the embedded app frame.
Why three pieces are required
| Piece | Reason |
--persistent profile | Real AAD sign-in cannot be mocked. The user signs in once; cookies persist for subsequent playwright-cli -s=fabric open calls. |
.playwright-config.json Chromium flag | Disables BlockInsecurePrivateNetworkRequests / LocalNetworkAccessChecks so the HTTPS Fabric portal can iframe the local Vite server. Header-based opt-in does not work for top-level iframe navigations. |
Vite localNetworkAccessPlugin | Sends Access-Control-Allow-Private-Network: true and answers LNA preflights, so fetch/XHR subresources from the embedded app pass. Belt-and-suspenders with the browser flag. |
Frame discovery snippet
The app loads three frames deep. Use this single run-code to locate it (replace localhost:5173 with the actual Vite URL if different):
async page => {
await page.waitForFunction(
() => Array.from(document.querySelectorAll('iframe')).some(i => i.src.includes('localhost:5173')),
{ timeout: 30000 }
);
await page.waitForTimeout(3000);
const f = page.frames().find(x => x.url().startsWith('http://localhost:5173'));
const errFrame = page.frames().find(x => x.url().startsWith('chrome-error'));
return {
loaded: !!f,
blockedByLNA: !!errFrame,
title: f ? await f.title() : null,
};
}If blockedByLNA: true, the Chromium flag isn't taking effect — confirm --config=.playwright-config.json was passed.
Console error filter
The Fabric portal emits its own errors that are not app bugs. Treat them as portal noise and ignore them. Only errors whose source origin matches the embedded app server’s origin count as app errors.
See references/fabric-embed.md for the full frame walker, classifyConsoleMessages helper, and troubleshooting matrix.
Spec Files
Add spec files alongside source files as needed — for components, hooks, utilities, and query factory functions. Co-locate each spec file with the file it tests.
When to add spec files:
- Always for pure utility functions in
src/lib/— these are easiest to unit-test and most likely to have edge cases. - Always for query factory functions in
src/queries/— verify that parameter combinations produce the correct query string, column metadata, and spec modifications. - As needed — for hooks, test state transitions, returned values, and side effects using a React hooks testing library.
- As needed — for components, add spec files when the component contains non-trivial logic (e.g., conditional rendering, derived state, error states). Simple presentational components with no logic do not need a spec file.
Key rules:
- Never create a spec file just to satisfy coverage targets. Write tests only when they document expected behavior or guard against regressions.
- Tests must not use mock or hardcoded data to stand in for real query results — use representative fixture data that matches the real column shape.
- Keep each spec focused on one unit; do not write integration tests that span multiple layers.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

