Repository navigation
Prevent screenshot API drift with extension-owned Friends adapters - #261
Merged
Merged
Conversation
Cattn
marked this pull request as ready for review
November 9, 2026 03:54
Cattn
enabled auto-merge
November 9, 2026 03:58
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.
Friends screenshots failed after v6.5.0 because the released screenshot adapter expected the old API. Keep API response adapters beside extension API changes while the website supplies sample data and capture definitions.
Derive batch schedules from existing per-friend samples and add the shared-groups default in scripts/screenshot-data.js. Explicit response overrides retain priority, including empty and null responses. Missing friend samples and unknown requests remain unmocked failures.
Extend src/lib/api/api.test.ts with focused regression coverage that calls actual extension API methods through the real screenshot mocks, without the website's temporary batch/shared-group overrides. Exercise Friends reads, batch schedule response shapes, requested-friend filtering, explicit overrides, and strict rejection. Failures name scripts/screenshot-data.js as the maintenance location. This covers exercised API paths; it does not automatically cover every future feature, component loading behavior, or website selector.
No workflow changes: .github/workflows/ui.yml matches its pre-PR content. No new test files, code comments, logging removals, website changes, or merges. Documentation explains ownership, manual website validation, and migration.
Validation:
History informing the implementation:
Website follow-up after a release containing this adapter: remove the temporary POST /api/friends/processed_events and empty GET /api/friends/shared_groups overrides from scripts/screenshotConfig/calendar.json; retain per-friend samples. Existing overrides remain compatible and intentionally bypass derivation until removed.