
How I used GitHub Copilot Agent Mode, Playwright MCP, and Excalidraw to prototype a Power BI report redesign — automatically.
1. The Problem
You have a Power BI report with 35 pages and 5 levels of drill-through navigation. Users get lost. Pages are hard to maintain. You want to redesign the navigation — but how do you plan it visually before touching a single Power BI file?
Traditional approaches involve:
- Opening the report and clicking through pages manually
- Sketching boxes on a whiteboard
- Creating mockups in PowerPoint
None of these give you a connected view of what exists (screenshots of every page) alongside what should change (proposed page hierarchy).
2. The Solution: AI-Powered PBI Prototyping
I built a workflow that combines three tools:
- Playwright MCP — automatically screenshots every page of a Power BI report
- Excalidraw — organizes screenshots with labels, levels, and before/after comparison diagrams
- PBIR files — extracts the actual page navigation graph from the report definition
All orchestrated by GitHub Copilot in Agent mode inside VS Code.

The complete prototyping workflow — from opening the report to the final Excalidraw file.
3. Screenshot Every Page with Playwright
Power BI renders visuals on <canvas> elements — there’s no way to extract the visual content as DOM elements. Screenshots are the only viable approach.
Using the Playwright MCP server in VS Code, Copilot navigates to the report, opens the page dropdown at the bottom, and loops through every page — clicking each one, waiting for visuals to render, and taking a screenshot. The entire process is hands-free.
Key learnings:
- Open the report in full-screen mode before running the script — avoids capturing sidebars and filter panes
- Wait 4 seconds per page for visuals to render (8 seconds for complex pages)
- For non-default tenants, launch Edge with
--remote-debugging-port=9222and connect Playwright via CDP
Result: 35 clean, full-screen screenshots in under 3 minutes.
4. Extract Page Navigation from PBIR Files
Instead of manually mapping which pages link to which, I export the report’s PBIR definition via the Fabric REST API.
Every Power BI project (PBIP) consists of two parts: the PBIR (report definition) and the TMDL (semantic model definition). The PBIR contains a JSON file for every page and every visual — including the exact drill-through targets, button navigation actions, and page references. This means the complete navigation graph of the report is encoded in these files.
# Authenticate and export the report definition via Fabric REST API
Login-PowerBIServiceAccount
$uri = "https://api.fabric.microsoft.com/v1/workspaces/$workspaceId/reports/$reportId/getDefinition"
$response = Invoke-WebRequest -Uri $uri -Method Post -Headers $headers
# The API returns a long-running operation — poll until complete,
# then save all files locally (pages, visuals, assets, themes, ...)
By searching for cross-page references in the visual.json files, I can extract the complete navigation graph:
From: Page 1 (Overview) → To: Page 2a, Page 2b, Page 2c, ...
From: Page 2a → To: Page 3a, Page 3b, ...
From: Page 3a → To: Page 4a
From: Page 4a → To: Page 5a
This gives me the actual drill-through depth for every page — no guessing required.
Result: A complete navigation graph with hundreds of cross-page links, automatically determining that some sections have 5 levels of drill-through.
5. Build the Excalidraw Prototype
Excalidraw files are pure JSON — no special tools needed. I generate the entire prototype programmatically with Python. Screenshots are embedded as base64-encoded images directly into the Excalidraw JSON file, so the result is a single portable file with everything included.
Color-Coded Level Indicators
Each page gets a label with color coding based on its drill-through depth:
- L1 (Teal) — Landing page
- L2 (Blue) — First entry from overview
- L3 (Purple) — Analysis pages
- L4 (Orange) — History pages
- L5 (Red) — Detail drill-through
- TT (Gray) — Tooltip pages
Layout: Categories Horizontal, Pages Vertical
Categories are arranged as columns. Within each column, pages are stacked vertically in drill-through order. This gives an instant visual sense of which areas are deep and which are flat.
Before/After Comparison Diagrams
Below each category’s screenshots, I add box diagrams showing the current vs. proposed hierarchy:
BEFORE (12 pages, 5 levels)
[L1] Page 1
└─ [L2] Page 2a
├─ [L3] Page 3a
│ └─ [L4] Page 4a
│ └─ [L5] Page 5a
└─ [L3] Page 3b
├─ [L4] Page 4b
└─ [L4] Page 4c
AFTER (5 pages, 3 levels)
[L1] Page 1
└─ [L2] Page 2a
├─ [L3] Page 3a
│ + Page 4a content (merged as table)
│ + Page 5a content (merged as drill-through)
└─ [L3] Page 3b
+ Page 4b content (merged as table)
+ Page 4c content (merged as chart)
Result: 35 pages → 18 pages. 5 levels → 3 levels. Clear visual comparison.
6. A Note on Figma
I also tried the Figma MCP server for this workflow. Figma’s capture can convert HTML pages into editable design layers — great for web UIs. I successfully captured the before/after box diagrams as editable Figma frames.
However, for Power BI prototyping specifically, Figma has limitations: Power BI renders visuals on <canvas> elements which are invisible to the capture script, the MCP is write-only (no editing existing layers), and each capture ID is single-use. If you need to share prototypes with designers already in Figma, it works as an additional output — but Excalidraw is the better primary tool because:
- Full programmatic control — the JSON file format allows unlimited manipulation
- No API limits or authentication required
- Works offline in VS Code with the Excalidraw extension
- Images, text, shapes, and arrows in a single portable file
7. The Complete Workflow
- Open PBI report in browser (Playwright MCP)
- Screenshot all pages (loop through page dropdown)
- Export PBIR definition (Fabric REST API)
- Parse navigation graph from visual.json files
- Build Excalidraw file with Python: embed screenshots, add labels, generate comparison diagrams
- Review in VS Code with Excalidraw extension
- Optionally capture to Figma for sharing
Total time: ~10 minutes for a 35-page report, fully automated.
8. Try It Yourself
Prerequisites
- VS Code with GitHub Copilot (Agent mode)
- Playwright MCP server (
npx @playwright/mcp@latest) - Excalidraw VS Code extension (
pomdtr.excalidraw-editor) MicrosoftPowerBIMgmt.ProfilePowerShell module
Quick start
- Open VS Code with GitHub Copilot (Agent mode)
- Install the Playwright MCP server (
npx @playwright/mcp@latest) - Open your Power BI report in the browser and copy the URL
- Ask Copilot: “Screenshot all pages of this Power BI report, download the PBIR definition, analyze the page navigation hierarchy, and create an Excalidraw file organized by category with level indicators and before/after comparison diagrams”
The AI handles the automation. You focus on the design decisions.
9. Beyond Prototyping: Visual Report Documentation
This workflow isn’t just for redesigning reports. It’s equally valuable as a documentation tool for important production reports:
- Onboarding new team members — Instead of clicking through a 30-page report live, hand them an Excalidraw file with every page screenshot, labeled with descriptions and navigation hierarchy. They see the full picture in one canvas.
- Change tracking — Run the screenshot workflow periodically and compare versions side by side. Visual diffs catch layout changes that text-based diffs miss.
- Stakeholder communication — Share the Excalidraw file (or a Figma capture) with business stakeholders to discuss which pages they actually use, which are redundant, and where gaps exist.
- Audit and compliance — For regulated environments, having a visual snapshot of every report page with timestamps serves as documentation of what was deployed and when.
- Cross-team alignment — When multiple teams build reports in the same workspace, the navigation graph reveals overlaps, orphaned pages, and opportunities to consolidate.
The same 10-minute automated process that enables prototyping also produces comprehensive visual documentation — with zero manual effort.
What’s Next
- Automated PBIR modification — Once the prototype is approved, programmatically update the report’s page structure to match the proposed design
- Semantic model analysis — Apply the same prototyping approach to data model optimization
- Template generation — Create reusable prototyping templates for common report patterns
Tools used: GitHub Copilot (Claude), Playwright MCP, Figma MCP, Excalidraw, Microsoft Fabric REST API, PowerShell, Python