Skip to content

Clamp persisted custom preview viewports#305

Merged
BunsDev merged 1 commit intomainfrom
okcode/browser-toolbar-fix
Apr 6, 2026
Merged

Clamp persisted custom preview viewports#305
BunsDev merged 1 commit intomainfrom
okcode/browser-toolbar-fix

Conversation

@BunsDev
Copy link
Copy Markdown
Contributor

@BunsDev BunsDev commented Apr 6, 2026

Summary

  • Clamp custom preview viewport dimensions when reading persisted state so old or malformed values cannot reintroduce out-of-range sizes.
  • Reuse a shared clamping helper for both persistence hydration and runtime updates to keep viewport normalization consistent.
  • Simplify the custom viewport setter by delegating the bounds logic to the shared helper.

Testing

  • Not run (PR description only).
  • Existing checks expected before merge: bun fmt, bun lint, bun typecheck.

- Normalize stored custom viewport dimensions on read
- Reuse shared clamping logic when setting preview sizes
@vercel
Copy link
Copy Markdown

vercel bot commented Apr 6, 2026

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

Project Deployment Actions Updated (UTC)
okcode-marketing Ready Ready Preview Apr 6, 2026 1:03am
v0-compute-the-platform-to-build Ready Ready Preview, Open in v0 Apr 6, 2026 1:03am

@github-actions github-actions bot added size:S vouch:trusted PR author is trusted by repo permissions or the VOUCHED list. labels Apr 6, 2026
@BunsDev BunsDev merged commit f2653c6 into main Apr 6, 2026
10 of 11 checks passed
@BunsDev BunsDev deleted the okcode/browser-toolbar-fix branch April 6, 2026 21:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:S vouch:trusted PR author is trusted by repo permissions or the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant