Skip to content

feat(dashboard): add a dedicated API-key routing editor - #13555

Merged
diegosouzapw merged 5 commits into
cheaper-inference:release/v3.8.51from
JxnLexn:dev/api-key-routing-editor
Sep 16, 2026
Merged

diegosouzapw merged 5 commits into
cheaper-inference:release/v3.8.51from
JxnLexn:dev/api-key-routing-editor

Conversation

@JxnLexn

@JxnLexn JxnLexn commented Sep 13, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Move routing-rule editing out of the cramped API-key permissions modal into a dedicated, full-width workspace at /dashboard/api-manager/routing.

  • Select an API key or inspect rules across scopes; existing entry points link into this workspace.
  • Separate the rule's conditions from its effects, with explicit model, combo and pattern choices.
  • Search suggestions without silently rewriting existing or off-catalog IDs. Source combos retain their request-facing names; routing targets retain their existing IDs.
  • Preserve advanced values, protect unsaved drafts when switching keys, keep failed saves editable, and disable writes after a failed configuration load.
  • Include English/German copy and remove the extra 1,152-pixel page-width cap.

This PR changes the editor only. It does not change rule evaluation, authorization, request routing, or service-tier precedence.

Related Issues

Historical base-red report #12732 is now closed. Current CI failures must be assessed on their own merits.

The feature was initially based on release/v3.8.51 at 152d95108c9c3d557562311ffed63240a511eb31. No fork deployment workflow, container configuration, admission hotfix, or provider-catalog patch is included.

Validation

  • Change type: UI / i18n
  • npx vitest run tests/unit/ui/api-key-routing-editor.test.tsx — 6 passed, rerun on this branch.
  • npx eslint tests/unit/ui/api-key-routing-editor.test.tsx — passed.
  • Diff checked against the current release tip; git diff --check passed.
  • Automated regression tests included.
  • Full repository lint, production build and coverage matrix: left to PR CI, not claimed green locally.

Earlier manual checks exercised save/cancel and key selection. The equivalent fork deployment served the full-width page with HTTP 200 and preserved the existing routing configuration; that deployment is separate from this PR's CI evidence.

Tests Added Or Updated

  • tests/unit/ui/api-key-routing-editor.test.tsx: persisted-field round-trip, combo-name matching, failed-save drafts, unsaved-change confirmation, failed-load write protection, and full-width wrapper.

Coverage Notes

The focused component tests cover the changed editor contract. Full coverage was not measured locally; the repository coverage gate remains a CI responsibility.

Reviewer Notes

No schema migration or provider credential changes. This branch can be reviewed independently from the runtime fixes. When combining with the per-key service-mode PR, retain its settings section in the selected-key workspace rather than restoring the old editor layout.

Related independent PRs

All three target the same release tip directly, not each other. Shared-file overlaps may need small integration resolutions after the first PR lands; unrelated fork-only changes are deliberately excluded.

Review follow-up: added changelog.d/features/13555-api-key-routing-editor.md; the complete focused UI file passes 6/6 both on this branch and in a local checkout containing the per-key service-mode section. The curated CI fast path is not used as a substitute for this explicit test run.

@diegosouzapw

Copy link
Copy Markdown
Collaborator

Nice UX improvement — moving routing-rule editing into its own full-width workspace makes sense
given how cramped the permissions modal was, and the PR description is clear about the scope
(editor only, no change to rule evaluation/authorization/routing). Read through your new test
file — it's a real RTL test against the actual components, not a reimplementation, good
coverage of the save/cancel/draft-protection paths you describe. One thing: I checked the CI
Vitest fast-path job and it looks like this specific file isn't actually in that curated
subset, so the green checkmark doesn't cover it — could someone confirm
npx vitest run tests/unit/ui/api-key-routing-editor.test.tsx still passes on the current head
right before merge? Also missing a changelog fragment under changelog.d/features/. Heads-up
for whoever integrates this with #13554 (the per-key service-tier PR) — you both touch
ReasoningRoutingRules.tsx; #13554's change there is small and isolated so it should merge in
cleanly after yours.

@JxnLexn

JxnLexn commented Sep 15, 2026

Copy link
Copy Markdown
Contributor Author

Thanks for checking the CI subset. I explicitly reran npx vitest run tests/unit/ui/api-key-routing-editor.test.tsx on this branch: 6/6 passed. Added changelog.d/features/13555-api-key-routing-editor.md in cadc4b0; changelog integrity passes.

I also tested a separate local integration checkout containing #13554: the same 6 UI tests pass there. There is a small actual merge conflict at the imports and old card wrapper, so it should not be treated as an automatic clean merge. Resolution: keep this PR's redesigned workspace, import the service-mode component, and render it for the selected key (keyed by its ID, and only when the key exists and loading succeeded). No service-mode implementation was pulled into this PR.

This is an explicit focused test result, not an inference from the curated CI fast-path checkmark.

@diegosouzapw
diegosouzapw merged commit a167053 into cheaper-inference:release/v3.8.51 Sep 16, 2026
10 of 16 checks passed
diegosouzapw added a commit that referenced this pull request Sep 16, 2026
Lands the combined-board reconciliation of today's JxnLexn wave as one follow-up: i18n fill for #12471/#13555's new keys (real vi translations), free-tier count 446→452, file-size rebaseline for #13556. check-new-key-coverage PASS; only the three pre-existing file-size reds remain.
@diegosouzapw diegosouzapw mentioned this pull request Sep 21, 2026
muhamadgalihsaputra pushed a commit to niyatna/NiyatnaRoute that referenced this pull request Sep 27, 2026
…rence#13555)

Merged. Moving rule editing out of the permissions modal into `/dashboard/api-manager/routing` fixes the real problem (a cramped modal for something with conditions, effects and three target kinds), and the contract tests pin what matters: persisted fields round-trip, combo names match without rewriting off-catalog IDs, failed saves stay editable, unsaved drafts survive key switches, and writes are disabled after a failed load. Rule evaluation and authorization are untouched.

Validated as a combined board first (this PR merged with the 4 siblings of the JxnLexn wave on the release tip): eslint with the frozen suppressions, typecheck:core, check:open-sse-typecheck, complexity, cognitive-complexity, changelog-integrity, docs-sync, migration-numbering, provider-consistency and a duplicate-identifier audit all green, plus 77 passing / 0 failing focused node:test cases across the test files the wave touches. The wave's i18n fill (new keys carried to all 66 locales), free-tier doc counts and file-size rebaseline land in one follow-up PR right after the wave, as with cheaper-inference#13904.

Thank you.
muhamadgalihsaputra pushed a commit to niyatna/NiyatnaRoute that referenced this pull request Sep 27, 2026
…-inference#13921)

Lands the combined-board reconciliation of today's JxnLexn wave as one follow-up: i18n fill for cheaper-inference#12471/cheaper-inference#13555's new keys (real vi translations), free-tier count 446→452, file-size rebaseline for cheaper-inference#13556. check-new-key-coverage PASS; only the three pre-existing file-size reds remain.
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.

2 participants