Skip to content

Revert "fix: update firstAvailableSectionRef handling in TextRequestAdapter"#3135

Closed
yodem wants to merge 4 commits intomasterfrom
revert/fix-first-available-section-ref
Closed

Revert "fix: update firstAvailableSectionRef handling in TextRequestAdapter"#3135
yodem wants to merge 4 commits intomasterfrom
revert/fix-first-available-section-ref

Conversation

@yodem
Copy link
Collaborator

@yodem yodem commented Mar 8, 2026

Summary

Reverts commit 47b4636.

The original commit refactored firstAvailableSectionRef logic in TextRequestAdapter to 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

  • Verify firstAvailableSectionRef behavior is restored to pre-commit state
  • Run existing tests for TextRequestAdapter

🤖 Generated with Claude Code

yodem and others added 4 commits March 5, 2026 12:47
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.
@mergify
Copy link

mergify bot commented Mar 8, 2026

🧪 CI Insights

Here's what we observed from your CI run for 0d3d3d9.

🟢 All jobs passed!

But CI Insights is watching 👀

@yodem yodem closed this Mar 10, 2026
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