Repository navigation
feat(dashboard): copyable connection ID chip and docs for per-request account pinning - #16963
Merged
diegosouzapw merged 2 commits intoOct 17, 2026
Conversation
… account pinning The per-request account pin (x-omniroute-connection) already existed in the chat handler, but no dashboard surface exposed a connection's id and no user-facing doc described the header, so the feature was undiscoverable. - Each provider connection row now shows a copyable id chip (first 8 chars, click copies the full id); its tooltip names the x-omniroute-connection header. - A one-line tip under the Connections header explains the pin and its strict semantics (exclusive use; cooldown/quota releases it to siblings). - docs: API reference header row + "Account pinning per request" section and a Claude Code ANTHROPIC_CUSTOM_HEADERS example; the fabricated-docs gate allowlists ANTHROPIC_CUSTOM_HEADERS as a Claude Code CLI env var. - i18n: 3 new providers.* keys translated in all 66 locales. x-connection-id is deliberately NOT aliased on the chat route: the media playground cards send it with a provider id, which would force a pin to a non-existent connection. A regression guard test pins that. Co-authored-by: Nhan Phan <nhan.14t1@gmail.com> Inspired-by: decolua/9router#4718
Contributor
CI Coverage Report
Coverage artifact was not available for this run. |
diegosouzapw
deleted the
feat/port-pr-4718-connection-pin-discoverability
branch
October 18, 2026 23:48
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.
Summary
x-omniroute-connection) already worked, but it was hard to find: no connection row showed its id and no user-facing doc mentioned the header. This PR adds the missing UI and docs.ANTHROPIC_CUSTOM_HEADERSexample.Attribution
Thanks to @nhan14t1 for the original implementation.
Changes
components/ConnectionIdChip.tsx(new):ConnectionIdChipshows the first 8 characters of the id, copies the full id throughuseCopyToClipboard, and switches to "Copied" while the copy feedback is active. Its tooltip and aria-label namex-omniroute-connection.ConnectionPinTipis the one-line hint.ConnectionRow.tsx: renders the chip next to#priority(+2 lines).ProviderDetailPageClient.tsx: renders the tip above the connection list when the provider has connections (+2 lines).providers.*keys (copyConnectionId,connectionIdCopied,connectionPinTip) translated in all 66 locales, with no__MISSING__markers. The header name is passed in as an ICU{header}argument, so translators never touch it.API_REFERENCE.mdgets a Custom Headers row and an "Account pinning per request" section. It documents single-model scope (combos ignore the header), exclusive use, no sibling rotation on an in-request failure, release to siblings during cooldown, quota exhaustion or a quota-policy block, and hard failure for an unknown or disabled id.CLAUDE-CODE-CONFIGURATION.mdgets a short "Pin one account" subsection.scripts/check/check-fabricated-docs.mjs:ANTHROPIC_CUSTOM_HEADERSis added to the external-tool env-var allowlist. It is Claude Code's own variable, never read by OmniRoute, and follows the same pattern as the existingCLAUDE_CODE_MAX_OUTPUT_TOKENSentry.x-connection-idis deliberately not aliased on the chat route. The media playground cards already sendx-connection-id: <providerId>to chat, so an alias would force a pin to a non-existent connection and break every playground chat. A source-level regression guard covers this.Test plan
npx vitest run --config vitest.config.ts tests/unit/ui/connection-row-copy-id.test.tsx: before the implementation it failed withFailed to resolve import ".../ConnectionIdChip". After:Test Files 1 passed · Tests 7 passed (7). The tests cover the 8-character chip text, copying the full id plus the "Copied" state, a tooltip that namesx-omniroute-connection, no chip when the id is empty, the tip text, and the chat-handler guard (exactly onex-omniroute-connectionread and nox-connection-idread).providers/[id]/__tests__/*,components/__tests__/{CoolingConnectionsPanel,phase1d},tests/unit/ui/connection-row-*,connection-quota-panel,confirm-delete-connection-7361,codex-paid-credits-toggle,connectionsSearchFilter,model-hidden-dashboard-visibility,provider-tos-notice-15059,radar-guided-setup-action):28 passed · 154/155 tests. The one failure wasproxySaveRefresh.test.tsx, which hit its 30s timeout under parallel load. Run alone it passes:Tests 1 passed (1).ConnectionRow/ProviderDetailPageClient/the touched docs (22 files):ℹ tests 103 ℹ pass 103 ℹ fail 0.npm run i18n:check-keys:OK — 66 locales carry all 13816 keys.npm run i18n:check-ratio:OK — 66 locales within baseline.npm run i18n:check-new-keys:PASS.tests/unit/i18n*.test.ts(54 files):603 tests, 599 pass, 4 fail. All 4 failures are inherited from the base: glossary hits atcliTools.toolDescriptions.zedin zh-CN/zh-TW, and the same提供商string is onorigin/release/v3.8.52.npm run typecheck:core: clean.npm run check:dashboard-typecheck:OK — 195 pre-existing error(s), all within frozen baseline.npx eslint --suppressions-location config/quality/eslint-suppressions.json <changed files>: clean.npx prettier --check <changed files>: clean.node scripts/check/check-fabricated-docs.mjs --strict: the only remaining claim is/api/balanceindocs/reference/ENVIRONMENT.md:368, inherited from the base and untouched here.check-fabricated-docs.test.tsandrelease-green-docs-drift-7253.test.tsfail on that same base claim only.GITHUB_BASE_REF=release/v3.8.52 node scripts/check/check-pr-test-policy.mjs:PASS.GITHUB_BASE_REF=release/v3.8.52 npm run check:test-masking:OK.