The fastest, cheapest, most efficient open-source agent harness. Run more than 500 agents on a $10 VPS.
Rust agent-orchestrationai-agentsai-assistantdesktopllmlocal-firstmcppersonal-aiprivacyrustsecond-braintauri
fix(app): show the disabled-Test reason as text, not a title on a dead button\n\nBoth review bots are right and this was a real defect in the fix, not a nitpick.\n\n`Button` applies `disabled:pointer-events-none` (ui/Button.tsx:40), so a\ndisabled control is removed from pointer hit-testing and cannot be hovered. A\ndisabled button is also out of the tab order. So the `title` carrying the\nexplanation was unreachable by mouse AND by keyboard — the control was still\nmute, just quieter about it.\n\nThe reason now renders beside the button as ordinary visible text when the\nprovider is custom. That needs no hover, no focus and no tooltip primitive.\nThe button carries no `title` at all.\n\nVerified through ~/tinyhuman/ci-slot.sh, 21 passed. Revert-proofed:\n - `{isCustom &&` -> `{false &&` (reason never renders): "shows the reason as\n visible text, not as a title on the disabled button" fails\n - `{isCustom &&` -> `{true &&` (reason leaks onto built-in providers): "shows\n no such reason for a built-in provider" fails\n - restored: 21 passed\n\nTwo earlier injections in this session removed a JSX block by slicing and\nreported "no tests" — a broken parse, not a passing suite. Both re-done as\none-token edits, and the file was checked after each restore.\n
M3gA-Mind36c6119abf05
diff --git a/app/src/components/settings/panels/EmbeddingsSetupModal.tsx b/app/src/components/settings/panels/EmbeddingsSetupModal.tsxindex bf54d486a7..e0aca13066 100644--- a/app/src/components/settings/panels/EmbeddingsSetupModal.tsx+++ b/app/src/components/settings/panels/EmbeddingsSetupModal.tsx@@ -68,32 +68,41 @@ const EmbeddingsSetupModal = ({contentClassName="px-5 py-4 space-y-4"footer={<div className="flex justify-between pt-1">- {/* Disabled for a custom endpoint, deliberately, and with a reason- the user can read. `setupTest` calls+ {/* Disabled for a custom endpoint, deliberately. `setupTest` calls`openhuman.embeddings_test_connection` with only`{ provider, model, dimensions }` — there is no parameter for anendpoint URL — so a custom provider has nothing to test against.Previously the button stayed enabled and its handler opened with`if (!isCustom)`, so a click did nothing at all: no request, no- result, no error. A dead control that looks live is worse than an- absent one, and worse still than an honest explanation. */}- <Button- variant="secondary"- size="xs"- onClick={onTest}- title={- isCustom- ? t(- 'settings.embeddings.testUnavailableCustom',- 'Testing a custom endpoint is not supported yet — save it and check the status on the Embeddings panel.'- )- : undefined- }- disabled={setupTesting || setupSaving || isCustom || !setupKey.trim()}>- {setupTesting- ? t('settings.embeddings.testing')- : t('settings.embeddings.testConnection')}- </Button>+ result, no error.++ The reason is rendered as visible text beside the button, not as a+ `title` on it. `Button` applies `disabled:pointer-events-none`+ (ui/Button.tsx:40), so a disabled control cannot be hovered — and a+ disabled button is out of the tab order, so a `title` is+ unreachable by keyboard too. Text that is simply on screen needs+ neither. */}+ <div className="flex items-center gap-2">+ <Button+ variant="secondary"+ size="xs"+ onClick={onTest}+ disabled={setupTesting || setupSaving || isCustom || !setupKey.trim()}>+ {setupTesting+ ? t('settings.embeddings.testing')+ : t('settings.embeddings.testConnection')}+ </Button>+ {isCustom && (+ <span+ data-testid="embeddings-test-unavailable-reason"+ className="max-w-[18rem] text-[11px] text-content-muted">+ {t(+ 'settings.embeddings.testUnavailableCustom',+ 'Testing a custom endpoint is not supported yet — save it and check the status on the Embeddings panel.'+ )}+ </span>+ )}+ </div><div className="flex gap-2"><Button variant="tertiary" size="xs" onClick={onClose}>diff --git a/app/src/components/settings/panels/__tests__/EmbeddingsSetupModal.test.tsx b/app/src/components/settings/panels/__tests__/EmbeddingsSetupModal.test.tsxindex a2c4cb8b64..9aea235352 100644--- a/app/src/components/settings/panels/__tests__/EmbeddingsSetupModal.test.tsx+++ b/app/src/components/settings/panels/__tests__/EmbeddingsSetupModal.test.tsx@@ -167,12 +167,23 @@ describe('EmbeddingsSetupModal — custom-endpoint branch', () => {expect(onTest).not.toHaveBeenCalled();});- it('explains on hover why Test is unavailable for a custom endpoint', () => {- // A silently disabled control is only marginally better than a dead one;- // the reason is what makes it honest.+ it('shows the reason as visible text, not as a title on the disabled button', () => {+ // `Button` applies `disabled:pointer-events-none` (ui/Button.tsx:40), so a+ // disabled control cannot be hovered, and a disabled button is out of the+ // tab order — a `title` there is unreachable by mouse AND by keyboard.+ // The reason is therefore rendered beside the button as ordinary text.renderModal({ setupProvider: custom, customEndpoint: 'https://host/v1' });- expect(testButton().getAttribute('title') ?? '').toContain('custom endpoint');+ const reason = screen.getByTestId('embeddings-test-unavailable-reason');+ expect(reason).toBeVisible();+ expect(reason.textContent ?? '').toContain('custom endpoint');+ expect(testButton()).not.toHaveAttribute('title');+ });++ it('shows no such reason for a built-in provider', () => {+ renderModal({ setupKey: 'sk-test' });++ expect(screen.queryByTestId('embeddings-test-unavailable-reason')).not.toBeInTheDocument();});it('leaves Save reachable for a custom endpoint', () => {