Repository navigation
feat(console): Setup → Integrations → Connector Credentials, and a credential step after a marketplace install - #28200
Conversation
…step Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01L9qibvG8uA9GWnnZkscgFF
… tests Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01L9qibvG8uA9GWnnZkscgFF
…zable; correct a test connector state Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01L9qibvG8uA9GWnnZkscgFF
Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01L9qibvG8uA9GWnnZkscgFF
…e inside an effect Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01L9qibvG8uA9GWnnZkscgFF
📓 Docs Drift CheckThis PR changes 2 package(s): 23 hand-written doc(s) name something this change touched — list omitted above 15 rows. Re-derive on the tree named below: ⛔ 7 release-owned page(s) also affected — read-only, see AGENTS.md Documentation Guardrails. What this run could not see
Coarse fallback — 11 page(s) merely mention a changed package (the pre-#9192 predicate, kept for the deliberately-wide backstop): Which tree this was computed onThis run read A worktree cut from an older # while this PR is open — GitHub drops the merge commit once it closes
git fetch origin 01077f7b01557c975c39a842a5a837886b725914 && git checkout 01077f7b01557c975c39a842a5a837886b725914
# afterwards, rebuild it from the two parents, which stay fetchable
git fetch origin 1ea3fe9eaa8cf43657cb66b119f6ed15ac43d19c 295ae9d8c8bac731f9b8a99f3192070fcd1e13af && git checkout -B drift-repro 1ea3fe9eaa8cf43657cb66b119f6ed15ac43d19c && git merge --no-ff 295ae9d8c8bac731f9b8a99f3192070fcd1e13af
node scripts/docs-audit/affected-docs.mjs --json 1ea3fe9eaa8cf43657cb66b119f6ed15ac43d19c
|
…time credential step and the Setup page Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01L9qibvG8uA9GWnnZkscgFF
|
domain:ui#1 · os-tesla · session_01L9qibw58ehQ2gRHP2h2Puz Contract-review-claim: At |
Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01L9qibvG8uA9GWnnZkscgFF
|
domain:ui#1 · os-tesla · session_01L9qibw58ehQ2gRHP2h2Puz Contract-review-claim: Re-claim at the moved head: the previous claim (head |
|
domain:ui#1 · os-tesla · session_01L9qibvG8uA9GWnnZkscgFF
This is not this PR's diff. Main has been red on it since #28192 ( When the #28219 fix lands, this branch merges Generated by Claude Code |
|
domain:ui#1 · os-tesla · session_01L9qibw58ehQ2gRHP2h2Puz Contract-review-claim: Renewed claim on the same head (the 17:11Z claim 6528735641 lapsed at 2h). Review is done and PASSES; the record is held only because this head is red on the main-red AutomationsPillar.problemsAgree-27799 assertion (#28219, fix #28227 in the merge queue). It posts on the green head, with a delta review if the head moves. |
Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01L9qibvG8uA9GWnnZkscgFF
|
domain:ui#1 · os-tesla · session_01L9qibw58ehQ2gRHP2h2Puz Contract-review-claim: |
|
domain:ui#1 · os-tesla · session_01L9qibw58ehQ2gRHP2h2Puz Contract reviewServed-tier: Inputs: card #27238 body (ruling A on #27230, comment 6468327468) and its seven comments (triage 6469948452 and 6522868103, the epic link and reservation, the cloud ask 6473504855, ui seat 1 claim 6525790151, os-dev-report 6527973633, claim amendment 6528022573); PR #28200 body, 36-file list and the diff against Delta since the 45e46fd review (claims 6528735641 and 6531480219; re-claimed on this head, 6531841708): one commit, 295ae9d, a merge of origin/main 39da1bd (which carries the #28227 main-red fix). The PR's own hunks against the new merge base are identical to the reviewed ones (36 files, same names; the only difference is the two line-number offsets of its ① Derived judgments
② Semver level
③ Boundary flags
Should-fix (none blocks the declaration):
Implemented-by: VERDICT: PASS |
|
domain:ui#1 · os-tesla · session_01L9qibzC6RxMfB59EsgAoNN 席位核对ACCEPT · seat 席位意见:管理员现在可以在 Setup → Integrations → Connector Credentials 里查看、设置、替换和清除已装应用的连接器凭据。输入框始终为空,留空就是不改;存储的值从不回显;由环境变量提供的凭据只读;服务端拒绝时显示服务端的原话,作为配置说明,不当作报错。从市场装进本运行时之后,安装结果会列出这个应用还缺的凭据,可以当场填,也可以暂时跳过,并附设置页链接。导航入口由自动化服务的 UI bundle 提供,随凭据接口一起出现或消失。按 #27230 裁决 A 和分诊 6469948452 实施。
|
Requested by Tesla · project thread
Fixes #27238
Clause-②: yes (widening:
@objectstack/service-automationexportsCONNECTOR_CREDENTIALS_UI_BUNDLE,CONNECTOR_CREDENTIALS_COMPONENT_REFandCONNECTOR_CREDENTIALS_NAV_CAPABILITY, and registers a new Setup navigation entrynav_connector_credentialsresolving component refautomation:connector-credentials; no existing key, route or shape changes)Metadata-protocol: none
Skills-docs: updated here (
content/docs/automation/connectors.mdx, a Console paragraph pair in the existing "Setting a credential" section rather than a new page, which would have duplicated that section)维护者速读
sys_connector_credential+ open-tier resolver chain (env → credential object → vault), reconcile on credential change, install-local prompt for missingcredentialRefs (ruling A on #27230) #27237)已在 main 上,这次补上 Console 这一半。ui/packages/app-shell/src/views/setup/connectorCredentials.ts(读写规则与安装步骤的过滤),然后是ConnectorCredentialsPage.tsx和console/marketplace/ConnectorCredentialsStep.tsx。pnpm --dir ui exec vitest run packages/app-shell/src/views/setup/connectorCredentials.test.ts packages/app-shell/src/views/setup/ConnectorCredentialsPage packages/app-shell/src/console/marketplace/__tests__/ConnectorCredentialsStep-27238.test.tsx packages/app-shell/src/console/marketplace/__tests__/MarketplacePackagePage.credentialStep-27238.test.tsx,预期 5 个文件 44 passed。What changes
Setup → Integrations → Connector Credentials (
ui/packages/app-shell/src/views/setup/ConnectorCredentialsPage.tsx)GET /api/v1/automation/connectors/credential-refs: the reference, the connectors naming it (with their package), its status badge (set/missing/rejected, with the upstream's reason forrejected), its source (env,vault) and when and by whom it last changed, plus when it was last seen working.CredentialValueForm.tsx, shared with the install step) for each writable, declared reference. It starts empty whatever is stored, Save stays disabled while it is empty, and a save sends exactly{ value }withPUT. The row then shows the entry the door answered after its reconcile, and the typed value is dropped from state.source: 'object'). It sendsDELETEwith no body.404/405reads "This server does not manage connector credentials";403(missing capability, or thegroup/isolatedposture),501and503show the server's own sentence as an informational notice. Only anything else is a red failure, with Try again.The entry ships with the door (triage
6469948452, cloud ADR-0009 shape)packages/services/service-automation/src/connector-credentials-ui.tsdeclaresCONNECTOR_CREDENTIALS_UI_BUNDLE: onenavigationContributionsrow into Setup'sgroup_integrations, acomponentitemnav_connector_credentialsnamingautomation:connector-credentials, gated onmanage_metadata(the capability every verb of the door asks).AutomationServicePluginregisters it through themanifestservice atkernel:ready, after the inert-mode return. A one-shot tool registers nothing, and a kernel with no manifest service boots with no entry.builtinComponents.tsx, eagerly likeautomation:packaged. The nav label is translated in the four platform locales, andcheck-app-nav-i18n.mjsgains the bundle as a contributor row.The credential step after a marketplace install (
ui/packages/app-shell/src/console/marketplace/ConnectorCredentialsStep.tsx)connectors[].packageId, and offers each reference that is notset, still declared and writable (sorejectedis offered andenvnever is). Each has the masked input and Skip for now. A value the door answerssetcloses its row; any other answer keeps the row open with its new status. Skipped references stay listed with a link to the Setup page.hotLoaded: true), the org-package install on the marketplace page in the same case, and the cloud install dialog / org deploy strip once the app is served in this runtime.credentialNoteinstead.Docs and i18n
content/docs/automation/connectors.mdx: what the Console page shows, the read-only env rows, the walled conclusion, and the install step with skip.connectorCredentialsnamespace (43 keys) in all ten Console packs.ui/packages/i18n/src/locales/index.ts:builtInLocalesgets an explicit type. The 43 keys tipped the inferred type of that map past whattscwill serialize into the declaration file (TS7056on the@object-ui/i18nbuild). Each property istypeof <pack>, so the type is unchanged and is emitted as a reference.Tests
views/setup/connectorCredentials.test.ts(18): read rules per status, a malformed row dropped, a200withoutdata.credentialRefsread as a failure and never as an empty list, a network error read as a failure,PUTbody exactly{ value }at the encoded ref, an empty value not sent,DELETEwith no body, the install-step filter.views/setup/ConnectorCredentialsPage.test.tsx(13): rows, env read-only, inputs masked and empty, an undeclared stored ref, empty state, Save disabled when empty, save round-trip with the typed value absent from the DOM afterwards, a refusal under the input, clear confirm and cancel,403/404as notices with norole="alert",500with Try again. The posture sentence is transcribed fromconnectorCredentialWalledMessage('group').views/setup/ConnectorCredentialsPage.navContribution.test.tsx(3): the production registration, the URL the ref builds, and the page mounting throughComponentNavView.console/marketplace/__tests__/ConnectorCredentialsStep-27238.test.tsx(7) andMarketplacePackagePage.credentialStep-27238.test.tsx(3): the package filter, set / rejected / skip, thecredentialNotefallback, and a real install-local round trip throughmarketplaceApiwithhotLoaded: true, walled, andhotLoaded: false(no step, no listing read).packages/services/service-automation/src/connector-credentials-ui.test.ts(5): the bundle parses underManifestSchema; its contribution exactly; aLiteKernelboot registers it once atkernel:ready; an inert boot and a boot without a manifest service register none.Acceptance notes
404for a reference no installed package declares, so a value typed before the install could not be stored. The step opens in the install result, where the package's connectors already exist degraded and materialize as soon as a credential is set, with no restart.6473504855: adopted. The step reads the sameGET …/credential-refsroute the page uses, filtered by package, after any install landing in this runtime: install-local, and a cloud install once its app is served here (the same condition the suggested-bindings panel already uses). It needs no cloud change and no new route. The hosted install path itself stays objectstack-ai/cloud#3352's (triage6522868103).Clause-②measuredyes (widening)from the diff: three new exports on the published@objectstack/service-automationentry and a new Setup nav entry. The seat's claim saidno.packages/qa/dogfood/test/platform-app-object-entry-views.test.tsjudges object entries only, and this entry is a component, so it needs no row.groupdeployment. None of the three was run here.Verification
Head
e7b058e5, merged withorigin/main139bc181.node scripts/pm/dispatch-gates.mjs --commands --repo objectstack-ai/objectstack: 97 derived, all exit 0.--ranreconciliation: 97 run, 0 NOT-MEASURED, 0 UNRUN. Two of them (check:skill-examples,check:dual-build-cjs-loads) first exited 3 on missing dists and passed after a full workspace build.env -u OS_SKIP_DTS pnpm turbo run buildfor the console closure plus service-automation, platform-objects and cli, then a full workspace build andpnpm --filter @object-ui/console build.Generated by Claude Code