Revert "fix: update firstAvailableSectionRef handling in TextRequestAdapter"#3135
Closed
Revert "fix: update firstAvailableSectionRef handling in TextRequestAdapter"#3135
Conversation
new URL('//...') throws ERR_INVALID_URL in Node.js — normalize protocol-relative
URLs to https: before parsing, wrap in try-catch for other malformed inputs,
and update YouTube/Vimeo/SoundCloud regexes to match // prefix so embeds render.
Fixes production crash on /sheets/217360 (sc-42460)
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…rams Old regex required rel=0 and showinfo=0 at the end, causing plain YouTube embed URLs (e.g. //www.youtube.com/embed/<id>) to fall through to 'Error loading media...' instead of rendering. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Refactor the logic for 'firstAvailableSectionRef' to ensure it returns the normal reference of the first available section if it exists, otherwise defaults to the normal reference of the current object. This change improves the robustness of section reference handling.
…dapter" This reverts commit 47b4636.
🧪 CI InsightsHere's what we observed from your CI run for 0d3d3d9. 🟢 All jobs passed!But CI Insights is watching 👀 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Reverts commit 47b4636.
The original commit refactored
firstAvailableSectionReflogic inTextRequestAdapterto return the normal reference of the first available section if it exists, otherwise defaulting to the normal reference of the current object.Reason for Revert
This commit is being reverted. Please add context here for why this change needs to be undone.
Test plan
firstAvailableSectionRefbehavior is restored to pre-commit stateTextRequestAdapter🤖 Generated with Claude Code