Repository navigation
Prefill connector setup fields from the link (addresses only) - #1334
Merged
Merged
Conversation
Addresses and settings only; a credential is never read from a link. The AnythingMCP module for Odoo will use it to hand over the Odoo address, database and user id.
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Summary
A link to the guided connector setup can now start fields with values:
/connectors/setup/<slug>?prefill.<NAME>=<value>. We are publishing a free AnythingMCP module for Odoo; its settings button opens the Odoo setup with the Odoo address, database name and user id already filled, so the user only pastes the API key.Only address and setting fields are taken from the link. A credential (or any field marked secret) is ignored, so no key travels in a URL. Values typed by the user or stored on an existing connector win over the link.
Behaviour is the same in Cloud and self-hosted: the page is shared, and the link is opt-in.
Changes
connectors/setup/[slug]/page.tsx: readprefill.*query parameters and apply them to non-credential fields once the adapter description is loaded; document the parameter in the page's query list.connector-setup-prefill.spec.ts: address fields are prefilled and trimmed, aprefill.ODOO_API_KEYin the link is ignored, and the prefilled values are sent toverifylike typed ones.Type
Testing
In
packages/frontend:npx tsc --noEmit -p tsconfig.json: passed.npx eslint "src/app/connectors/setup/[slug]/page.tsx" tests/e2e/connector-setup-prefill.spec.ts: no warnings.npx playwright test tests/e2e/connector-setup-prefill.spec.ts tests/e2e/connector-guided-setup.spec.ts tests/e2e/connector-setup-guide.spec.ts tests/e2e/setup-link.spec.ts tests/e2e/starter-pack.spec.ts tests/e2e/catalog-url-match.spec.ts: 36 passed. The local dev server logs a react/react-dom version mismatch warning from the localnode_modules; it does not affect the tests.Checklist
npm test)Related Issues
None.