Skip to content

Sync SponsorBlock 5.14..9a526c5 and DeArrow 2.1.8; remove dearrowPromotion; src-only Discord cleanup#21

Merged
erkinalp merged 6 commits intomasterfrom
devin/1757949796-upstream-sync
Sep 15, 2025
Merged

Sync SponsorBlock 5.14..9a526c5 and DeArrow 2.1.8; remove dearrowPromotion; src-only Discord cleanup#21
erkinalp merged 6 commits intomasterfrom
devin/1757949796-upstream-sync

Conversation

@devin-ai-integration
Copy link
Contributor

@devin-ai-integration devin-ai-integration bot commented Sep 15, 2025

  • I agree to license my contribution under GPL-3.0 and agree to allow distribution on app stores as outlined in LICENSE-APPSTORE

To test this pull request, follow the instructions in the wiki.


Summary

This PR syncs upstream changes from SponsorBlock (v5.14 through PR #2323 merge commit 9a526c5) and DeArrow (v2.1.5 to v2.1.8), while performing source-only Discord cleanup and preserving EditTogether branding.

Link to Devin run: https://app.devin.ai/sessions/2d2506a1f8644d64bd8dfcd40bd8f772
Requester: Erkin Alp Güney (@erkinalp)

Key Changes

🔄 Error Handling Modernization (SponsorBlock sync)

  • Breaking change: Migrated VoteResponse from {successType, statusCode, responseText} to union type {status, ok, responseText} | {error}
  • New utilities: Added errorFormat.ts and requestLogging.ts for consistent error handling across the extension
  • Updated all voting components: CategoryPill, ChapterVote, SegmentList, content script voting, and popup voting now use the new response format
  • Enhanced error logging: Non-OK requests now get logged with context for debugging

🧹 Discord Cleanup (Source Only)

  • Removed Discord links from popup, submission components, and auto-warning dialogs
  • Removed Discord config fields: Deleted hideDiscordLaunches and hideDiscordLink from config interface
  • Preserved Matrix links: Replaced Discord references with Matrix community links where appropriate
  • ⚠️ Note: public/_locales intentionally left untouched to avoid CI issues with external translation repo

🎯 DeArrow 2.1.8 Updates

  • New EndAutonav support: Added observers and branding location for YouTube's end-screen auto-navigation suggestions
  • Title formatting fixes: Updated formatTitleInternal parameter structure and fixed fancy text to not force uppercase
  • Selector improvements: Enhanced mobile Shorts support (ytm-shorts-lockup-view-model), improved playlist detection with start_radio filtering
  • Thumbnail renderer updates: Added EndAutonav handling for thumbnail replacement in end-screen suggestions

Files Modified

Core Logic: background.ts, content.ts, messageTypes.ts, config.ts
UI Components: CategoryPillComponent.tsx, ChapterVoteComponent.tsx, PopupComponent.tsx, SegmentListComponent.tsx, SubmissionComponent.tsx
Branding System: videoBranding.ts, watchPageBrandingHandler.ts, thumbnailRenderer.ts
Title Formatting: titleFormatter.ts
New Utilities: errorFormat.ts, requestLogging.ts

⚠️ Critical Review Areas

🔴 High Priority - Error Handling Migration

  • Voting response handling: Verify all voting components correctly handle both {status, ok, responseText} and {error} response types
  • Error message display: Confirm users see appropriate error messages for failed votes (not technical stack traces)
  • Rate limiting: Ensure 429 status codes are still treated as success for voting

🟡 Medium Priority - DOM Selectors & Branding

  • YouTube surface coverage: Test title/thumbnail replacement on watch page, search results, home feed, Shorts, and end-screen suggestions
  • EndAutonav functionality: Verify new end-screen auto-navigation branding works correctly
  • Mobile compatibility: Check that mobile selector updates work on YouTube mobile interface

🟢 Low Priority - Cleanup Verification

  • Discord removal completeness: Confirm no Discord references remain in src/ directory (excluding public/_locales)
  • Matrix links functional: Verify Matrix community links work and point to correct rooms

Testing Recommendations

  1. Manual voting test: Vote on segments across different surfaces and verify success/error messages
  2. Cross-surface branding: Check title/thumbnail replacement on watch, search, home, Shorts, and end-screens
  3. Error scenarios: Test voting with network issues to verify error handling
  4. Link verification: Confirm Matrix links work, no broken Discord links remain

Risk Assessment

This is a high-impact PR with significant changes to core voting logic and error handling. The main risks are:

  1. Error handling regressions from the VoteResponse type migration
  2. DOM selector brittleness due to YouTube interface changes
  3. Incomplete error path coverage in the voting system migration

The automated tests pass, but manual testing across YouTube surfaces is strongly recommended to catch selector-related issues and verify the voting user experience.

devin-ai-integration bot and others added 3 commits September 15, 2025 15:23
…from config; no changes to public/_locales

Co-Authored-By: Erkin Alp Güney <erkinalp9035@gmail.com>
…ng; avoid submodule changes by inlining helpers; src-only Discord cleanup preserved

Co-Authored-By: Erkin Alp Güney <erkinalp9035@gmail.com>
Co-Authored-By: Erkin Alp Güney <erkinalp9035@gmail.com>
@devin-ai-integration
Copy link
Contributor Author

Original prompt from Erkin
erkinalp/EditTogether can you sync with ajayyy/SponsorBlock (PR #2323 merge, commit 9a526c5f2b4aeb89c3d053beae615a901525cdaa) and ajayyy/DeArrow (release 2.1.8), preserving the EditTogether branding and interface changes? This upstream sync is the main priority (previous sync was SponsorBlock 5.14 and DeArrow 2.1.5).

Before starting work, analyze the complete diff of SponsorBlock between the PR 2323 and release 5.14 to understand all files that need syncing, then create a comprehensive plan covering all changes in one go rather than discovering them incrementally. Same with changes between DeArrow 2.1.5 and DeArrow 2.1.8. Due to our merged codebase, some of the changes in either may be redundant.

For Discord cleanup: Only clean up Discord references in source code (src/ directory), NOT in the public/_locales submodule. The locale files point to an external repo (ajayyy/ExtensionTranslations) so modifying them causes CI issues. Focus on cleaning up Discord references in src/config.ts, popup components, and any other source files.

If CI fails more than twice, ask me for help instead of continuing to debug - don't spend too much time on CI issues.

Priority order: 1) Upstream sync from SponsorBlock/DeArrow, 2) Source code Discord cleanup, 3) Everything else.


