feat(import): add ScreenCloud (GraphQL) provider to the import framework - #3145
Merged
Conversation
There was a problem hiding this comment.
Pull request overview
Adds a second content-import provider (ScreenCloud via GraphQL) and extracts the provider-agnostic “download → CreateAssetSerializerV2 → idempotency” logic into a shared ingest layer so future providers can stay small and consistent with the existing asset creation pipeline.
Changes:
- Introduces a shared import ingest module (
ingest.py) and neutral outbound session helper (http.py). - Refactors the existing Yodeck provider to delegate file/webpage ingestion and idempotency to the shared ingest layer.
- Adds a new ScreenCloud (Studio) GraphQL provider plus unit tests, and registers it in the provider registry.
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| src/anthias_server/lib/integrations/yodeck.py | Refactors Yodeck provider to reuse shared ingest helpers for URL selection, windows, idempotency, and asset creation. |
| src/anthias_server/lib/integrations/screencloud.py | Adds new ScreenCloud GraphQL provider (token validation, pagination, link/file import) using shared ingest layer. |
| src/anthias_server/lib/integrations/registry.py | Registers the new screencloud provider in the import provider registry. |
| src/anthias_server/lib/integrations/ingest.py | Adds shared provider-agnostic ingestion (download with auth scoping + serializer-based asset creation + idempotency stamping). |
| src/anthias_server/lib/integrations/http.py | Adds shared “neutral UA” requests.Session factory for import providers. |
| src/anthias_server/api/tests/test_screencloud_import.py | Adds unit tests for ScreenCloud provider (GraphQL mocked; verifies filters, idempotency, and download auth scoping). |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
vpetersson
force-pushed
the
feat/import-content-screencloud
branch
from
July 8, 2026 07:12
37c1579 to
6132621
Compare
5 tasks
- extract provider-agnostic download/create/idempotency into ingest.py and a shared neutral-UA session (http.py); Yodeck now delegates to them - add a GraphQL-backed ScreenCloud provider (allFiles + allLinks), reusing the same interface, wizard, and CLI as Yodeck - filter non-portable content: import only STANDARD ScreenCloud links (skip INTERNAL/CLOUD) and image/video files (skip audio/documents) - scope download auth to the file's host so a token is never forwarded to a pre-signed CDN original - unit tests for the ScreenCloud provider Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
vpetersson
force-pushed
the
feat/import-content-screencloud
branch
from
July 8, 2026 08:29
6132621 to
c63fdcc
Compare
- restrict ingest.first_http_url to http(s) (validate_url accepts rtsp) - sanitise download extensions to safe .<alnum> (path-traversal guard) - surface GraphQL list errors as transport errors so list_media yields a controlled 502, not a 500 - import requests; reword the internal-link skip reason Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
vpetersson
force-pushed
the
feat/import-content-screencloud
branch
from
July 8, 2026 08:32
c63fdcc to
b8f83fd
Compare
|
5 tasks
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.



Issues Fixed
Stacked on #3144 (Yodeck import). Adds the second provider in the import series and the shared ingest layer that makes further providers small.
Description
ingest.py+http.py): the provider-agnostic download →CreateAssetSerializerV2→ idempotency logic and the neutral (non-Anthias) HTTP session are extracted out of the Yodeck provider so every provider reuses them. Yodeck now delegates to them; behaviour is unchanged and its tests still pass.allFiles(images/videos by mimetype) andallLinks, and imports each via the sameImportProviderinterface, wizard, and CLI. Namespaced remote ids (file:/link:) routeimport_item. Regional endpoint via an optionaleu:/us:token prefix.allApps/allEmbedsare never queried. Yodeck likewise skips webpage media that resolves to Yodeck-hosted apps/widgets.Follow-ups (isolated, flagged in
screencloud.py): the production regional hostnames, thefileById/linkByIdfield names, and whichFileOutputis the durable original vs a thumbnail are behind a ScreenCloud login — to be confirmed against a live token; the resolution points are isolated for a localized change.Checklist
🤖 Generated with Claude Code