Skip to content

Instantly share code, notes, and snippets.

@Paranjayy
Last active October 14, 2026 06:07
Show Gist options
  • Select an option

  • Save Paranjayy/26814950259b499aef2ace995e7a4964 to your computer and use it in GitHub Desktop.

Select an option

Save Paranjayy/26814950259b499aef2ace995e7a4964 to your computer and use it in GitHub Desktop.
Windows close-to-tray lifecycle verification for T3 Code
[
{
"name": "desktop.window.createMain",
"startTimeUnixNano": "1791933212536261500",
"exit": {
"_tag": "Success"
}
},
{
"name": "desktop.window.handleBackendReady",
"startTimeUnixNano": "1791933212535854600",
"exit": {
"_tag": "Success"
}
},
{
"name": "desktop.window.createMain",
"startTimeUnixNano": "1791933475626141200",
"exit": {
"_tag": "Success"
}
},
{
"name": "desktop.window.handleBackendReady",
"startTimeUnixNano": "1791933475624882300",
"exit": {
"_tag": "Success"
}
},
{
"name": "desktop.lifecycle.windowAllClosed",
"startTimeUnixNano": "1791933680862626900",
"exit": {
"_tag": "Success"
}
},
{
"name": "desktop.window.createMain",
"startTimeUnixNano": "1791933686017224300",
"exit": {
"_tag": "Success"
}
},
{
"name": "desktop.window.handleBackendReady",
"startTimeUnixNano": "1791933686016053900",
"exit": {
"_tag": "Success"
}
},
{
"name": "desktop.lifecycle.windowAllClosed",
"startTimeUnixNano": "1791933975467769100",
"exit": {
"_tag": "Success"
}
},
{
"name": "desktop.window.createMain",
"startTimeUnixNano": "1791948374200032900",
"exit": {
"_tag": "Success"
}
},
{
"name": "desktop.window.handleBackendReady",
"startTimeUnixNano": "1791948374198700600",
"exit": {
"_tag": "Success"
}
},
{
"name": "desktop.lifecycle.windowAllClosed",
"startTimeUnixNano": "1791948412822414100",
"exit": {
"_tag": "Success"
}
},
{
"name": "desktop.window.createMain",
"startTimeUnixNano": "1791948484486318100",
"exit": {
"_tag": "Success"
}
},
{
"name": "desktop.window.handleBackendReady",
"startTimeUnixNano": "1791948484485055100",
"exit": {
"_tag": "Success"
}
},
{
"name": "desktop.lifecycle.windowAllClosed",
"startTimeUnixNano": "1791948503180009500",
"exit": {
"_tag": "Success"
}
},
{
"name": "desktop.window.createMain",
"startTimeUnixNano": "1791948503737439400",
"exit": {
"_tag": "Success"
}
},
{
"name": "desktop.window.activate",
"startTimeUnixNano": "1791948503737291100",
"exit": {
"_tag": "Success"
}
},
{
"name": "desktop.lifecycle.windowAllClosed",
"startTimeUnixNano": "1791948555873513200",
"exit": {
"_tag": "Success"
}
},
{
"name": "desktop.window.createMain",
"startTimeUnixNano": "1791948593555427700",
"exit": {
"_tag": "Success"
}
},
{
"name": "desktop.window.activate",
"startTimeUnixNano": "1791948593555327900",
"exit": {
"_tag": "Success"
}
},
{
"name": "desktop.lifecycle.windowAllClosed",
"startTimeUnixNano": "1791948605510806300",
"exit": {
"_tag": "Success"
}
},
{
"name": "desktop.backendInstance.scheduleRestartFiber",
"startTimeUnixNano": "1791948607440516100",
"exit": {
"_tag": "Success"
}
},
{
"name": "desktop.window.handleBackendReady",
"startTimeUnixNano": "1791948613549360200",
"exit": {
"_tag": "Success"
}
},
{
"name": "desktop.window.createMain",
"startTimeUnixNano": "1791948637035074100",
"exit": {
"_tag": "Success"
}
},
{
"name": "desktop.window.activate",
"startTimeUnixNano": "1791948637035001300",
"exit": {
"_tag": "Success"
}
}
]

