Skip to content

feat(visualize): add --canvas flag for Cursor topology view#45

Merged
fmenesesg merged 1 commit into
mainfrom
test/canvas-apps-data
Jun 11, 2026
Merged

feat(visualize): add --canvas flag for Cursor topology view#45
fmenesesg merged 1 commit into
mainfrom
test/canvas-apps-data

Conversation

@fmenesesg

@fmenesesg fmenesesg commented Jun 11, 2026

Copy link
Copy Markdown
Collaborator

Proposed change

Add a simple client-facing workflow to generate an interactive Cursor IDE topology canvas from any 3scale export, alongside the existing Markdown report.

Clients run one command:

threescale-visualize ./export -o ./report --canvas ./topology.canvas.tsx

Then copy the file to ~/.cursor/projects/<workspace>/canvases/ and open it in Cursor.

Type of change

  • New feature
  • Documentation
  • Tests / CI

RHCL checklist

  • Tests added or updated (go test ./...)
  • CI does not introduce -DskipTests without justification
  • No secrets in diff (tokens, kubeconfigs, OIDC secrets)
  • PR description and docs in English
  • Tested against export-minimal fixture

Summary

  • --canvas flag on threescale-visualize writes a self-contained .canvas.tsx with embedded export data
  • Policy chains fall back to proxy.json (policies_config) when policies.json is empty
  • Fixture demo at docs/examples/topology-demo.canvas.tsx (no customer data)
  • docs/VISUALIZE.md documents report + canvas workflow and Cursor setup

Changes

File Change
internal/visualize/canvas_data.go Build compact canvas payload from tenant export
internal/visualize/canvas.go Embed template and write .canvas.tsx
internal/visualize/canvas/topology.canvas.tsx.tmpl Generic topology canvas (charts, graph, sortable table)
internal/visualize/cli/cli.go --canvas flag
internal/visualize/loader.go Policy chain fallback from proxy.json
docs/examples/topology-demo.canvas.tsx Demo from export-minimal fixture
docs/VISUALIZE.md Client workflow + Cursor instructions
docs/TEST_CASES.md TC-VIZ-004

Test plan

  • go test ./...
  • threescale-visualize internal/visualize/testdata/export-minimal --canvas docs/examples/topology-demo.canvas.tsx
  • Generated demo contains seed_alpha, no customer references

@fmenesesg fmenesesg requested a review from pcastelo as a code owner June 11, 2026 21:51
@fmenesesg fmenesesg added the type:tests-ci Tests, CI/CD, or workflow changes label Jun 11, 2026
@fmenesesg fmenesesg changed the title test(visualize): embed subscribed apps in Copec canvas data feat(visualize): add --canvas flag for Cursor topology view Jun 11, 2026
Generate an interactive topology canvas from any export with a single CLI
flag, embed policy chains from proxy.json when policies.json is empty, and
ship a fixture-based demo plus docs for client use.

Co-authored-by: Cursor <cursoragent@cursor.com>
@fmenesesg fmenesesg force-pushed the test/canvas-apps-data branch from 0757338 to 32cd7d7 Compare June 11, 2026 23:01
@fmenesesg fmenesesg merged commit 53cecd5 into main Jun 11, 2026
1 check passed
@fmenesesg fmenesesg deleted the test/canvas-apps-data branch June 11, 2026 23:02
fmenesesg added a commit that referenced this pull request Jun 11, 2026
Generate an interactive topology canvas from any export with a single CLI
flag, embed policy chains from proxy.json when policies.json is empty, and
ship a fixture-based demo plus docs for client use.

Co-authored-by: Francisco Meneses <fmeneses@fmeneses-thinkpadp16vgen1.rmtcl.csb>
Co-authored-by: Cursor <cursoragent@cursor.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

type:tests-ci Tests, CI/CD, or workflow changes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant