pbi-cli/tests
Mina Saad bc9a1ab3d0
feat: add custom visual authoring (vibe-code .pbiviz) (#4)
* feat: add custom visual authoring (vibe-code .pbiviz)

Ship the Power BI Custom Visuals workflow as a Claude skill plus three
thin pbi-cli commands. The skill scaffolds a TypeScript project sibling
to the .pbip via npx pbiviz new, iterates against the SDK with
tsc --noEmit between every change, packages a .pbiviz, and embeds it
into the report.

Commands:
- pbi visual import-custom <pbiviz> [--replace]: copy locally-built
  .pbiviz into StaticResources/RegisteredResources/ and register in
  report.json (customVisuals + resourcePackages).
- pbi visual list-custom: list embedded and public custom visuals,
  distinguished by kind.
- pbi visual remove-custom <guid-or-name>: deregister and physically
  delete the .pbiviz.

Skill (power-bi-custom-visuals/):
- Auto-installs Node and pbiviz with user consent on first run.
- Pins powerbi-visuals-tools and powerbi-visuals-api to known-good
  versions matched against the AGENTS.md crib.
- Sibling-directory scaffold; never contaminates PBIR folders.
- Plan-then-code on fresh scaffolds (data roles + render approach).
- Agent-driven inner loop on tsc --noEmit with 5-turn no-progress cap
  and oscillation detection.
- Auto-bumps pbiviz.json patch on every package to invalidate Power BI
  Desktop's GUID+version cache; respects manual user version overrides.
- npm allowlist baked into SKILL.md (D3, Lodash, date-fns,
  powerbi-visuals-utils-*); off-list installs require explicit
  approval with name + version + reason + bundle-size justification.

Tests:
- 25 unit tests with synthetic in-memory .pbiviz fixtures, no Node
  required.
- New nightly + on-touch GitHub workflow runs the full pbiviz toolchain
  end-to-end on Windows runners to catch SDK-version drift.

Out of scope (deferred): pbiviz start live preview, AppSource
register-public flow, freeze-version publish helper, inspect-custom.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

* chore: bump version to 3.11.0

Minor version bump for the additive custom visual authoring feature
(new power-bi-custom-visuals skill plus three new pbi visual commands).
No breaking changes.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

* fix: visual names must be letters/digits only

The pbiviz new command rejects names containing anything other than
letters and digits, with the error "The visual name can contain only
letters and numbers". The smoke workflow and docs used hyphenated names
(smoke-visual, my-gauge-visual) that fail at scaffold time.

- Rename smoke workflow's visual to smokevisual
- Document the naming constraint in SKILL.md so Claude strips hyphens
  and underscores from user-provided names before scaffolding
- Update README example to mygaugevisual

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-03 23:59:29 +03:00
..
mocks feat: initial pbi-cli project with all 20+ command groups 2026-03-26 13:05:53 +02:00
test_commands fix: resolve CI failures from _ensure_ready removal 2026-04-05 22:27:40 +02:00
__init__.py feat: initial pbi-cli project with all 20+ command groups 2026-03-26 13:05:53 +02:00
conftest.py fix: resolve CI failures from _ensure_ready removal 2026-04-05 22:27:40 +02:00
test_bookmark_backend.py fix: resolve CI failures (formatting, mypy, test import) 2026-04-02 15:59:49 +02:00
test_bulk_backend.py fix: resolve CI failures (formatting, mypy, test import) 2026-04-02 15:59:49 +02:00
test_claude_md.py feat: v2.1.0 - improve Claude skill triggering and CLAUDE.md auto-injection 2026-03-27 12:00:41 +02:00
test_config.py feat: v2.0.0 - replace MCP server with direct pythonnet/.NET TOM interop 2026-03-27 07:19:21 +02:00
test_connection_store.py feat: add REPL mode, test suite, CI/CD, and Claude Skills (Sprints 6-8) 2026-03-26 13:54:24 +02:00
test_custom_visual_backend.py feat: add custom visual authoring (vibe-code .pbiviz) (#4) 2026-05-03 23:59:29 +03:00
test_e2e.py feat: v2.0.0 - replace MCP server with direct pythonnet/.NET TOM interop 2026-03-27 07:19:21 +02:00
test_errors.py feat: v2.0.0 - replace MCP server with direct pythonnet/.NET TOM interop 2026-03-27 07:19:21 +02:00
test_filter_backend.py fix: resolve CI failures (formatting, mypy, test import) 2026-04-02 15:59:49 +02:00
test_format_backend.py fix: resolve lint E501 and update gradient structure test 2026-04-30 13:26:09 +03:00
test_hardening.py fix: correct 7 PBIR report-layer issues found during Desktop testing 2026-04-07 17:13:41 +02:00
test_helpers.py feat: v2.0.0 - replace MCP server with direct pythonnet/.NET TOM interop 2026-03-27 07:19:21 +02:00
test_output.py feat: v2.0.0 - replace MCP server with direct pythonnet/.NET TOM interop 2026-03-27 07:19:21 +02:00
test_pbir_path.py fix: resolve CI failures (formatting, mypy, test import) 2026-04-02 15:59:49 +02:00
test_pbir_validators.py fix: correct 7 PBIR report-layer issues found during Desktop testing 2026-04-07 17:13:41 +02:00
test_platform.py feat: v2.0.0 - replace MCP server with direct pythonnet/.NET TOM interop 2026-03-27 07:19:21 +02:00
test_preview.py fix: resolve CI failures (formatting, mypy, test import) 2026-04-02 15:59:49 +02:00
test_report_backend.py fix: wrap long lines in tests to pass ruff E501 (>100 chars) 2026-04-07 17:17:13 +02:00
test_skill_triggering.py fix: resolve CI failures (formatting, mypy, test import) 2026-04-02 15:59:49 +02:00
test_tmdl_diff.py fix: resolve CI failures (formatting, mypy, test import) 2026-04-02 15:59:49 +02:00
test_visual_backend.py fix: wrap long lines in tests to pass ruff E501 (>100 chars) 2026-04-07 17:17:13 +02:00
test_visual_calc.py fix: resolve CI failures (formatting, mypy, test import) 2026-04-02 15:59:49 +02:00