Follow-up verification: Windows close and reopening

The follow-up fixes ordinary second-instance launches by routing them through DesktopWindow.activate. Windows main/splash closure suppresses automatic window creation on backend readiness; explicit activation restores the pending request. macOS/Linux close defaults are unchanged.

Focused checks

Windows x64, Electron 44.4.5, upstream base a01c48f8.

  • 70 tests passed across DesktopClerk, DesktopWindow, DesktopLifecycle, DesktopTray and ElectronTray.
  • Desktop typecheck passed, with two existing suggestion diagnostics. Targeted lint and git diff --check passed.
  • Desktop main/worker/preload bundles rebuilt with vp pack; existing optional Linux x11 and CJS import.meta warnings remain.

Integrated app check

The repository's Electron runtime loaded the rebuilt full T3 desktop entry, real bundled web client and real local server with isolated state. This was not the synthetic tray fixture.

  • Closing all windows produced an empty native BrowserWindow list.
  • Launching the same Electron desktop entry again exited the secondary process with code 0 and recreated one visible main window, returning to the same draft. This now passes the previously reproduced relaunch failure.
  • A command submitted through T3's real integrated terminal wrote its before marker, waited 30 seconds, then wrote its after marker while no windows were open. Markers: 2026-10-14T08:59:07.8048905+05:30 and 2026-10-14T08:59:37.8302626+05:30.
  • After deliberately stopping the owned isolated server process, the production backend pool restarted it (PID 12952 -> 13520), and handleBackendReady succeeded. The native window list stayed empty until a new explicit launch. Relaunch reopened one visible main window.
  • Native Quit traversed beforeQuit, requestShutdownAndWait, backend stop and PreviewManager.destroy. The owned Electron and backend processes exited.

Limits

The new unpacked Windows artifact was built into the retained staging directory, but packaging validation failed to execute it: Windows Application Control returned WinError 4551 (An Application Control policy has blocked this file), surfaced by Node as spawn UNKNOWN. Therefore the follow-up is checked in the repository Electron runtime, not the newly packaged executable.

Provider-task continuity is unverified: the isolated default provider reported workspace-routing 401 and the additional copied account reported unauthenticated. The terminal check establishes continued backend/terminal work only. Physical tray clicks, native tray menu Quit, a remote-client continuity recording, WSL cold boot, Windows ARM64 and native macOS/Linux execution remain unchecked. Focused tests cover splash-close/activation, platform defaults, unavailable tray, and updater Quit; they do not establish packaged native coverage for those cases.

Screenshots in this follow-up are genuine captures of the full app under the Electron development runtime. The earlier screenshots depict a synthetic fixture. Neither set substitutes for a close/reopen/quit recording.

Contribution audit

#7493 was closed because its screenshot did not demonstrate closing, keeping a remote session alive, reopening and explicitly quitting: pingdotgg/t3code#7493 (comment)

#10163 was closed because the new Windows tray/close behavior lacked explicit maintainer approval: pingdotgg/t3code#10163 (comment)

The current PR uses the template headings and documents scope and verification. Explicit direction approval and complete interaction evidence remain outstanding. The request is reasonable, but keeping a process/backends/connections alive after close changes product defaults; passing tests does not settle that product choice.

Display the source blob
Display the rendered blob
Raw
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Display the source blob
Display the rendered blob
Raw
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View raw

(Sorry about that, but we can’t show files that are this big right now.)

Display the source blob
Display the rendered blob
Raw
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View raw

(Sorry about that, but we can’t show files that are this big right now.)

View raw

(Sorry about that, but we can’t show files that are this big right now.)

View raw

(Sorry about that, but we can’t show files that are this big right now.)

View raw

(Sorry about that, but we can’t show files that are this big right now.)

Display the source blob
Display the rendered blob
Raw
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View raw

(Sorry about that, but we can’t show files that are this big right now.)

View raw

(Sorry about that, but we can’t show files that are this big right now.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment