Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 21b707c97c
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| function isAtInputLimit() { | ||
| return estimateUrlSizeFromBlocks(blocks) >= URL_THRESHOLDS.danger | ||
| const size = (urlMetrics.version === contentVersion) | ||
| ? urlMetrics.size | ||
| : new Blob([location.href]).size | ||
| return size >= URL_THRESHOLDS.danger |
There was a problem hiding this comment.
Enforce URL limit using current blocks, not stale URL
When contentVersion changes, isAtInputLimit() now falls back to location.href size instead of the current blocks. During typing, contentVersion increments and the URL hash remains the old (smaller) saved hash until the debounce completes, so the limit check can undercount and allow typing/paste to exceed the 8KB threshold before the metrics refresh finishes. This regresses the “block input at 8KB” behavior for fast edits or large pastes because the limit is checked against stale data.
Useful? React with 👍 / 👎.
Motivation
Description
index.htmlso unlocking an encrypted preview renders decrypted blocks in preview-mode (read-only), refreshes the preview banner/graph/QR/status, and returns without pushing a new head or changing the saved hash; regular unlocks still update head/version and sync URL metrics (contentVersion,syncUrlMetricsToLocation,pushLocalVersion).docs/CODE_STRUCTURE.mdto reflect the shifted line ranges and renamed functions/sections after the script edits.Testing
Codex Task