Repository navigation
feat(console): the installer OAuth client form shows the deployment's redirect URI and a reconnect keeps the stored client - #29772
Conversation
…lient on reconnect The installer-client Connect form shows the redirect URI the connection read answers (redirectUri), with a copy button, or says the deployment has none. A reconnect of a connection that keeps an installer client keeps it by default and begins with no body; replacing it sends the new client. A disconnect re-reads the status so the next Connect still shows the URI. Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01QsR2jQhfprmgNtfhzNURJ6
Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01QsR2jQhfprmgNtfhzNURJ6
|
Contract-review-claim: session_01QsR2jV5sBSzCYNEDgpYLJw · head 9b3449b · 2026-11-03T04:12Z Generated by Claude Code |
|
director#1 · zhuangjianguo · session_01QsR2jV5sBSzCYNEDgpYLJw Contract reviewServed-tier: Read-only; nothing built or run. Card #28869 PR 2 (the Console face of server #29463 / PR #29701, spec #29618). ① Derived judgments
② Semver level
③ Boundary flags
④ Design judgment
No must-fix. No should-fix. Implemented-by: VERDICT: PASS Generated by Claude Code |
|
domain:ui#3 · zhuangjianguo · session_01QsR2jV4dWohojjbTJTQq5m 席位核对 · ACCEPT · 2026-11-03T04:21ZHead-sha:
|
Requested by Steedos · project thread
Fixes #28869
Clause-②: yes
Metadata-protocol: none
The card's second PR (claim 6581428199 as amended by 6581522588, option B, PR 2 leg). The card's first PR, #29496, landed the client form; this one adds item 2 and the "keep unless replaced" half of item 3, now that the server answers both (#29463, server PR #29701
c779611e; spec keyConnectorConnectionState.redirectUrifrom #29618744211fc).维护者速读
redirectUri),带「复制」按钮;服务端给不出时明确提示「此部署没有重定向 URI」,绝不自行拼接。重新连接已保存客户端的连接时,默认「沿用已存储的客户端」,发起连接请求不带请求体,由服务端复用已存的客户端和密钥;点「替换已存储的客户端」才显示 ID(预填)和空的密钥框并发送新客户端。断开连接后页面重新读取状态,下次「连接」仍能显示 URI。clientIntro、clientResend两个键的文案,不删键。回滚即撤掉本 PR,控制台回到第一个 PR 的行为(重新连接需重输密钥)。ui/packages/app-shell/src/views/setup/ConnectorConnectionsPage.tsx的startConnect(replacing: !state.client默认沿用)、submitClient(沿用时client为 undefined、不带请求体)、confirmRevoke(断开后重新 GET)、表单里的重定向 URI 区块。pnpm --dir ui exec vitest run packages/app-shell/src/views/setup/ConnectorConnectionsPage.test.tsx,应看到 21 条全过。新增语言键(
connectorConnections下,十种语言):redirectUriLabel、redirectUriCopy、redirectUriCopied、redirectUriHint、redirectUriMissing、clientKeepHint、clientKeep、clientReplace。改写文案的已有键:clientIntro、clientResend。What changes
ConnectorConnectionsPage.tsx:state.redirectUriexactly asGET /automation/connectors/:name/connectionanswered it, read-only, with a Copy button (navigator.clipboard.writeText; a denied clipboard leaves the selectable text). When the read answers none, the form says the deployment has no redirect URI and to setOS_BASE_URL/OS_AUTH_URL. No URI is built from the page's origin or parsed from prose.clientopens Reconnect in keep mode: no client fields, and Continue begins with no body, so the server reuses the kept client (ask 2 of connector connection state: answer the derived OAuth redirect URI so the Console can show it before an installer registers a client #29463). "Replace the stored client" switches to the fields (client ID prefilled, secret empty) and sends{ clientId, clientSecret? }; "Keep the stored client" switches back.redirectUri. The read answer is applied (the revoke answer only if that read fails), so the next Connect still shows the URI.@object-ui/i18n: eight new keys and two reworded values in all ten locales.clientIntronow points at the URI below instead of the documentation;clientResendis now the replace hint. No key is removed..changeset/28869-connect-redirect-uri-keep-client.md(@object-ui/app-shell,@object-ui/i18n: patch).Tests
ConnectorConnectionsPage.test.tsx, 21 cases (10 inan installer-supplied OAuth client). New or changed:{ clientId, clientSecret }is sent; the secret is absent from the DOM afterwards./oauth/callbacknor the page origin.Acceptance notes
app-crm, not a real vendor.Verification
Page suite and ablations (head b223134; re-run on merge c67b39c)
packages/i18n/on merge head c67b39c: Test Files 96 passed, Tests 1464 passed, 13 skipped (os-verify-lock VERDICT 0).scripts/ablation-replace.mjs, restored blob == HEAD withgit diff HEADempty:replacing: true): 2 failed / 19 passed (keep pin, replace pin).window.location.originwhen absent: 1 failed / 20 passed (absent-URI pin).const read = out): 1 failed / 20 passed (re-read pin).@object-ui/*to source, so no rebuild leg was owed.Packages and gates
turbo run type-check --filter=@object-ui/app-shell --filter=@object-ui/i18non b223134: 66 tasks successful, VERDICT 0.pnpm --dir ui exec vitest run scripts/on c67b39c: Test Files 170 passed, 2 skipped; Tests 4977 passed.dispatch-gates --commandson c67b39c: 35 families, all run, each exit 0.dispatch-gates --ranreconciles 35 derived, 35 run, 0 NOT-MEASURED, 0 UNRUN.packages/i18n/suites pass again (96 files, 1464 passed, 13 skipped), and the@object-ui/app-shelltype-check is clean afterpnpm installpicked up main's newpinyin-prodependency.pnpm check:changeset-fixed(roster under.changeset/): green.Live run (app-crm, Vite source Console, head b223134)
objectstack dev --seed-admin --freshon app-crm withOS_BASE_URLat the Console origin, the Vite Console proxying to it, a local vendor stub, and an installer connector saved throughPUT /meta/connector/vendor_docs.redirectUri: http://localhost:5233/api/v1/automation/connectors/oauth/callbackwith statusnot_connected. The form showed that value, and Copy put it on the clipboard.clientIdandclientSecret.connectedAt.Generated by Claude Code