docs: connector authoring guidelines for desktop/mobile portability - #16
Open
volod-vana wants to merge 1 commit into
Open
docs: connector authoring guidelines for desktop/mobile portability#16volod-vana wants to merge 1 commit into
volod-vana wants to merge 1 commit into
Conversation
volod-vana
force-pushed
the
volod/connector-authoring-guidelines
branch
from
July 29, 2026 15:21
1fbc5e3 to
5eafcd8
Compare
Connectors are written against the page API, not against a browser. Desktop implements it with Playwright + Chromium, mobile with a native WebView shim, so a connector that only assumes the page contract runs on both. Documents the eight rules that keep that true, each one a failure hit while running real connectors on both runtimes: - detect state from APIs, not page chrome (the desktop-layout login check is the most common break) - make runs resumable, because mobile can lose the runtime mid-run - fetch from inside the page instead of intercepting the network (iOS has no response-body interception) - keep evaluate payloads self-contained, no in-page eval (strict CSP rejects it and mobile has no debugger-protocol escape hatch) - never require credentials from the driver; requestInput is optional by design - declare desktop-only capabilities and fail cleanly to desktop handoff - report progress with counts; runtime scales with the user's data - do not assume desktop layout or viewport Includes a capability matrix (desktop vs iOS vs Android) and a pre-PR checklist. Signed-off-by: Volod <volod@vana.com>
volod-vana
force-pushed
the
volod/connector-authoring-guidelines
branch
from
July 29, 2026 15:22
5eafcd8 to
152ca31
Compare
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.
Connectors are written against the
pageAPI, not against a browser. Desktop implements it with Playwright + Chromium; mobile implements it with a native WebView shim. A connector that only assumes thepagecontract runs on both - one that assumes Chromium on a laptop does not.This adds
CONNECTOR-GUIDELINES.mddocumenting the rules that keep that true, plus a link from the "Building a new connector" section.Every rule is a failure actually hit while running real connectors on both runtimes, not a hypothetical:
nav[aria-label="Chat history"]/[data-testid="profile-button"]never fires on a phone viewport, so the connector waits forever for a login that already happened. A session-endpoint check is layout independent - and more robust on desktop too.page.evaluatepayloads self-contained. No in-pageeval/new Function: strict CSP rejects them, and mobile has no debugger-protocol escape hatch the way desktop does.requestInputis optional and absent on mobile by design - we do not want the app handling a user's third-party password. Always keep theshowBrowser+promptUserfallback, and treat theshowBrowserURL as a hint.Also includes a capability matrix (desktop vs iOS vs Android) and a pre-PR checklist.
Context: written after running unmodified connectors from this repo on a phone through a page-API shim. Most of the corpus ports as-is; the exceptions are exactly the capabilities in rule 6.