Skip to content

fix(desktop): make the frontend typecheck under TypeScript 6 (unblocks #3691)#3791

Merged
esengine merged 1 commit into
main-v2from
fix/frontend-ts6-compat
Jun 10, 2026
Merged

fix(desktop): make the frontend typecheck under TypeScript 6 (unblocks #3691)#3791
esengine merged 1 commit into
main-v2from
fix/frontend-ts6-compat

Conversation

@esengine

Copy link
Copy Markdown
Owner

Unblocks the TypeScript 6 bump (#3691). The @types/react 19 bump (#3690) tightened ref nullability and dropped the global JSX namespace; TypeScript 6 enforces both, so the frontend typecheck fails under #3691 even though it passes under 5.9.

Fixes (no behavior change, all valid under the current TS 5.9 too):

  • AnchoredPopover / PromptShelf: shared ref props typed RefObject<T | null> to match what useRef(null) actually returns.
  • WorkspacePanel: import the JSX namespace from react instead of relying on the removed global.
  • Composer: give the debounce useRef an explicit undefined initial value.

Verified locally: with typescript@6.0.3, the 12 errors #3691 hit are gone (only the wails-generated bindings, which CI generates, remain); under the locked TS 5.9 the changed files add no new errors. Once this lands, #3691 should go green on rebase.

@types/react 19 (bumped in #3690) tightened ref nullability and dropped the
global JSX namespace, which TypeScript 6 enforces. Type the shared ref props
as RefObject<T | null> (matching what useRef(null) returns), import the JSX
namespace from react, and give the debounce useRef an explicit initial value.
No behavior change; unblocks the typescript@6 bump (#3691).
@esengine esengine requested a review from SivanCola as a code owner June 10, 2026 05:43
@github-actions github-actions Bot added v2 Go rewrite (1.x) — main-v2 branch, active development desktop Wails desktop app (desktop/**) labels Jun 10, 2026
@esengine esengine merged commit 9bdff29 into main-v2 Jun 10, 2026
14 checks passed
@esengine esengine deleted the fix/frontend-ts6-compat branch June 10, 2026 05:47
SuMuxi66 pushed a commit to SuMuxi66/DeepSeek-Reasonix that referenced this pull request Jun 10, 2026
…e#3791)

@types/react 19 (bumped in esengine#3690) tightened ref nullability and dropped the
global JSX namespace, which TypeScript 6 enforces. Type the shared ref props
as RefObject<T | null> (matching what useRef(null) returns), import the JSX
namespace from react, and give the debounce useRef an explicit initial value.
No behavior change; unblocks the typescript@6 bump (esengine#3691).

Co-authored-by: reasonix <reasonix@deepseek.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

desktop Wails desktop app (desktop/**) v2 Go rewrite (1.x) — main-v2 branch, active development

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant