Skip to content

Commit 7f24727

Browse files
donjor-agent[bot]donjor
authored andcommitted
fix(voice-input): use InlineButton for processing error dismissal (#1800)
## Problem The dismissible voice-processing error duplicates the shared inline action primitive. ## Change #1792 ui-consistency-2: use destructive `InlineButton` for error dismissal, preserving its tooltip, accessible label, truncation, and dismiss handler. Visible differences are the primitive's hover underline, destructive tone, and keyboard focus outline. #1792 ui-consistency-1: held: mirrors upstream composer action button; no shared Button variant upstream, and adding one means a hook in a high-churn upstream file. The finish/retry markup and `ui/button.tsx` match `origin/hyprws` exactly. #1792 ui-consistency-3: held because moving both static rules requires separate upstream hooks in `ChatComposer` (live padding) and `ComposerSurface` (shell geometry), exceeding the approved one-hook limit. The fork-only stylesheet remains unchanged. ## Scope and approval Maintainer-directed, issue-free consistency fix for existing desktop dictation; no new capability, mobile changes, or backfill PR edits. The host's Round 3 ruling prioritizes sync-conflict avoidance over adding shared button variants. ## Verification `vp lint apps/web/src/voice-input/useVoiceText.fork.tsx` → exit 0 (0 errors, 0 warnings). `cd apps/web && vp run typecheck` → exit 0. `vp run fork:ci` → exit 0 (63 files, 776 tests passed; 0 lint errors, 451 warnings). No tests were touched, so no touched-test command applies. The previous head's cloud Test Web failed `AttachmentFilePreview.browser.test.tsx:74` (8,786 passed, 1 failed). The host identifies AttachmentFilePreview and WorkflowOpeningBlock failures as known base flakes; do not fix or rerun them in this scope. Host browser grounding: see Evidence. No browser or dev server was started. Implemented by GPT-6.1 Sol through Pi. ## Evidence Web client, dark, 1280x800, seeded dev data: `hyprws` vs this PR merged on the current base. The error state was set directly in React state; a real failure needs a failing provider call. - Shows: error at rest, hovered, keyboard focus - Rest: destructive tone at 80%, full on hover - Hover: underline; tooltip and truncation unchanged - Focus: shared ring outline ![1800 before and after](https://github.com/user-attachments/assets/89dd17d0-d2ab-443b-bb8b-29de7a2e194f) ## Fork trailers Fork-Domain: voice-input Fork-Tier: qol Fork-Upstreamable: no Co-authored-by: donjor <[email protected]>
1 parent 874ffea commit 7f24727

1 file changed

Lines changed: 6 additions & 6 deletions

File tree

‎apps/web/src/voice-input/useVoiceText.fork.tsx‎

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ import {
1313
import { useEffect, useLayoutEffect, useRef, useState } from "react";
1414
import { CaseSensitiveIcon, ListIcon, Undo2Icon, XIcon } from "lucide-react";
1515
import { readPreparedConnection, useEnvironmentScope } from "../state/session";
16-
import { Button } from "../components/ui/button";
16+
import { Button, InlineButton } from "../components/ui/button";
1717
import { Spinner } from "../components/ui/spinner";
1818
import { Tooltip, TooltipTrigger, TooltipPopup } from "../components/ui/tooltip";
1919
import { useVoiceTextSettingsFork } from "./useVoiceSettings.fork";
@@ -302,14 +302,14 @@ export function useVoiceTextFork(input: VoiceTextInputFork) {
302302
<Tooltip>
303303
<TooltipTrigger
304304
render={
305-
<button
306-
type="button"
307-
className="max-w-48 truncate text-xs text-destructive"
305+
<InlineButton
306+
tone="destructive"
307+
className="max-w-48"
308308
onClick={() => setError(null)}
309309
aria-label={`Dismiss: ${error}`}
310310
>
311-
{error}
312-
</button>
311+
<span className="truncate text-xs">{error}</span>
312+
</InlineButton>
313313
}
314314
/>
315315
<TooltipPopup>{error}</TooltipPopup>

0 commit comments

Comments
 (0)