Skip to content

fix(landing): stabilize previews across browsers - #7131

Merged
waleedlatif1 merged 2 commits into
stagingfrom
codex/fix-safari-landing-previews
Aug 26, 2026
Merged

fix(landing): stabilize previews across browsers#7131
waleedlatif1 merged 2 commits into
stagingfrom
codex/fix-safari-landing-previews

Conversation

@waleedlatif1

Copy link
Copy Markdown
Collaborator

Summary

  • replace scaled SVG foreign objects with a shared responsive HTML stage across landing previews
  • keep workflow edges in SVG while rendering animated cards in stable HTML coordinates
  • isolate preview layout work and avoid React rerenders during resize

Type of Change

  • Bug fix

Testing

  • Tested manually in Chromium and WebKit across all landing routes
  • Verified animated sidebar and workflow geometry remain stable frame-to-frame
  • Added focused scale calculation tests
  • Ran lint, TypeScript, block-registry checks, and all repository audits

Checklist

  • Code follows project style guidelines
  • Self-reviewed my changes
  • Tests added/updated and passing
  • No new warnings introduced
  • I confirm that I have read and agree to the terms outlined in the Contributor License Agreement (CLA)

@vercel

vercel Bot commented Aug 26, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

1 Skipped Deployment
Project Deployment Actions Updated (UTC)
docs Skipped Skipped Aug 26, 2026 10:53pm

Request Review

@cubic-dev-ai cubic-dev-ai 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.

No issues found across 11 files

Confidence score: 5/5

  • Automated review surfaced no issues in the provided summaries.
  • No files require special attention.

Re-trigger cubic

@greptile-apps

greptile-apps Bot commented Aug 26, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

The PR replaces SVG foreignObject-based landing previews with a shared responsive HTML design stage to stabilize cross-browser rendering.

  • Adds an imperative ResizeObserver-driven scale calculation with focused unit tests.
  • Keeps workflow edges in SVG while rendering cards and preview surfaces as HTML.
  • Migrates shared landing preview shells to the responsive stage.

Confidence Score: 5/5

The PR appears safe to merge.

No blocking failure remains.

Important Files Changed

Filename Overview
apps/sim/app/(landing)/components/shared/responsive-design-stage/responsive-design-stage.tsx Introduces the shared fixed-design responsive stage and applies measured scaling without React resize rerenders.
apps/sim/app/(landing)/components/shared/responsive-design-stage/responsive-design-stage.test.ts Covers limiting dimensions, inset handling, maximum scale, and unmeasurable hosts.
apps/sim/app/(landing)/components/hero/components/hero-platform-loop/hero-workflow-stage.tsx Moves animated workflow cards from SVG foreign objects into the shared HTML coordinate surface while retaining SVG edges.
apps/sim/app/(landing)/components/shared/hero-loop-shell/hero-loop-shell.tsx Migrates the shared landing preview shell from an SVG foreign object to the responsive HTML stage.
apps/sim/app/(landing)/components/shared/responsive-design-stage/index.ts Re-exports the responsive stage through the requested application alias, resolving the previous review thread.

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart TD
  Host[Preview host] --> Observer[ResizeObserver]
  Observer --> Scale[Calculate fitted scale]
  Scale --> Stage[Fixed-size HTML design stage]
  Stage --> Sidebar[HTML sidebar and content]
  Stage --> Cards[HTML workflow cards]
  Stage --> Edges[SVG workflow edges]
Loading

Reviews (2): Last reviewed commit: "chore(landing): use absolute stage expor..." | Re-trigger Greptile

Comment thread apps/sim/app/(landing)/components/shared/responsive-design-stage/index.ts Outdated
@waleedlatif1

Copy link
Copy Markdown
Collaborator Author

@greptile

@waleedlatif1
waleedlatif1 merged commit cc5a39a into staging Aug 26, 2026
23 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