Skip to content

Give a successful viz reply a link that renders the diagram - #24

Merged
Shashankss1205 merged 1 commit into
mainfrom
feat/slack-viz-link
Jul 30, 2026
Merged

Give a successful viz reply a link that renders the diagram#24
Shashankss1205 merged 1 commit into
mainfrom
feat/slack-viz-link

Conversation

@Shashankss1205

Copy link
Copy Markdown
Collaborator

/grapharc viz replies now end with a render this diagram link. The whole Mermaid document is zlib-compressed into the mermaid.live URL fragment, which a browser never sends to any server — the site's JavaScript renders it locally, so following the link ships the diagram to no one. Only a viz that did its job (exit 0, non-empty stdout) gets the line; failures and every other command are byte-for-byte unchanged.

Two new tests: the URL round-trips back to the exact Mermaid source, and neither a failed viz nor a non-viz command grows the link. Full slack-gateway suite (23) green, ruff check . clean.

🤖 Generated with Claude Code

Slack shows raw Mermaid as text. The reply now ends with a mermaid.live
link carrying the whole diagram zlib-compressed in the URL fragment,
which a browser never sends to any server — the site's JavaScript
renders it locally, so following the link ships the diagram to no one.
Only a `viz` that did its job gets the line; failures and every other
command are unchanged.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@Shashankss1205
Shashankss1205 merged commit 88bf104 into main Jul 30, 2026
6 checks passed
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