Skip to content

Clean up speech download request listeners - #3799

Merged
nwparker merged 1 commit into
mainfrom
nwparker/speech-download-request-listener-cleanup
May 30, 2026
Merged

nwparker merged 1 commit into
mainfrom
nwparker/speech-download-request-listener-cleanup

Conversation

@nwparker

Copy link
Copy Markdown
Contributor

Summary

  • remove speech model download request error and timeout listeners once a download promise settles
  • keep the existing idle timeout behavior while rejecting directly on timeout and destroying the request without a synthetic second error
  • assert request listener cleanup in cancellation and timeout tests

Validation

  • pnpm exec vitest run --config config/vitest.config.ts src/main/speech/model-manager.test.ts
  • pnpm exec oxlint src/main/speech/model-manager.ts src/main/speech/model-manager.test.ts
  • pnpm typecheck:node
  • git diff --check

Risk: low

Risk assessment: Low. This is scoped to cleanup of listeners attached by one speech-model HTTPS request, preserves the user-facing timeout error and cancellation flow, and is covered by focused regression tests.

@nwparker nwparker added the risk:low Low risk change label May 30, 2026
@nwparker
nwparker merged commit 5bd1727 into main May 30, 2026
2 checks passed
@nwparker
nwparker deleted the nwparker/speech-download-request-listener-cleanup branch May 30, 2026 17:43
nwparker added a commit that referenced this pull request Jul 14, 2026
#185 ref loop

radix-ui 1.4.3 bundles pre-fix sub-packages (react-slot 1.2.3, react-popper
1.2.8, react-compose-refs 1.1.2, react-menu/dropdown-menu 2.1.16) that build a
new composed callback-ref identity every render. Under React 19's re-run-on-
identity-change ref semantics, that detaches/re-attaches the ref each commit;
several primitives compose a useState setter as that ref (Tooltip
onTriggerChange, Popper onAnchorChange), so the state oscillates null<->node
and after >50 nested updates React throws #185 (Maximum update depth exceeded).
Crash e95669d2 (Tooltip->Button) and the dev DropdownMenu->Button reports.

1.6.2 bundles the fixed sub-packages (react-slot 1.3.0 memoized compose-refs,
react-popper 1.3.3, react-compose-refs 1.1.3, react-menu/dropdown-menu 2.1.20,
react-tooltip 1.2.12). Upstream radix-ui/primitives #3799 + #3963.

Also batches React-runtime patch bumps (in-range 19.2.x, low risk):
react/react-dom 19.2.5->19.2.7, @types/react 19.2.14->19.2.17.

Evidence: Orca's real Tooltip+Button tree fires the button ref 2 attaches + 1
detach on a static mount with 1.4.3 (churn), and 1 attach + 0 detach with 1.6.2
(stable). Renderer suite (13703 tests) + web typecheck green on the combined bump.

Co-authored-by: Orca <[email protected]>
enrick-dev pushed a commit to enrick-dev/orca that referenced this pull request Oct 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

risk:low Low risk change

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant