Skip to content

fix: pipeline DAG renders as text — single-quote x-data JS comment#137

Merged
SimplicityGuy merged 2 commits into
mainfrom
fix/dag-canvas-xdata-quote
Jun 15, 2026
Merged

fix: pipeline DAG renders as text — single-quote x-data JS comment#137
SimplicityGuy merged 2 commits into
mainfrom
fix/dag-canvas-xdata-quote

Conversation

@SimplicityGuy

Copy link
Copy Markdown
Owner

Problem

The live pipeline dashboard rendered the entire Alpine nodes getter expression as visible page text instead of the graph (reported on the homelab UI).

Root cause: in src/phaze/templates/pipeline/partials/dag_canvas.html, a JS comment inside the parent #pipeline-dag x-data="..." attribute used double quotes:

// where 0 == "no online agent" (fail-safe default). NO stage_controls ...

The x-data attribute is opened with ", so the browser ends the attribute at the first " of "no online agent" and spills the rest of the getter (fingerprint_scan → proposals → scrape → match → }; } }">) into the DOM as text. Introduced in Phase 40 (the fingerprint_scan node comment).

Fix

  • Change the comment's "no online agent"'no online agent'. The getter otherwise uses single quotes for every JS string, so this restores a single well-formed attribute.
  • Add a regression guard test_xdata_getter_has_no_unescaped_double_quotes that extracts the #pipeline-dag x-data attribute value and asserts it contains zero literal " characters.

No layout change — NODE_LAYOUT / EDGES / canvas dimensions are untouched.

Verification

  • New guard reads 0 double-quotes on the fix, 2 if the bug is reintroduced.
  • uv run pytest tests/test_dag_canvas_render.py → 30 non-DB tests pass (the 4 test_integration_* errors are absent local Postgres only).
  • pre-commit run --files ... → all hooks clean.

🤖 Generated with Claude Code

SimplicityGuy and others added 2 commits June 15, 2026 09:25
…ext)

A JS comment inside the parent #pipeline-dag Alpine x-data attribute used
double quotes (`"no online agent"`). The attribute is opened with `"`, so the
browser terminated it at the first inner `"` and dumped the rest of the Alpine
`nodes` getter into the page as visible text (Phase-40 fingerprint_scan comment).

Switch the comment to single quotes and add a regression guard
(test_xdata_getter_has_no_unescaped_double_quotes) that asserts the
#pipeline-dag x-data attribute value contains zero literal double-quotes.

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

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@SimplicityGuy SimplicityGuy merged commit 8455539 into main Jun 15, 2026
14 checks passed
@SimplicityGuy SimplicityGuy deleted the fix/dag-canvas-xdata-quote branch June 15, 2026 16:35
@codecov

codecov Bot commented Jun 15, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

SimplicityGuy added a commit that referenced this pull request Jun 15, 2026
Patch release: pipeline DAG dashboard rendering fix.

- #137 single-quote the x-data JS comment so the pipeline DAG renders as a
  graph instead of dumping the Alpine `nodes` getter into the page as text
  (Phase-40 `fingerprint_scan` comment regression), + regression guard.

Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant