Skip to content

Add HubSpot HTML export to Design - #8086

Merged
shawnmcclelland merged 11 commits into
mainfrom
shawnmcclelland/changes-1792557591
Oct 23, 2026
Merged

shawnmcclelland merged 11 commits into
mainfrom
shawnmcclelland/changes-1792557591

Conversation

@shawnmcclelland

Copy link
Copy Markdown
Contributor

Frames currently export browser HTML that can lose their layout and styling when imported as HubSpot email templates. This adds Export HubSpot HTML to ordinary HTML frames, with inline styles and validation of HubL tokens, the required footer, links, and public email-safe images. When a frame needs conversion, the export flow can ask the agent to create a compatible copy while preserving the original.

The Design agent now has HubSpot email authoring guidance, sample recipient previews, and desktop/mobile screenshot checks. Supporting fixes keep long email frames visible on the canvas, allow read-only export verification, and ensure background task waits and fenced result writes remain fresh and transactional.

This is the marketing-team MVP: download the HTML and import it into HubSpot. Direct HubSpot publishing is deferred.

Validation:

  • Exercised eight agent-generated email scenarios, including mobile columns, long personalized copy, broken images, and conversion of an existing frame.
  • Checked exported HTML and desktop/mobile previews; the user separately confirmed a successful import into HubSpot.
  • Focused exporter, UI, screenshot, agent task, and PostgreSQL transaction tests passed.
  • Design and core TypeScript checks, the core build, formatting, and both localization guards passed.

Email-client rendering beyond these local browser previews still needs marketing feedback; this does not claim universal inbox compatibility.

builder-io-integration[bot]

This comment was marked as outdated.

builder-io-integration[bot]

This comment was marked as outdated.

builder-io-integration[bot]

This comment was marked as outdated.

builder-io-integration[bot]

This comment was marked as outdated.

Copy link
Copy Markdown
Contributor Author

Addressed the review-body performance concern in ebbb123: selection/context updates cache email classification by live file object and invalidate on content edits. On the exact 48-screen, 26.37 MB runtime fixture, repeated classification dropped from 453–717 ms to 0.04–0.14 ms. The failed runtime artifact already showed the intended heading selected; the next head will run the unchanged event/budget check. The related stale publisher fixtures and bounded-polling test are corrected. Combined local proof: 307 Design tests, 21 browser-team tests, typechecks and relevant guards pass; all eight accepted email exports also pass live image-byte verification.

builder-io-integration[bot]

This comment was marked as outdated.

Copy link
Copy Markdown
Contributor Author

Review follow-up in 0001874: unified linear HubL scanning for classification/export/preview; safe placeholder restoration now preserves preexisting ANHUBLTOKEN text rather than producing undefined. Also closed the reported fallback-markup, clipping/opacity, and responsive shorthand/original-inline gaps.

431 targeted Design tests, Design TypeScript, formatting/source lint, localization guards, and all eight accepted sample exports (including their live public images) pass locally. The runtime budget retry on ebbb123 also passed.

Two review-body suggestions remain deliberate MVP boundaries: image verification checks bounded format signatures, dimensions, MIME and expected endings rather than decoding every pixel; and all image checks share the existing 15-second export deadline so total run time stays bounded. Those limitations are not treated as full image-decoder or universal inbox-rendering certification. The marketing team has already verified a HubSpot import; direct publishing remains deferred.

builder-io-integration[bot]

This comment was marked as outdated.

Copy link
Copy Markdown
Contributor Author

Follow-up 6671672 closes the confirmed preview/control-tag and legal-text paint/clipping gaps. 439 targeted Design tests, TypeScript, source lint/formatting, localization guards, all eight accepted exports, and their live image checks pass. The clipping case was independently reproduced in Chromium with a visible fixed-height control; the MVP now rejects that uncertain arrangement explicitly rather than claiming to compute browser layout.

Dispositions for the additional review-body items: full pixel decoding remains outside this MVP; the shared 15-second deadline, four workers, and 32-image cap intentionally bound the complete image batch (including work already in flight on an error); strict JPEG terminal-marker handling is a conservative export-profile restriction. No promise of universal asset decoding/inbox rendering is made. Repeated fresh task waits retain the existing iteration/token/abort/continuation budgets; a separate progress policy is outside this email change.

The unrelated Slides polling assertion passed unchanged in isolation and with all 79 tests in its file locally. A targeted CI retry was requested on the previous head; this Design-only follow-up now has a fresh CI run.

builder-io-integration[bot]

This comment was marked as outdated.

Copy link
Copy Markdown
Contributor Author

Screenshot review follow-up a2b6fff: fixed offscreen lazy-image readiness and delayed/failed stylesheet handling with six failing-first Chromium cases. All 12 readiness tests and 29 screenshot action tests pass, along with Design TypeScript, source lint/formatting and localization guards. Browser contexts are closed and Page listeners are cleaned up on every exit.

The newest review summary's references to older open items are stale: text-fill/clip-path validation was fixed in 6671672; full image decoding and an additional task-poll policy have explicit MVP-scope dispositions in their existing threads and the previous recap. All current inline threads have replies and are resolved. The PR remains open for review.

@builder-io-integration builder-io-integration Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Builder reviewed your changes — looks good ✅

Review Details

Incremental review summary

Reviewed the latest PR head for the HubSpot email export, screenshot readiness, and related Design/core changes. The updated screenshot readiness logic now explicitly promotes lazy images and tracks stylesheet requests, including imports, through load/error or a bounded typed failure; integration coverage exercises lazy images and delayed, failed, and stalled stylesheets. The exporter continues to validate image sources through the SSRF-safe fetch path and the action reads an access-scoped design frame. Risk classification: Standard. The two previously open screenshot findings are fixed and their threads were resolved. Review agents found no additional confirmed issues distinct from existing feedback, so no comments are being repeated. Browser verification remains unavailable because the browser-test-planner agent is not installed in this environment. 🧪 Browser testing: Skipped — browser-test-planner is unavailable in this environment.

@shawnmcclelland shawnmcclelland self-assigned this Oct 23, 2026
@shawnmcclelland
shawnmcclelland merged commit 4472c54 into main Oct 23, 2026
78 checks passed
@shawnmcclelland
shawnmcclelland deleted the shawnmcclelland/changes-1792557591 branch October 23, 2026 11:09
@github-actions

Copy link
Copy Markdown
Contributor

Here's a visual recap of what changed:

Visual recap

Open the full interactive recap

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.

2 participants