From 46e33e164d28c221f62f0faa40ad1fc60c31d1fe Mon Sep 17 00:00:00 2001 From: Diego Rodrigues de Sa e Souza <8016841+diegosouzapw@users.noreply.github.com> Date: Wed, 1 Jul 2026 01:03:11 -0300 Subject: [PATCH] fix: point Quick Start step 1 to API Keys page, not Endpoint (#5695) (#5763) --- CHANGELOG.md | 2 + .../(dashboard)/dashboard/HomePageClient.tsx | 2 +- src/i18n/messages/en.json | 2 +- .../ui/quick-start-api-keys-link-5695.test.ts | 40 +++++++++++++++++++ 4 files changed, 44 insertions(+), 2 deletions(-) create mode 100644 tests/unit/ui/quick-start-api-keys-link-5695.test.ts diff --git a/CHANGELOG.md b/CHANGELOG.md index 3f658cf468..3c9a42e0bd 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -30,6 +30,8 @@ ### 🔧 Bug Fixes +- **dashboard (Quick Start step 1):** the Quick Start "Create API key" step told users to "Go to **Endpoint** → Registered Keys" and linked to `/dashboard/endpoint`, but API keys are created on the **API Manager** page (`/dashboard/api-manager`, sidebar "API Keys") — the Endpoint page has no "Registered Keys" section, so users followed the link and could not find where to create a key. Step 1 now reads "Go to **API Keys**" and links to `/dashboard/api-manager`. Regression guard: `tests/unit/ui/quick-start-api-keys-link-5695.test.ts`. ([#5695](https://github.com/diegosouzapw/OmniRoute/issues/5695)) + - **providers (DashScope/Alibaba setup link):** the "Get API key" link for the **Alibaba** and **Alibaba (China)** providers pointed at the bare API host (`dashscope-intl.aliyuncs.com` / `dashscope.aliyuncs.com`), which returns **404** in a browser — API hostnames have no homepage. Repointed to the consoles where keys are actually issued: `bailian.console.alibabacloud.com` (international) and `dashscope.console.aliyun.com` (China). Same class as #5572/#5574/#5576; regression guard added to `tests/unit/provider-setup-links-5572.test.ts`. ([#5665](https://github.com/diegosouzapw/OmniRoute/issues/5665)) - **thinking / runtime-config (module-graph fix):** operator-configured proxy settings that are hydrated at **boot** but read **per-request** were silently ignored in production. Next.js compiles `instrumentation.ts` (boot hydration via `applyRuntimeSettings` / restore hooks) as a **separate webpack module graph** from the app-route / open-sse executors, so a module-local `let _config` singleton is **duplicated** — the boot copy is hydrated but the request path reads a different, un-hydrated copy. Live VPS validation proved the Thinking-Budget hydration ran to completion at boot yet `base.ts` still saw the `passthrough` default (this is why #5312 fix A stayed broken even after the boot-wiring fix). Fixed by backing the singletons with `globalThis` (the pattern `systemPrompt.ts` already uses for the Global System Prompt, #2470), so all module-graph copies share one instance: **`thinkingBudget.ts`** (the dashboard Thinking-Budget mode now reaches the executor), **`backgroundTaskDetector.ts`** (the opt-in background-model degradation now actually fires on requests), and **`systemTransforms.ts`** (operator pipeline overrides now reach the request path). `payloadRules.ts` was already safe (it lazily self-loads from the DB per request, #2986). Regression guards: `tests/unit/thinking-budget-globalthis-5312.test.ts` + `tests/unit/runtime-config-globalthis-5312.test.ts` (assert globalThis-backed sharing; a module-local `let` fails them). ([#5312](https://github.com/diegosouzapw/OmniRoute/issues/5312)) diff --git a/src/app/(dashboard)/dashboard/HomePageClient.tsx b/src/app/(dashboard)/dashboard/HomePageClient.tsx index d27cc013a6..017d14de00 100644 --- a/src/app/(dashboard)/dashboard/HomePageClient.tsx +++ b/src/app/(dashboard)/dashboard/HomePageClient.tsx @@ -1109,7 +1109,7 @@ export default function HomePageClient({ machineId }: HomePageClientProps) {

{t.rich("step1Desc", { endpoint: (chunks) => ( - + {chunks} ), diff --git a/src/i18n/messages/en.json b/src/i18n/messages/en.json index cecdb9d627..4ddab05d11 100644 --- a/src/i18n/messages/en.json +++ b/src/i18n/messages/en.json @@ -1475,7 +1475,7 @@ "quickStartDesc": "Get up and running in 4 steps. Connect providers, route models, monitor everything.", "fullDocs": "Full Docs", "step1Title": "1. Create API key", - "step1Desc": "Go to Endpoint -> Registered Keys. Generate one key per environment.", + "step1Desc": "Go to API Keys. Generate one key per environment.", "step2Title": "2. Connect providers", "step2Desc": "Add accounts in Providers. Supports OAuth, API Key, and free tiers.", "step3Title": "3. Point your client", diff --git a/tests/unit/ui/quick-start-api-keys-link-5695.test.ts b/tests/unit/ui/quick-start-api-keys-link-5695.test.ts new file mode 100644 index 0000000000..bd14d442a3 --- /dev/null +++ b/tests/unit/ui/quick-start-api-keys-link-5695.test.ts @@ -0,0 +1,40 @@ +import { test } from "node:test"; +import assert from "node:assert/strict"; +import { readFileSync } from "node:fs"; +import { fileURLToPath } from "node:url"; +import { dirname, resolve } from "node:path"; + +// #5695 — the dashboard Quick Start step 1 told users to "Go to Endpoint -> +// Registered Keys", linking to /dashboard/endpoint. But API keys are created on +// the API Manager page (/dashboard/api-manager, sidebar label "API Keys"); the +// Endpoint page has no "Registered Keys" section. Users followed the link and +// could not find where to create a key. Step 1 must point at API Keys. + +const here = dirname(fileURLToPath(import.meta.url)); +const source = readFileSync( + resolve(here, "../../../src/app/(dashboard)/dashboard/HomePageClient.tsx"), + "utf8" +); +const messages = JSON.parse( + readFileSync(resolve(here, "../../../src/i18n/messages/en.json"), "utf8") +) as { home: { step1Desc: string } }; + +test("#5695 Quick Start step 1 links to the API Manager (API Keys), not Endpoint", () => { + // The endpoint render-prop Link inside the step1Desc rich block. + const hrefMatch = source.match(/t\.rich\("step1Desc"[\s\S]*? { + const desc = messages.home.step1Desc; + assert.ok(desc.includes("API Keys"), `step1Desc should mention "API Keys"; got: "${desc}"`); + assert.ok( + !desc.includes("Registered Keys"), + `step1Desc must not send users to "Registered Keys" under Endpoint; got: "${desc}"` + ); +});