Skip to content

refactor(platform)!: retire "integration" and rebuild the credential catalogs - #2876

Merged
yannickmonney merged 9 commits into
mainfrom
refactor/connectors-catalog-surfaces
Jul 29, 2026
Merged

yannickmonney merged 9 commits into
mainfrom
refactor/connectors-catalog-surfaces

Conversation

@yannickmonney

Copy link
Copy Markdown
Contributor

Three settings surfaces that do the same job looked and behaved differently, and the noun tying two of them together was retired. This does both halves: the vocabulary, then the UI.

Vocabulary

Concept Noun
The executable adapter for a third-party system Connector
The stored secret — many per vendor Credential
An OpenAI/Anthropic-compatible model API AI provider
A third-party agent runtime Harness

"Integration" is gone as a product noun; only tests/integration/** and *.integration.test.* keep the word. The AI-provider tree gets its own noun back too — ConnectorSection and requireConnectorAuthMethod existed twice with different meanings, kept apart only by directory scoping.

No migration. BASELINE_VERSION is 0.4.0 and no v0.4* tag exists, so no deployment carries the old shapes. Renamed in place with a snapshot refresh recording the decision — the same rule 5939888e0 used for the automation tables. That rule is now written into create-migration/SKILL.md, which also had the baseline hardcoded at a stale v0.2.84.

Breaking, and deliberate

Fair game at the 0.4.0 fresh-deploy cutover, but operators re-register two URLs:

  • /api/integrations/oauth2/{start,callback} and /api/integrations/slack/events → /api/connectors/…. The OAuth redirect URI and Slack Request URL change; the docs say so.
  • Sandbox MCP server tale-integrations → tale-connectors, tools integration/integration_status → connector/connector_status.
  • TALE_CONNECTORS_URL/_TOKEN and CONNECTOR_OAUTH_<SLUG>_* replace their old names.
  • Automation packs declare requires.connectors with effects[].connector.

UI

All three surfaces now share one layer — CatalogToolbar, CatalogView, useCatalogFacets:

Tabs Search over Filter
Connectors All · Connected · Available name, description, tags tags
AI providers All · Configured · Not configured name, host, model ids API format
Skills All · Org · Team · Personal slug, description, labels labels

CatalogView owns loading / listing-failed / nothing-yet / nothing-matches / grid. The two empty states are separated by the pre-filter count, because only one of them may offer a create CTA — a reader who owns twelve skills and typed a bad query was being told to create their first one. The skeleton is shape-matched, so resolving no longer shifts layout.

Facets moved out of the toolbar's action slot into a filters slot beside the search that does the same narrowing job; until now "filter by label" sat in the same cluster as "Add skill".

Cards carry only what you scan across sixteen of them; everything actionable lives one click deep in a dialog, which is what lets the grid stay a grid. The open card lives in ?connector= / ?provider= rather than component state — OAuth consent leaves the page entirely and comes back, and a search param is the only thing that survives that.

Deduplication

app/features/settings/credentials/ replaces five near-identical component pairs, two byte-identical error mappers, and a connector-icon the providers page reached across a feature boundary to import. Two typed modules carry what differs: secret (a connector's token or basic pair; a provider's api key, env-var name, or broker document) and extra (the providers' model allowlist). buildArgs returns a Result because the broker form validates client-side and that failure has to reach the reader before a request goes out.

The catalog card deliberately stays per-feature — tags with an action count and a wire format with a model count are genuinely different facts.

Fixes that fell out

  • Edit decides the endpoint field from the vendor, not from whether that row happens to carry a URL. Keying it off the row meant an Azure credential missing its endpoint could never gain one, because the field it needed was hidden precisely because it was empty.
  • methodOf narrows a stored method string at runtime instead of casting, so a credential from a future vocabulary offers no secret replacement rather than a form that cannot submit.
  • listConnectorsRef bound the catalog action by name with a hand-written interface beside it. The listing exists now, so both shapes derive from the Convex functions — a renamed validator field is a type error instead of an undefined on screen.
  • The retired /providers/$providerName route and the model popover's "View provider" link both dropped the provider and left you on the index; they forward the slug now.

Verification

bun run check green — 44/44 tasks, 73,807 tests. migrations:check green, SAST 0 findings.

Driven in a real browser on both rebuilt pages: cards render, tabs/search/facets narrow, a card opens its dialog and records itself in the URL, and the full credential round-trip (add → masked row → delete) works. Zero console errors; cards activate on Enter.

That pass caught the one defect 73k unit tests could not: shrink-0 on a long label beside a badge collapsed the "No catalog" badge to 0px on Azure and Nous Portal. Fixed, regression-tested, re-verified.

Both catalogs also gained e2e coverage — connectors had none at all.

Not verified

  • The skills library dialog is unit-verified only (19 new tests; it had none). The chat composer's + menu doesn't render in the e2e org, so I could not reach it in a browser.
  • ep7-connectors's rendered video assets still say "Integrationen". The episode scripts are updated; re-rendering needs ElevenLabs and was not run.

"Integration" is retired as a product noun. The executable adapter that
reaches a third-party system is a connector, the stored secret is a
credential, and the model API is an AI provider — three words for three
things that all used to be called integrations somewhere.

Renamed in place, without a migration: 0.4.0 is a fresh-deploy-only
baseline that has never shipped (highest tag is v0.3.12), so there is no
deployment whose rows or vendor app registrations could break. Same rule
the automation rename recorded. The schema/config snapshots and the
0.4.0 checkpoint blobs are refreshed to record that decision; the
checkpoint keeps its own pre-0.4.1 shape rather than syncing to HEAD.

Externally visible, and deliberate: the OAuth redirect URI and Slack
Request URL move to /api/connectors/..., the sandbox MCP server serves
tale-connectors with connector/connector_status, TALE_CONNECTORS_URL and
CONNECTOR_OAUTH_<SLUG>_* replace their old names, and automation packs
declare requires.connectors with effects[].connector. Operators
re-register the two vendor URLs; the docs say so.

settings.integrations held Enterprise SSO's ~218 keys, so those lift to
settings.enterpriseSso first — otherwise the rename would have dragged an
unrelated feature along. Connector is a bucket-2 loanword, so it stays
English in de and fr; it is masculine in German, which the shipped
strings and the grammar fixture now agree on, and "Connectoren" is gone.
With connector now meaning the third-party adapter specifically, the
AI-provider code was calling three different things a connector: a
provider.yml, a harness.yml, and the credential catalog. `ConnectorSection`
and `requireConnectorAuthMethod` existed twice with different meanings,
and only directory scoping kept them apart.

The provider tree speaks provider, the harness tree speaks harness:
ProviderCatalog, providerCatalogValidator, loadProviderDefinitions,
providerDefinitionSchema, harnessDefinitionSchema, org_providers,
requireProviderAuthMethod, ProviderSection. The provider.yml and
harness.yml file formats are untouched — operators' own
<org>/providers/*.yml keep parsing.

The stuttering i18n level goes too: settings.providers.provider.* reads as
settings.providers.card.*, matching the connectors side.
Three surfaces were about to need the same five states, and the two that
already hand-rolled them each got a different subset wrong: two naked
h-24 boxes for a loading state that matched nothing they were masking,
and a bare centred Stack that told a reader who owns twelve skills but
searched badly to "create your first skill".

CatalogView owns loading / listing-failed / nothing-yet / nothing-matches
/ grid. The two empty states are separated by `hasItems` — the pre-filter
count — because only one of them may offer a create CTA. The skeleton is
CatalogGridSkeleton, which already mirrors CatalogCard's footprint, so
resolving no longer shifts layout.

CatalogToolbar grows a `filters` slot. Facets narrow the grid exactly as
the search does, so they belong beside it; until now they were crammed
into `action`, which clustered "filter by label" with "Add skill".

useCatalogFacets is the narrowing pipeline: tab, then facets, then search.
Facet options derive from the full listing so picking one never hides the
next, and selections AND together — narrowing that widens as you add
criteria reads as broken.

CatalogCard can render its title as a real heading, so a grid of cards
lands in the document outline instead of forcing a screen-reader user to
tab through every card.
Both settings pages held the same thing — named, maskable secrets belonging
to a remote vendor, one of them the default — and both held it in their own
copy: five near-identical component pairs, two byte-identical error mappers,
and a connector-icon the providers page reached across a feature boundary
to import.

app/features/settings/credentials/ owns it once. Two typed modules carry
what genuinely differs: `secret` (a connector's token or basic pair; a
provider's api key, env-var NAME, or broker document) and `extra` (the
providers' model allowlist, the one non-secret field only they have).
`buildArgs` returns a Result because the broker form validates client-side
and that failure has to reach the reader before a request goes out.

The catalog card deliberately stays per-feature. Tags with an action count
and a wire format with a model count are genuinely different facts, and
routing them through six projection callbacks would read worse than the two
small components it would replace.

Two behaviours change, both fixes. Edit decides the endpoint field from the
VENDOR rather than from whether that row happens to carry a URL — keying it
off the row meant an Azure credential missing its endpoint could never gain
one, because the field it needed was hidden precisely because it was empty.
And `methodOf` narrows a stored method string at runtime instead of casting,
so a credential written by some future vocabulary offers no secret
replacement rather than a form that cannot submit.

Copy that means the same thing on both surfaces moves to one
settings.credentials namespace, which also lets the shared components use
static translation keys the i18n usage check can still see.
Sixteen connectors as sixteen stacked sections meant scrolling past
fifteen to reach one, with no way to ask "which of these am I actually
connected to?" The page is a card grid now: tabs for All / Connected /
Available, search over name, description and tags, and a tag facet — the
same toolbar, state machine and skeleton the skills library uses.

A card carries only what you scan across sixteen of them: the vendor, what
it does, its tags and action count, and one badge. That badge is the health
state when there is one and the credential count otherwise, because "2
credentials" is reassuring but useless next to a grant that stopped
refreshing. Everything actionable lives in the dialog the card opens, at
full width, which is what lets the grid stay a grid.

The open card lives in `?connector=<slug>`, not component state: OAuth
consent leaves the page entirely and comes back, and a search param is the
only thing that survives that round trip. It also makes a connector
linkable from anywhere else in the app.

The catalog seam is gone. `listConnectorsRef` bound the listing action by
name with a hand-written interface beside it, because no public listing
existed when it was written; one does now, so both shapes derive from the
Convex functions and a renamed validator field is a type error instead of
an `undefined` on screen.
Same shape as connectors now: twelve providers as cards with tabs for All /
Configured / Not configured, a wire-format facet, and one shared state
machine. Search covers the model ids each provider serves, so an operator
hunting for who can serve a given model finds it by typing that model.

A provider ships no description, so the card's summary line is its wire
facts — which dialect it speaks and which host it speaks to — because that
is what an operator recognises it by. A catalog that could not be fetched
outranks the credential count on the badge: two keys and no model list still
cannot serve a request.

Refresh moves into the toolbar and its per-provider report becomes an alert,
which retires the section that existed only to hold that button. Harness
status stays a section below the grid: harnesses are not credentials and
nothing here manages them, so they would be cards that open onto nothing.

The retired /providers/$providerName route now forwards its slug into
`?provider=`, and the model popover's "View provider" link goes with it —
until now both dropped the provider and left the reader on the index to find
it again.
The library is where this vocabulary came from, so it is the surface that
proves the extraction lossless: same tabs, same search, same label facet,
now running through CatalogToolbar's filters slot, CatalogView's state
machine, and useCatalogFacets.

It gains what it was missing. The label facet leaves the `action` slot, so
"filter by label" no longer sits in the same cluster as "Add skill". And the
hand-rolled centred Stack that conflated "this org has no skills" with "your
search found none" is gone — a reader who owns twelve skills and typed a bad
query is offered the search reset, not an invitation to create their first
one. skills.noResults follows the shared common.search copy out of the
catalogs.

skill-filters keeps only the two skill-specific pieces the shared pipeline
needs, a scope predicate and a label accessor; facet collection and AND
semantics live in the hook with the other catalogs.

Both files had no test at all — the dialog was never rendered by one and the
filters were never called. They have suites now, including the two empty
states and the unreadable-bundle banner.
The screenshot manifest still drove the pre-rewrite pages: a table row for
a grid of cards, a `?tab=all` param the tab strip never read, the MCP
endpoint on the connectors page instead of its own API page, and a provider
drawer opened by clicking through to `settings.providers.details` — a key no
catalog has had for months. All four now gate on what renders, and the
provider-models shot deep-links through the search param instead of racing
a click against hydration.

Both catalogs get e2e coverage: cards render, the toolbar narrows them, and
a card opens its dialog and records itself in the URL. Connectors had none
at all before. Both gate on the card's HEADING, which the shared card only
started emitting this cycle and which is also what a screen-reader user
navigates by.

connectors.md described a page that no longer exists — Add connector,
testConnection, Disconnect, config-package upload, an `integrations.spec.ts`
that was never there. Rewritten against the page that does. settings.md's
two provider cases follow, and its two F14 defects are marked moot rather
than quietly dropped: the drawer they lived in is gone.

create-migration/SKILL.md claimed the baseline was v0.2.84 and never stated
the rule this whole rename leaned on. It now points at BASELINE_VERSION
instead of hardcoding it, spells out no-migration-for-unreleased with its
precedents, and warns that the unreleased checkpoint blob is hand-maintained
— dump-version-schemas only refreshes tagged releases and HEAD.
Driving the rebuilt page in a browser caught what the component tests could
not see: on Azure OpenAI and Nous Portal the "No catalog" badge measured
zero pixels wide. `shrink-0` sat on the long "models come from each
credential's allowlist" sentence beside it, so flexbox took every pixel from
the badge instead.

The sentence never belonged in a one-line meta row. The card shows the
source badge — which already says there is no catalog — and the count only
where there is something to count; the explanation stays in the dialog,
where there is room for it. `shrink-0` moves to the badge, which carries the
fact and has no room to give.

Also fixes the connectors e2e search step, which sat on a non-editable
element until timeout: SearchInput ships `readOnly` until focused, an
anti-autofill trick, so it has to be driven the way a person drives it
(focus, then type) rather than with `fill()`.
@yannickmonney
yannickmonney merged commit 3d22502 into main Jul 29, 2026
63 checks passed
@yannickmonney
yannickmonney deleted the refactor/connectors-catalog-surfaces branch July 29, 2026 20:39
larryro added a commit that referenced this pull request Jul 30, 2026
A provider definition may now name an http:// baseUrl when the host is
private/loopback-shaped — the self-hosted-model-server case the schema
comment reserved for a reviewed change, and the seam the e2e/docs mock
gateway needs post-#2876 (the retired secretsEnv provider files were the
only mock wiring, and org_providers reads *.yml only).

The schema stays pure (no env reads): it admits the SHAPE, and
reachability is decided at request boundaries — checkProviderHostPolicy
(cloud-metadata hosts always refused; private hosts refused unless the
operator set TALE_ALLOW_PRIVATE_PROVIDER_HOSTS=1) now also guards the
models-endpoint catalog fetch, which additionally threads the private
host into safeFetch's allowlist so its own private-IP gate agrees with
the policy that just passed. The chat direct-call boundary gains the
same check in the chat-tools commit that follows. isPrivateIp moves to
lib/shared/net/ so the schema and the SSRF layers share one recognizer;
safe_fetch re-exports it for its existing consumers. TTS/embedding
provider calls keep failing closed through safeFetch (audited; no
raw-fetch path sees provider URLs).
larryro added a commit that referenced this pull request Jul 30, 2026
The credentials rewrite (#2876) retired the secretsEnv provider files
both hermetic fixture trees still shipped, leaving every browser
pipeline that needs a chatting org — the docs captures today, a chat
e2e rebuild tomorrow — with an empty model picker. Rebuilt end to end:

- fixtures: retired-format e2e-mock.json/openrouter.json replaced by a
  new-format org-custom provider (providers/e2e-mock.yml, private-http
  baseUrl at the mock gateway, env + api-key auth). The interim org
  scaffolder still does not seed the providers domain, so the docs seed
  gains an ensureMockProvider stage: copy the template into the org's
  config dir (slug via Better Auth; config root pinned to the fixtures
  tree — bun loads .env, whose TALE_CONFIG_DIR points at the DEV
  stack's config) and connect the TALE_PROVIDER_KEY_E2E_MOCK env
  credential through the settings UI.
- mock gateway: /v1/models now serves a normalize-compatible, believable
  catalog (context_length, tool/vision signals; the two Claude entries
  the arena docs shot scripts per-model variants for). Thread-title
  generation gets its own scenario — its user turn IS the chat's first
  message, so the docs scan was answering scripted REPLIES as titles,
  which also broke the seed's re-identify-by-prompt idempotency.
- capture: toast viewport hidden in shot contexts (the dev stack's
  update banner intercepted header clicks); clipboard permissions for
  the shared-view shot; picker-label gates so no shot freezes the
  'No models available' loading placeholder.
- seed staleness repairs across the #2876-era UI: members route,
  connector/curation/installation stages skip tolerantly, env-save
  waits for the header Save-button flash (the toast moved), ensureChats
  waits for the history list instead of instant-polling it (the race
  duplicated every seeded chat).
- shots: chat-share-dialog (a dialog that no longer exists) replaced by
  chat-shared-view — share is one gesture now and the recipient's
  read-only snapshot is the surface worth photographing.
yannickmonney added a commit that referenced this pull request Aug 6, 2026
chat, settings, automations, connectors, and video-links were authored
against surfaces the AI-backend rewrite (#2857/#2877) and the credential
catalog rebuild (#2876/#2889) deleted or reshaped. Rewritten from the
current routes, i18n catalog, and components, with fresh IDs per the
TEMPLATE rewrite policy. SETUP.md drops the mode-A seeded-automation
claim (fixture packs are in the retired format and seed nothing).
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