tessl install github:mckinsey/vizro --skill dashboard-buildA skill that should be invoked whenever a user wants to build a Dashboard or simple app. This skill is Phase 2 of an e2e process that covers the actual build and testing. For Phase 1 (requirements, layout design, visualization selection), use the dashboard-design skill.
Review Score
72%
Validation Score
13/16
Implementation Score
85%
Activation Score
40%
/spec directory from Phase 1. If yes, use that to guide your build.app.py you will create, with uv run <script_name>.py or uv run app.py - this will ensure you use the correct dependencies and versions.sleep, echo, or anything else) in the terminal where the dashboard app is running, even if you started it with isBackground=true. This WILL kill the dashboard process. The dashboard startup takes time - be patient and let it run undisturbed.IMPORTANT: Each step produces a spec file in the spec/ directory to document reasoning, enable collaboration, and allow resumption in future sessions. Create the spec/ directory if it is not already present at the root of the project.
uv run ./scripts/get_model_json_schema.py <model_name> <model_name2> ... where <model_name> is the name of the model you want to get the schema for. You can get an overview of what is available by calling the overview script like so: uv run ./scripts/get_overview_vizro_models.py. This will print out all available models and their brief descriptions.Graph model in your dashboard app.uv run <your_dashboard_app>.py CRITICAL: After running this command, DO NOT run ANY other commands in that terminal. The dashboard takes time to start up (sometimes 10-30 seconds)sleep in it. Fix any warnings and even more important errors you encounter. ONLY once you see the dashboard running, inform the user. NEVER run any commands in that terminal after starting the dashboard.kpi_card() for simple metrics, kpi_card_reference() for comparisons. Use reverse_color=True when lower is better (costs, errors). NEVER put kpi_card or kpi_card_reference as a custom chart or re-build KPI cards as custom charts, use the built-in kpi_card and kpi_card_reference (imported from vizro.figures) in Figure model instead. Only accept exceptions for when the KPI card is strictly not possible, for example when dynamically showing text as a KPI card.Save this file BEFORE proceeding to Step 2:
# spec/4_implementation.yaml
implementation:
app_file: <name>.py
data_files:
- [list of data files used]
data_type: static/dynamic # static for DataFrames, dynamic for data_manager functions
data_sources:
- name: [data source name]
type: csv/database/api/function
caching: true/false
refresh_strategy: [if dynamic: cache timeout or refresh trigger]
spec_compliance:
followed_specs: true/false
deviations:
- spec_item: [What was specified]
actual: [What was implemented]
reason: [Why the deviation was necessary]
custom_charts:
- name: [Function name]
purpose: [What it does]Before proceeding to Step 2, verify against spec files:
spec/1_information_architecture.yaml, spec/2_interaction_ux.yaml and spec/3_visual_design.yaml are implemented if specs existspec/4_implementation.yamlThis requires the Playwright MCP server to be running. If not available, inform the user and skip this step. Look for mcp__*playwright__* tools.
When conducting the below tests, feel free to go back to Step 1 to fix any issues you find, then come back here.
Use: playwright:browser_navigate(url="http://localhost:8050")
Use: playwright:browser_click(element="Page Name", ref="...")
Use: playwright:browser_console_messages()Important things to check:
Save this file to complete the project:
# spec/5_test_report.yaml
testing:
launch:
successful: true/false
url: http://localhost:8050
errors: []
navigation:
all_pages_work: true/false
issues: []
console:
no_errors: true/false
errors_found: []
screenshot_tests:
performed: true/false
pages_tested: []
discrepancies:
- page: [Page name]
issue: [Description of visual issue]
fixed: true/false
notes: [Fix details or reason not fixed]
requirements_met: true/false
dashboard_ready: true/falsespec/ directory| File | When to Read |
|---|---|
| data_management.md | Optimizations: Data loading patterns, static vs dynamic, caching, databases, APIs |
| custom_charts_guide.md | Step 1: Creating complex custom charts when plotly express isn't enough |
| example_app.py | Step 1: Starting template for dashboard implementation |