You only need to look in the following repo: erkinalp/EditTogether

@devin-ai-integration
Copy link
Contributor Author

🤖 Devin AI Engineer

I'll be helping with this pull request! Here's what you should know:

✅ I will automatically:

  • Address comments on this PR. Add '(aside)' to your comment to have me ignore it.
  • Look at CI failures and help fix them

Note: I can only respond to comments from users who have write access to this repository.

⚙️ Control Options:

  • Disable automatic comment and CI monitoring

devin-ai-integration bot and others added 3 commits September 15, 2025 16:26
…djust related selectors

Co-Authored-By: Erkin Alp Güney <erkinalp9035@gmail.com>
… flags

Co-Authored-By: Erkin Alp Güney <erkinalp9035@gmail.com>
…apping)

Co-Authored-By: Erkin Alp Güney <erkinalp9035@gmail.com>
@erkinalp erkinalp changed the title Sync SB 5.14..9a526c5 and DeArrow 2.1.8; remove dearrowPromotion; src-only Discord cleanup; preserve branding Sync SponsorBlock 5.14..9a526c5 and DeArrow 2.1.8; remove dearrowPromotion; src-only Discord cleanup Sep 15, 2025
@erkinalp erkinalp merged commit b5ef21f into master Sep 15, 2025
4 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