pingdotgg / pingdotgg/t3code

[Bug]: Windows desktop typing lags even in empty chats; browser interface is smooth

Open
#12,689 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

accepted bug via-triage
Dominant language
TypeScript
Stars
23k
Forks
5.9k
Avg merge
11h 14m
Merged PRs (30d)
357

Description

Before submitting
  • I searched existing issues and did not find a duplicate.
  • I included enough detail to reproduce or investigate the problem.
Area

apps/desktop

Steps to reproduce
  1. Open T3 Code Desktop on Windows.
  2. Start a new, empty chat.
  3. Type continuously in the composer and observe input lag.
  4. Keep the same local backend running and open http://localhost:3773 in a browser.
  5. Type in the browser interface. Typing is smooth there.

This reproduces on my installation; I have not tested with a fresh application profile.

Expected behavior

Typing in the desktop composer should appear immediately, with responsiveness comparable to the browser interface.

Actual behavior

Typing in the desktop application visibly lags, including in new, empty chats. The browser interface connected to the same backend does not lag.

The desktop also displays “Some requests are slow” messages, although I have not established whether those warnings share the same cause.

Impact

Blocks work completely

Version or commit

0.0.42

Environment

Windows 11 Pro, build 26200, T3 Code Desktop (Alpha) 0.0.42, Intel Core i7-12700H, 20 logical processors 64 GB RAM Intel Iris Xe / NVIDIA GeForce RTX 3070 Ti Laptop GPU Local backend; browser interface on the same machine is responsive

Logs or stack traces
Renderer CPU profile captured while typing:

Recording duration: 18.3 seconds
Renderer idle time: approximately 15.9 seconds (87%)
One continuous approximately 1,000 ms interval in:

getLocalEnvironmentBootstraps
  -> ipcRenderer.sendSync
  -> native sendSync

Installed preload implementation:
electron.ipcRenderer.sendSync(GET_LOCAL_ENVIRONMENT_BOOTSTRAPS_CHANNEL)

The installed frontend polls environment topology every 3 seconds.
Desktop traces during the capture show bootstrap handler execution
around 0.06–0.18 ms.

This suggests a synchronous desktop IPC stall. The source of the one-second wait is not established, and the profile alone does not prove that this accounts for all perceived input lag.
Screenshots, recordings, or supporting files

cpu-profile.zip

Workaround

Use the browser interface at http://localhost:3773 while the local backend remains running. Typing is smooth there. No application settings or binaries were changed.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start in the desktop preload implementation at ipcRenderer.sendSync(GET_LOCAL_ENVIRONMENT_BOOTSTRAPS_CHANNEL), then trace getLocalEnvironmentBootstraps and the frontend's three-second environment-topology poll. Reproduce typing lag on Windows in an empty chat and compare a renderer CPU profile with the browser interface. Done means typing is responsive in the desktop composer without the observed synchronous IPC stall.

Written by the indexing model from the issue text.

Assessment

Tech stack
electron, typescript
Domain
desktop, performance
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.