Repository navigation
feat: add per-account test messages and responsive quota actions - #15138
Merged
diegosouzapw merged 13 commits intoOct 8, 2026
Merged
diegosouzapw merged 13 commits into
diegosouzapw merged 13 commits into
Conversation
JxnLexn
marked this pull request as ready for review
September 29, 2026 19:41
5 tasks done
Co-authored-by: diegosouzapw <8016841+diegosouzapw@users.noreply.github.com>
… EditConnectionModal under its frozen size Co-authored-by: diegosouzapw <8016841+diegosouzapw@users.noreply.github.com>
Co-authored-by: diegosouzapw <8016841+diegosouzapw@users.noreply.github.com>
…locales Co-authored-by: diegosouzapw <8016841+diegosouzapw@users.noreply.github.com>
Owner
|
Thanks @JxnLexn — merged into |
This was referenced Oct 8, 2026
diegosouzapw
added a commit
that referenced
this pull request
Oct 8, 2026
diegosouzapw
added a commit
that referenced
this pull request
Oct 8, 2026
Drains 9 v3.8.52 tip unit reds: 3 production defects — MCP bundle startup deadlock (async ESM init cycle from #13739; lazy-load cleanModelName), client bundles pulling server-only DB via imageRegistry→featureFlags (#15423; dependency-free resolver bridge, DB override preserved, default OFF), zh-CN/zh-TW glossary violations (#15138/#15092) — plus regenerated route namespaces, env-isolated guide-settings test, auth-test alignments that keep (and tighten to count=2) the loopback/management guards, quota-card guard following #15138 redesign, and stryker listing of 2 tip covering tests. Combined-board validation with #15903: 327/329 on the previously red files, typechecks, lint, 22 gates.
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
Add a manual Test message action to each provider connection and Provider Quota card. Operators select and save a default chat model per account directly in Edit Connection (or in the test dialog), set one shared message in Settings → AI, send a real request and see its answer. The default asks for
1 + 1with a numeric answer. This can start an upstream usage window; the provider determines its timing.Requests use only the selected account, bypass response caching and do not fall back to another account. Opening the dialog or saving settings never generates traffic. Disabled accounts cannot send; repeated concurrent clicks are rejected. The existing model-test runner supplies timeout handling, short output limits and sanitized errors.
Quota actions now use a responsive grid, with the refresh control beside the update timestamp, so narrow cards keep every action visible and clickable.
Related Issues
Validation
release/v3.8.52at453918ab64; existing release changes preservednode --import tsx/esm --import ./tests/_setup/isolateDataDir.ts --test tests/unit/connection-test-message.test.ts tests/unit/model-test-route.test.ts— 10 passednpm run test:vitest— 493 passedRUN_QUOTA_LAYOUT=1 npx vitest run --config vitest.config.ts tests/unit/ui/connection-test-message.test.tsx— 6 passed, English and German at 230/280/320/380px card widthsnpm run typecheck:core,npm run check:dashboard-typecheck, changed-file ESLint, OpenAPI coverage/security tiers, i18n coverage/value-drift/glossary and fabricated-document checksnpm run lint— five inheritedreact-hooks/immutabilityerrors in unchanged hook test files (use-improve-prompt,use-presets,use-stream-metrics,use-structured-output,use-tools-builder); changed-file ESLint passese83ef183709af44018a7533c79ac4d5cd93ae892gpt-6-lunafor the selected Pro account without sending; Provider Quota loaded the same saved model and sent exactly one request. HTTP 200, answer2, latency 1204 ms; account remained active with no recorded auth errornpm run check:docs-allreaches the inherited documentation-count failure: README and llm.txt still claim 3.8.51 while the release package is 3.8.52. The complete native suite, coverage matrix and upstream production build are left to CI.Tests Added Or Updated
tests/unit/connection-test-message.test.ts: management auth, per-account persistence, exact account selection, custom message, cache bypass, no fallback on failure, duplicate requests, inactive accounts, validation and paid-model policy.tests/unit/ui/connection-test-message.test.tsx: configuration versus sending, response display, disabled/unavailable models, global message persistence and quota action handlers.tests/helpers/assertQuotaCardLayout.cjs: opt-in headless geometry and edge hit-testing. Uses the installed Playwright browser, orPLAYWRIGHT_CHROMIUM_EXECUTABLE_PATHwhen explicitly supplied; no desktop browser window is opened.Coverage Notes
The API tests exercise the real internal chat pipeline with mocked upstream responses. UI tests cover user interactions; the opt-in browser check verifies actual rendered sizes and click targets.
Reviewer Notes
No schema migration or scheduler is added. The chosen model is stored as
providerSpecificData.connectionTestModel; the shared message is stored asconnectionTestPromptwith a 500-character limit. The connection form reads the current model when opened; only an explicitly edited model is written back, so unrelated saves cannot overwrite a newer selection from the test dialog. Cancel discards the draft. English and German copy is included; other locales use the existing English fallback. Each send is a real, quota-consuming request. The new endpoint is management-authenticated and documented in OpenAPI.Live verification used
node /tmp/verify-connection-test-ui.cjs, followed by the read-onlynode /tmp/verify-quota-layout-live.cjsandnode /tmp/verify-quota-compact-live.cjsheadless checks. The first combined run measured geometry immediately after closing the answer dialog and reported an obstructed hit target; the settled-page checks above passed for both layouts. No additional inference was sent during those layout checks. The upstream API type annotations transpile to the same runtime JavaScript as the deployed fork endpoint.Follow-up validation for the connection-settings field: 9 focused native tests passed (including save/preserve/clear through the actual connection PUT route), 9 UI interaction tests passed (OAuth and API-key accounts, fresh preset, Save, Cancel/reopen and clearing), changed-file ESLint and the dashboard type gate passed. The follow-up image was built successfully in GitHub run 36621947961 and deployed at revision
e1af47441007cf9ba0dda1a8737e8f89ddf14a00. Live headless verification (node /tmp/verify-connection-default-live.cjs) confirmed the new Edit Connection field, the persistedgpt-6-lunadefault, and that Cancel/reopen restores that default. This follow-up UI check sent zero model requests and made zero server writes.