Repository navigation
fix(dashboard): make provider card warning indicators expose the interaction they advertise - #10448
Merged
Merged
Conversation
…raction they advertise The usage-risk indicator (subscriptionRisk) promised "click for details" in its tooltip but was a bare <span> with no onClick/role/dialog. The connection warning-count badge exposed neither a title tooltip (reasons) nor any click affordance, even though the reasons already exist in providerSpecificData.apiKeyHealth[]. Turn the risk indicator into a real <button role/aria-haspopup="dialog"> that opens an accessible Modal reusing the existing riskNotice copy, and wrap the warning badge in a keyboard- and pointer-interactive control that surfaces a sanitized reasons summary (max failure count + relative last-failure time, never raw upstream error text) and navigates to the connection detail/health view on activation. Both indicators are now visually distinct (bare icon vs. pill Badge). Closes #10261
… all 42 locales (#10261) Real Vietnamese translations (vi.json has a strict no-__MISSING__-marker gate); other 41 locales carry the sync-ui __MISSING__ placeholder pending the normal translation pass.
Collaborator
Author
Code reviewFound 1 issue:
|
Co-authored-by: diegosouzapw <8016841+diegosouzapw@users.noreply.github.com>
diegosouzapw
pushed a commit
that referenced
this pull request
Aug 25, 2026
…en mcp shard None of these are cycle regressions. The Vitest job runs test:vitest (mcp shard) then test:vitest:ui; the mcp shard was failing on a missing glm-5.3-max and aborted the job before the ui shard ever ran. Fixing that shard this cycle unmasked 34 ui failures that had been broken since 18-23 Aug — four separate PRs that moved a contract and updated their own tests but not their siblings. - ProviderCard gained useRouter() in #10448; four test files render it without mocking next/navigation and died on 'invariant expected app router to be mounted'. The sibling created alongside #10448 already had the mock — it just was not applied to the other four consumers. - SkillCoverage gained a required config category. The four fixtures in agent-skills-page still described only api/cli, so the component read config.have off undefined. Values were chosen per scenario rather than pasted: full coverage gets 2/2 so its bar stays emerald, the amber fixture gets 3/4 so it stays amber. CoverageBar renders api -> config -> cli, so the new bar lands in the MIDDLE and the cli assertions moved from index [1] to [2]; without that the cli checks would have passed while measuring the config bar. The aria test now pins all three bars. - CliAgentsPage hardcoded AGENT_IDS, which had already drifted once (6 -> 8 with omp/letta, per its own comment) and drifted again with prime-agent (#11166). It is now derived from CLI_TOOLS. This is why an agent missing from that list is not cosmetic: it never enters the status map, defaults to not_installed, and adds a phantom card to the filter and count tests. Deriving keeps the fixture in sync by construction instead of waiting for the next agent. - claudeTlsClient asserted proxyUrl was undefined inside a test literally named 'falls back to env var when per-call proxyUrl not provided' — it pinned the old behaviour where testOverride bypassed proxy resolution. #10910 moved resolution ahead of the override on purpose ('so test overrides and the real path both see it'), so the assertion now checks the fallback the test name promises. test:vitest:ui goes from 34 failures to 14. The remaining 14 sit in six files none of this commit touches (AutoComboCatalog, CoolingConnectionsPanel, ProxyRegistryManager x2, connectionsSearchFilter) plus one claudeTlsClient case that passes in isolation and only fails in the full run — i.e. cross-file pollution. They need a clean environment to judge: this devbox resolves part of its tree through a stray pnpm store and has already produced one phantom failure count this cycle. Refs #10692
muhamadgalihsaputra
pushed a commit
to niyatna/NiyatnaRoute
that referenced
this pull request
Sep 27, 2026
…raction they advertise (cheaper-inference#10448) * fix(dashboard): make provider card warning indicators expose the interaction they advertise The usage-risk indicator (subscriptionRisk) promised "click for details" in its tooltip but was a bare <span> with no onClick/role/dialog. The connection warning-count badge exposed neither a title tooltip (reasons) nor any click affordance, even though the reasons already exist in providerSpecificData.apiKeyHealth[]. Turn the risk indicator into a real <button role/aria-haspopup="dialog"> that opens an accessible Modal reusing the existing riskNotice copy, and wrap the warning badge in a keyboard- and pointer-interactive control that surfaces a sanitized reasons summary (max failure count + relative last-failure time, never raw upstream error text) and navigates to the connection detail/health view on activation. Both indicators are now visually distinct (bare icon vs. pill Badge). Closes cheaper-inference#10261 * i18n(providers): sync riskNotice.detailsTitle + warningNotice keys to all 42 locales (cheaper-inference#10261) Real Vietnamese translations (vi.json has a strict no-__MISSING__-marker gate); other 41 locales carry the sync-ui __MISSING__ placeholder pending the normal translation pass. * test(dashboard): relocate provider warning regression test Co-authored-by: diegosouzapw <8016841+diegosouzapw@users.noreply.github.com> --------- Co-authored-by: adevwithpurpose <adevwithpurpose@users.noreply.github.com>
muhamadgalihsaputra
pushed a commit
to niyatna/NiyatnaRoute
that referenced
this pull request
Sep 27, 2026
…en mcp shard None of these are cycle regressions. The Vitest job runs test:vitest (mcp shard) then test:vitest:ui; the mcp shard was failing on a missing glm-5.3-max and aborted the job before the ui shard ever ran. Fixing that shard this cycle unmasked 34 ui failures that had been broken since 18-23 Aug — four separate PRs that moved a contract and updated their own tests but not their siblings. - ProviderCard gained useRouter() in cheaper-inference#10448; four test files render it without mocking next/navigation and died on 'invariant expected app router to be mounted'. The sibling created alongside cheaper-inference#10448 already had the mock — it just was not applied to the other four consumers. - SkillCoverage gained a required config category. The four fixtures in agent-skills-page still described only api/cli, so the component read config.have off undefined. Values were chosen per scenario rather than pasted: full coverage gets 2/2 so its bar stays emerald, the amber fixture gets 3/4 so it stays amber. CoverageBar renders api -> config -> cli, so the new bar lands in the MIDDLE and the cli assertions moved from index [1] to [2]; without that the cli checks would have passed while measuring the config bar. The aria test now pins all three bars. - CliAgentsPage hardcoded AGENT_IDS, which had already drifted once (6 -> 8 with omp/letta, per its own comment) and drifted again with prime-agent (cheaper-inference#11166). It is now derived from CLI_TOOLS. This is why an agent missing from that list is not cosmetic: it never enters the status map, defaults to not_installed, and adds a phantom card to the filter and count tests. Deriving keeps the fixture in sync by construction instead of waiting for the next agent. - claudeTlsClient asserted proxyUrl was undefined inside a test literally named 'falls back to env var when per-call proxyUrl not provided' — it pinned the old behaviour where testOverride bypassed proxy resolution. cheaper-inference#10910 moved resolution ahead of the override on purpose ('so test overrides and the real path both see it'), so the assertion now checks the fallback the test name promises. test:vitest:ui goes from 34 failures to 14. The remaining 14 sit in six files none of this commit touches (AutoComboCatalog, CoolingConnectionsPanel, ProxyRegistryManager x2, connectionsSearchFilter) plus one claudeTlsClient case that passes in isolation and only fails in the full run — i.e. cross-file pollution. They need a clean environment to judge: this devbox resolves part of its tree through a stray pnpm store and has already produced one phantom failure count this cycle. Refs cheaper-inference#10692
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.
Closes #10261
Root cause
src/app/(dashboard)/dashboard/providers/components/ProviderCard.tsxrendered two warning indicators that advertised interaction they did not implement:subscriptionRisk) — a plain<span title="… click for details">with noonClick, norole, and no dialog. Clicking it did nothing.Badgewith notitle(no reasons exposed) and no click affordance, even though the reasons (failures,lastFailure,totalRequests) already exist per-connection inproviderSpecificData.apiKeyHealth[]and are shown inEditConnectionModal.tsx.Fix
<button role... aria-haspopup="dialog">that opens an accessibleModal(reuses the existingriskNoticecopy, keyed byriskNoticeVariant).role="button",tabIndex=0, Enter/Space activation) exposing a sanitized reasons summary (max failure count + relative last-failure time — never raw upstream error text, Hard Rule fix(ui): fix Select dropdown dark theme inconsistency #12) viatitle/aria-label, and navigates to the provider detail/health view on activation.material-symbols-outlinedglyph; the warning badge is the pill-shapedBadgecomponent.preventDefault()/stopPropagation()so they don't trigger the card's wrapping<Link>navigation (existing pattern fromhandleTestClick/handleToggle).page.tsxnow aggregates a sanitizedwarningMaxFailures/warningLastFailureRelativesummary fromapiKeyHealthalongside the existing warning count.providers.riskNotice.detailsTitleandproviders.warningNotice.{tooltip,lastFailureSuffix,ariaLabel}toen.json.Regression test
src/app/(dashboard)/dashboard/providers/components/__tests__/providerCardWarningIndicators.test.tsx(vitest, matches thetests/unit/**/*.test.tsx/dashboard/providers/**/__tests__/**include globs invitest.config.ts):tabindex=0, no raw upstream error strings)Gates run
npm run typecheck:core— cleannpx eslint --suppressions-location config/quality/eslint-suppressions.json <changed files>— cleannode scripts/check/check-file-size.mjs— OK, no new violations on touched filesnode scripts/check/check-complexity.mjs— OK (2456 vs baseline 2774)node scripts/check/check-cognitive-complexity.mjs— OK (1104 vs baseline 1223)node scripts/check/check-test-discovery.mjs— OK, new test file discoverednpx vitest runProviderCard(tests/unit/ui/providerCardHandle.test.tsx,highlightableProviderCard.test.tsx,providerCardKimiPartnerAccent.test.tsx,card-hover-visible.test.ts,providers-page-utils.test.ts) — confirmed by content inspection that none touchsubscriptionRisk/warningCount/the changed lines; a devbox-saturated (13-way parallel fan-out)npm run test:unitrun hit vitest worker-pool timeouts unrelated to this diff, consistent with known devbox-under-load flakiness, not a regression from this change.