Skip to content

feat(core): in-app previews (Slack, HubSpot, HTML) and workflow dry runs - #697

Open
seanspeaks wants to merge 6 commits into
claude/shared-conversation-8hgmbr-stack-5-definitions-as-typesfrom
claude/shared-conversation-8hgmbr-stack-6-previews
Open

seanspeaks wants to merge 6 commits into
claude/shared-conversation-8hgmbr-stack-5-definitions-as-typesfrom
claude/shared-conversation-8hgmbr-stack-6-previews

Conversation

@seanspeaks

@seanspeaks seanspeaks commented Oct 19, 2026 •

Copy link
Copy Markdown
Contributor

Stack 6 of 9. Stacked on #696.

Summary

These show how an integration appears inside the app it touches, before anything is installed.

  • Renderers in renderers/ for Slack Block Kit, the HubSpot UI-extension component tree, and HTML. A definition's UI surfaces become what that app would display.
  • Dry runs (preview.js). A workflow runs against sample data with no writes. The preview reports every call it would make and what each message would look like.
  • Fix: Slack messages are escaped. A new mrkdwn template filter escapes record data. Before this, a deal named *x* <!channel> would have formatted the message or pinged the channel. The Slack examples now use the filter.

PR 8 checks the HubSpot component names against @hubspot/ui-extensions.

Test plan

  • Same 31 pre-existing failures as next at this commit. Nothing new fails.
  • Renderer and preview tests, plus a test for the escape filter.

Generated by Claude Code


Note

Medium Risk
Changes how Slack message text is built in production via the new mrkdwn filter and adds substantial preview/dry-run code paths that must stay non-executing and XSS-safe; misconfiguration could still leak unescaped template content if authors omit the filter.

Overview
Adds in-app preview rendering for data-defined integrations so authors can see UI surfaces and workflow side effects before anything is deployed to HubSpot, Slack, or other hosts.

New renderers/ turns resolved view trees into Slack Block Kit, a HubSpot UI-extension component tree, and sandboxed HTML (escaped data, http(s)-only links, Block Kit limits). previewSurface and previewWorkflow reuse the same query/view/workflow paths as production but swap in recordingPorts so capability calls are recorded and answered from fixtures—no real API writes. Public exports include viewToSlack, viewToHubSpot, viewToHtml, decodeAction, and related helpers; ADR-063 and the package README document preview vs future deployed host renderers.

Slack safety: a new mrkdwn template filter escapes interpolated record fields in outbound messages; HubSpot/Asana Slack examples now pipe user-controlled names/subjects through it. View-to-Slack rendering also escapes record-driven text and encodes userAction button payloads for round-trip decoding.

Coverage is a large renderers.test.js suite (escaping, limits, dry runs across examples, network traps).

Reviewed by Cursor Bugbot for commit 20e3e54. Bugbot is set up for automated code reviews on this repo. Configure here.

📦 Published PR as canary version: 2.0.0--canary.697.20e3e54.0

✨ Test out this PR locally via:

npm install @friggframework/admin-scripts@2.0.0--canary.697.20e3e54.0
npm install @friggframework/core@2.0.0--canary.697.20e3e54.0
npm install @friggframework/devtools@2.0.0--canary.697.20e3e54.0
npm install @friggframework/eslint-config@2.0.0--canary.697.20e3e54.0
npm install @friggframework/prettier-config@2.0.0--canary.697.20e3e54.0
npm install @friggframework/schemas@2.0.0--canary.697.20e3e54.0
npm install @friggframework/serverless-plugin@2.0.0--canary.697.20e3e54.0
npm install @friggframework/test@2.0.0--canary.697.20e3e54.0
npm install @friggframework/ui@2.0.0--canary.697.20e3e54.0
# or 
yarn add @friggframework/admin-scripts@2.0.0--canary.697.20e3e54.0
yarn add @friggframework/core@2.0.0--canary.697.20e3e54.0
yarn add @friggframework/devtools@2.0.0--canary.697.20e3e54.0
yarn add @friggframework/eslint-config@2.0.0--canary.697.20e3e54.0
yarn add @friggframework/prettier-config@2.0.0--canary.697.20e3e54.0
yarn add @friggframework/schemas@2.0.0--canary.697.20e3e54.0
yarn add @friggframework/serverless-plugin@2.0.0--canary.697.20e3e54.0
yarn add @friggframework/test@2.0.0--canary.697.20e3e54.0
yarn add @friggframework/ui@2.0.0--canary.697.20e3e54.0

…TML renderers, dry-run workflows)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NGC9SnFuqdjX2xH2qeu8vw
…dry runs

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NGC9SnFuqdjX2xH2qeu8vw
A deal named "*x* <!channel>" interpolated into a Slack template would
format or ping the channel. The mrkdwn template filter escapes record data
(entities, formatting fences, backticks) and the Slack-posting examples use
it; the definition's own markup is untouched.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NGC9SnFuqdjX2xH2qeu8vw

@claude claude Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Code review skipped — your organization has no extra usage available to pay for this review.

If your organization's extra usage balance is empty, an organization admin can add extra usage credits at claude.ai/admin-settings/usage. If its monthly spend limit was reached, an admin can raise it on the same page. If neither applies, contact Anthropic support.

Once extra usage is available, someone with write access to this repository can comment @claude review on this pull request to trigger a review.

@seanspeaks seanspeaks added release Create a release when this pr is merged prerelease This change is available in a prerelease. labels Oct 19, 2026 — with Claude

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes using high effort and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 2348cde. Configure here.

Comment thread packages/core/integrations/data-defined/renderers/preview.js
@seanspeaks

Copy link
Copy Markdown
Contributor Author

ADR reconciliation needed after Stack A/B — drafted with Claude Code at Sean's request

Severity: cross-ref only.

…renderers

Sections 16 and 19 said "renderers are not in v0.1". With previews added,
say which: the Slack, HubSpot and HTML renderers are preview renderers that
run inside the app; the deployed host renderer is still not built.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NGC9SnFuqdjX2xH2qeu8vw
…n-5, admin-routes-5, earlier levels); neutral names in previews

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NGC9SnFuqdjX2xH2qeu8vw
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NGC9SnFuqdjX2xH2qeu8vw
@sonarqubecloud

Copy link
Copy Markdown

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

prerelease This change is available in a prerelease. release Create a release when this pr is merged

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants