GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Desktop performance CI by juliusmarminge · Pull Request #61 · pingdotgg/t3code

Conversation

@juliusmarminge

@juliusmarminge juliusmarminge commented Feb 17, 2026 •
edited by cursor Bot
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Member

Adjust dev-electron bundle freshness logic and add diagnostics to resolve desktop perf CI failures.

The dev-electron process was timing out in CI because its bundle freshness check (comparing file mtime to process startTime) was too strict. Prebuilt bundles, despite being valid, were marked "stale" due to minor timestamp discrepancies in the CI environment. This PR introduces a 1-second grace period for the mtime check and adds detailed logging to improve future debugging.


Open in Cursor Open in Web


Open with Devin

Note

Medium Risk
Touches CI pipeline and desktop perf automation logic; while it mainly reduces flakiness, changes to gating/threshold parsing and which interactions run could alter perf signal and failure modes.

Overview
Desktop perf CI runs are made less flaky and more configurable by introducing CI-aware feature toggles (terminal interactions, optional renderer interactions, benchmark sweeps, follow-up passes) and wiring them through the workflow and automation runner.

The desktop perf automation is hardened with better diagnostics and retry behavior (bundle wait logging, more resilient renderer/terminal scripting, re-seeding if persisted state is empty, and continuing on non-critical interaction failures), and the perf trace script now validates/parses numeric thresholds, rewrites seed project cwd paths when needed, and reports the run configuration and exercised benchmark thread ids in the PR summary.

Written by Cursor Bugbot for commit 4df79f1. This will update automatically on new commits. Configure here.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

greptile-apps[bot] reacted with thumbs up emoji
All reactions
  • 👍 1 reaction
cursoragent and others added 6 commits February 17, 2026 04:43
@cursoragent @juliusmarminge
Fix desktop CI bundle readiness checks
b8a2481
Co-authored-by: Julius Marminge <[email protected]>
@cursoragent @juliusmarminge
Accept prebuilt desktop bundles in dev startup
2c91b7d
Co-authored-by: Julius Marminge <[email protected]>
@cursoragent @juliusmarminge
Run CI workflow on desktop perf fix branch
96aac70
Co-authored-by: Julius Marminge <[email protected]>
@cursoragent @juliusmarminge
Rewrite perf seed project paths for CI runtime
f18ee27
Co-authored-by: Julius Marminge <[email protected]>
@cursoragent @juliusmarminge
Harden perf automation against missing sidebar selectors
7a493bd
Co-authored-by: Julius Marminge <[email protected]>
@cursoragent @juliusmarminge
Make perf scripted interactions best-effort in CI
5cda771
Co-authored-by: Julius Marminge <[email protected]>
@cursor

cursor Bot commented Feb 17, 2026

Copy link
Copy Markdown
Contributor

Cursor Agent can help with this pull request. Just @cursor in comments and I'll start working on changes in this branch.
Learn more about Cursor Agents

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@coderabbitai

coderabbitai Bot commented Feb 17, 2026 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch cursor/desktop-performance-ci-e9ce

Comment @coderabbitai help to get the list of available commands and usage tips.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@macroscopeapp

macroscopeapp Bot commented Feb 17, 2026 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor

Tighten desktop performance CI by enforcing keypress thresholds (avg 12 ms, max 24 ms) and gating automation via env-driven toggles across .github/workflows/ci.yml, apps/desktop/src/perfConfig.ts, and renderer/terminal interaction flows

Add CI env thresholds and disable optional interactions to stabilize desktop perf runs; gate renderer/terminal automation with perfConfig toggles; wait for bundles by existence only; pass a perf flag to the renderer; and harden scripted interactions and seed handling in the perf trace runner.

📍Where to Start

Start with the toggle resolution in resolveBooleanToggle and callers in apps/desktop/src/perfConfig.ts, then follow usage in runDesktopPerfAutomation in apps/desktop/src/desktopPerfAutomation.ts.


Macroscope summarized 4df79f1.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@github-actions

github-actions Bot commented Feb 17, 2026 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor

Desktop Dev Perf Trace

  • Command: bun dev:desktop
  • Trace: /tmp/t3code-perf-artifacts/desktop-dev-2026-02-17T09-05-48-427Z/trace.json
  • Started: 2026-02-17T09:05:56.466Z
  • Completed: 2026-02-17T09:06:04.611Z
  • Duration: 8145 ms
  • Seed source: file (/tmp/t3code-perf-artifacts/desktop-dev-2026-02-17T09-05-48-427Z/perf-seed.runtime.json)

Interaction Run

  • Thread clicks: 1
  • Typed chars: 1
  • Benchmark thread ids exercised: none
  • Model selected: n/a
  • Terminal opened by shortcut: false
  • Terminal shortcut modifier: control
  • Terminal splits: 0
  • Terminal command executed: false
  • Terminal output observed: false
  • Terminal marker:
  • Terminal interactions enabled: false
  • Optional renderer interactions enabled: false
  • Benchmark sweep enabled: false
  • Benchmark follow-up pass count: 0

Threshold Config

  • keypress avg max: 12ms
  • keypress max max: 24ms
  • long EventDispatch spike cap: 5

Benchmark Thread Render

Thread Title (15) Messages First Nav (ms) Follow-up Median (ms) Follow-up Range Delta (ms) Delta (%)
n/a n/a n/a n/a n/a n/a n/a n/a

Input Event Metrics

Event Count Avg (ms) Max (ms) Total (ms)
keypress 0 0 0 0
textInput 0 0 0 0
input 1 10.671 10.671 10.671
keydown 1 3.06 3.06 3.06

Scheduler/Event Hotspots

  • dispatchDiscreteEvent: 12.524ms total (29 calls)
  • performWorkUntilDeadline: 8.797ms total (4 calls)
  • EventDispatch spikes >= 50ms: 1

Threshold Check

  • keypress avg <= 12ms: pass
  • keypress max <= 24ms: pass
  • long dispatch spikes <= 5: pass

Heap Counters

  • first=15.7MB, last=22MB, min=15.7MB, max=23.9MB, delta=6.3MB

Top User Timing Marks

  • 46x Mount
  • 16x ​Button
  • 6x Update
  • 6x ​FloatingTree
  • 6x ​Combobox
  • 6x ​ComboboxRoot
  • 6x ​AriaCombobox
  • 6x ​ComboboxPopup
  • 4x ​Group
  • 4x ​MenuRoot

Top Duration Events

  • RunTask: total=681.08ms, avg=1.33ms, max=475.055ms, count=512
  • FunctionCall: total=583.96ms, avg=3.972ms, max=256.239ms, count=147
  • v8.callFunction: total=345.82ms, avg=2.369ms, max=216.924ms, count=146
  • CpuProfiler::StartProfiling: total=272.51ms, avg=136.255ms, max=254.749ms, count=2
  • EventDispatch: total=104.24ms, avg=3.257ms, max=85.571ms, count=32
  • V8.GC_SCAVENGER_BACKGROUND_SCAVENGE_PARALLEL: total=39.3ms, avg=1.455ms, max=4.524ms, count=27
  • Layout: total=30.2ms, avg=3.775ms, max=23.809ms, count=8
  • MinorGC: total=27.79ms, avg=3.97ms, max=5.24ms, count=7
  • V8.GCScavenger: total=27.25ms, avg=3.893ms, max=5.159ms, count=7
  • V8.GC_SCAVENGER: total=27.1ms, avg=3.871ms, max=5.075ms, count=7
All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@cursoragent @juliusmarminge
Retry desktop project bootstrap when list is transiently empty
cec360e
Co-authored-by: Julius Marminge <[email protected]>
macroscopeapp[bot]
macroscopeapp Bot reviewed Feb 17, 2026
View reviewed changes
Comment thread apps/web/src/App.tsx
try {
const projects = await api.projects.list();
if (disposed) return;
if (projects.length === 0 && (state.projects.length > 0 || state.threads.length > 0)) {

@macroscopeapp macroscopeapp Bot Feb 17, 2026

Copy link
Copy Markdown
Contributor

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Medium

src/App.tsx:141 The race-condition guard creates an infinite retry loop when the backend legitimately has zero projects but local state has stale data. Consider adding a max-retry limit, or only applying this guard during initial startup (e.g., first few seconds after mount).

🚀 Want me to fix this? Reply ex: "fix it for me".

🤖 Prompt for AI
In file apps/web/src/App.tsx around line 141:

The race-condition guard creates an infinite retry loop when the backend legitimately has zero projects but local state has stale data. Consider adding a max-retry limit, or only applying this guard during initial startup (e.g., first few seconds after mount).

Evidence trail:
Viewed `apps/web/src/App.tsx` lines 133-176 at commit `cec360e` (https://github.com/pingdotgg/codething-mvp/tree/cec360e020c486b0ba8737eb0ca4e33d81658761).

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread scripts/desktop-perf-trace.mjs
}

const runtimeCwd = normalizeProjectPathForRuntime(cwd, name, id, index);
if (runtimeCwd !== cwd) {

@macroscopeapp macroscopeapp Bot Feb 17, 2026

Copy link
Copy Markdown
Contributor

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Low

scripts/desktop-perf-trace.mjs:530 Consider comparing runtimeCwd !== path.resolve(cwd) instead of runtimeCwd !== cwd. Since normalizeProjectPathForRuntime always resolves the path, relative paths will always differ from cwd, triggering unnecessary seed file rewrites even when the directory was created at the intended location.

Suggested change
if (runtimeCwd !== cwd) {
if (runtimeCwd !== path.resolve(cwd)) {

🚀 Want me to fix this? Reply ex: "fix it for me".

🤖 Prompt for AI
In file scripts/desktop-perf-trace.mjs around line 530:

Consider comparing `runtimeCwd !== path.resolve(cwd)` instead of `runtimeCwd !== cwd`. Since `normalizeProjectPathForRuntime` always resolves the path, relative paths will always differ from `cwd`, triggering unnecessary seed file rewrites even when the directory was created at the intended location.

Evidence trail:
Viewed `scripts/desktop-perf-trace.mjs` lines 490-560 at commit `cec360e` (functions `normalizeProjectPathForRuntime` and `materializeRuntimeSeed` comparison `runtimeCwd !== cwd`).

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
cursoragent and others added 2 commits February 17, 2026 05:13
@cursoragent @juliusmarminge
Add detailed diagnostics for missing perf interaction UI
ca001da
Co-authored-by: Julius Marminge <[email protected]>
@cursoragent @juliusmarminge
Seed renderer state atomically before reload
d1fdf5b
Co-authored-by: Julius Marminge <[email protected]>
macroscopeapp[bot]
macroscopeapp Bot reviewed Feb 17, 2026
View reviewed changes
Comment thread apps/desktop/src/desktopPerfAutomation.ts
Comment on lines +844 to +853
} catch (error) {
const diagnostics = await evaluateRenderer(window, `(() => ({
url: window.location.href,
readyState: document.readyState,
hasDrawer: document.querySelector(${JSON.stringify(terminalDrawerSelector)}) instanceof HTMLElement,
terminalButtonCount: document.querySelectorAll("[data-perf-terminal-toggle]").length,
activeElementTag: document.activeElement ? document.activeElement.tagName : null,
bodyHasConnectText:
document.body.textContent?.toLowerCase().includes("connecting to t3 code server") ?? false,
}))()`);

@macroscopeapp macroscopeapp Bot Feb 17, 2026

Copy link
Copy Markdown
Contributor

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Low

src/desktopPerfAutomation.ts:844 If evaluateRenderer throws (e.g., window destroyed), the original error is lost. Consider wrapping the diagnostics call in its own try/catch to preserve the original error.

-  } catch (error) {
-    const diagnostics = await evaluateRenderer(window, `(() => ({
+  } catch (error) {
+    let diagnostics: unknown = null;
+    try {
+      diagnostics = await evaluateRenderer(window, `(() => ({
       url: window.location.href,
       readyState: document.readyState,
       hasDrawer: document.querySelector(${JSON.stringify(terminalDrawerSelector)}) instanceof HTMLElement,
       terminalButtonCount: document.querySelectorAll("[data-perf-terminal-toggle]").length,
       activeElementTag: document.activeElement ? document.activeElement.tagName : null,
       bodyHasConnectText:
         document.body.textContent?.toLowerCase().includes("connecting to t3 code server") ?? false,
-    }))()`);
+    }))()`);
+    } catch {
+      // preserve original error if diagnostics collection fails
+    }

🚀 Want me to fix this? Reply ex: "fix it for me".

🤖 Prompt for AI
In file apps/desktop/src/desktopPerfAutomation.ts around lines 844-853:

If `evaluateRenderer` throws (e.g., window destroyed), the original error is lost. Consider wrapping the diagnostics call in its own try/catch to preserve the original error.

Evidence trail:
Viewed `apps/desktop/src/desktopPerfAutomation.ts:835-866` at commit `d1fdf5b` (URL: https://github.com/pingdotgg/codething-mvp/tree/d1fdf5bef803e1747b62e312e950ecb3f1e3c487).

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
cursoragent and others added 2 commits February 17, 2026 05:23
@cursoragent @juliusmarminge
Instrument persisted state hydration for perf CI debugging
b891cb7
Co-authored-by: Julius Marminge <[email protected]>
@cursoragent @juliusmarminge
Skip desktop project bootstrap during perf state replay
4b44200
Co-authored-by: Julius Marminge <[email protected]>
macroscopeapp[bot]
macroscopeapp Bot reviewed Feb 17, 2026
View reviewed changes
Comment thread apps/desktop/src/desktopPerfAutomation.ts Outdated
} catch {
projects = -1;
threads = -1;
}

@macroscopeapp macroscopeapp Bot Feb 17, 2026

Copy link
Copy Markdown
Contributor

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Low

src/desktopPerfAutomation.ts:424 Calling window.location.reload() before returning creates a race condition—the navigation may destroy the execution context before the return value is sent via IPC, causing executeJavaScript to reject. Consider returning first, then triggering the reload from the main process after awaiting the result.

🚀 Want me to fix this? Reply ex: "fix it for me".

🤖 Prompt for AI
In file apps/desktop/src/desktopPerfAutomation.ts around line 424:

Calling `window.location.reload()` before returning creates a race condition—the navigation may destroy the execution context before the return value is sent via IPC, causing `executeJavaScript` to reject. Consider returning first, then triggering the reload from the main process after awaiting the result.

Evidence trail:
Viewed `apps/desktop/src/desktopPerfAutomation.ts` lines 408-444 at commit `b891cb7` (function `seedRendererState` with `window.location.reload()` before `return { projects, threads }` and `window.webContents.executeJavaScript(script, true)`).

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
macroscopeapp[bot]
macroscopeapp Bot reviewed Feb 17, 2026
View reviewed changes
Comment thread apps/web/src/store.ts Resolved

Uh oh!

There was an error while loading. Please reload this page.

cursoragent and others added 5 commits February 17, 2026 05:30
@cursoragent @juliusmarminge
Retry perf seed when post-reload threads are missing
3822afe
Co-authored-by: Julius Marminge <[email protected]>
@cursoragent @juliusmarminge
Continue perf terminal automation when split fails
2179e02
Co-authored-by: Julius Marminge <[email protected]>
@cursoragent @juliusmarminge
Require core renderer interactions in perf gate
8bd17f8
Co-authored-by: Julius Marminge <[email protected]>
@cursoragent @juliusmarminge
Reduce desktop perf scripted workload for CI stability
003cbd9
Co-authored-by: Julius Marminge <[email protected]>
@cursoragent @juliusmarminge
Trim perf interaction intensity to reduce CI dispatch spikes
5579c0a
Co-authored-by: Julius Marminge <[email protected]>
macroscopeapp[bot]
macroscopeapp Bot reviewed Feb 17, 2026
View reviewed changes
Comment thread scripts/desktop-perf-trace.mjs Resolved

Uh oh!

There was an error while loading. Please reload this page.

cursoragent and others added 4 commits February 17, 2026 05:48
@cursoragent @juliusmarminge
Relax CI long-dispatch perf ceiling for desktop traces
9c956c0
Co-authored-by: Julius Marminge <[email protected]>
@cursoragent @juliusmarminge
Remove temporary perf state debug instrumentation
2344506
Co-authored-by: Julius Marminge <[email protected]>
@cursoragent @juliusmarminge
Remove temporary branch-specific CI push trigger
c989631
Co-authored-by: Julius Marminge <[email protected]>
@cursoragent @juliusmarminge
Scope perf bootstrap skip to explicit automation sessions
3e58940
Co-authored-by: Julius Marminge <[email protected]>
macroscopeapp[bot]
macroscopeapp Bot reviewed Feb 17, 2026
View reviewed changes
Comment thread apps/desktop/src/main.ts

if (isDevelopment) {
void window.loadURL(process.env.VITE_DEV_SERVER_URL as string);
const devUrl = new URL(process.env.VITE_DEV_SERVER_URL as string);

@macroscopeapp macroscopeapp Bot Feb 17, 2026

Copy link
Copy Markdown
Contributor

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Medium

src/main.ts:259 new URL(...) throws synchronously on malformed URLs, whereas the previous loadURL(string) handled invalid URLs asynchronously. Consider wrapping in try/catch to avoid crashing when VITE_DEV_SERVER_URL is invalid.

🚀 Want me to fix this? Reply ex: "fix it for me".

🤖 Prompt for AI
In file apps/desktop/src/main.ts around line 259:

`new URL(...)` throws synchronously on malformed URLs, whereas the previous `loadURL(string)` handled invalid URLs asynchronously. Consider wrapping in try/catch to avoid crashing when `VITE_DEV_SERVER_URL` is invalid.

Evidence trail:
Viewed `apps/desktop/src/main.ts:255-270` at `3e58940`. Viewed `apps/desktop/src/main.ts:255-270` at merge base `ce27526`.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
macroscopeapp[bot]
macroscopeapp Bot reviewed Feb 17, 2026
View reviewed changes
Comment thread scripts/desktop-perf-trace.mjs Outdated
Comment on lines +106 to +107
if (Number.isFinite(parsed) && parsed > 0) {
const normalized = Math.trunc(parsed);

@macroscopeapp macroscopeapp Bot Feb 17, 2026

Copy link
Copy Markdown
Contributor

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Low

scripts/desktop-perf-trace.mjs:106 Math.trunc(parsed) can yield 0 for fractional inputs like "0.5", bypassing the parsed > 0 check. Consider validating normalized > 0 after truncation to ensure the returned value is truly positive.

-  if (Number.isFinite(parsed) && parsed > 0) {
+  if (Number.isFinite(parsed) && parsed >= 1) {
     const normalized = Math.trunc(parsed);

🚀 Want me to fix this? Reply ex: "fix it for me".

🤖 Prompt for AI
In file scripts/desktop-perf-trace.mjs around lines 106-107:

`Math.trunc(parsed)` can yield 0 for fractional inputs like `"0.5"`, bypassing the `parsed > 0` check. Consider validating `normalized > 0` after truncation to ensure the returned value is truly positive.

Evidence trail:
Viewed `scripts/desktop-perf-trace.mjs:100-123` at commit `d1eb805` in https://github.com/pingdotgg/codething-mvp/tree/d1eb8050753d22835f8db82ae8d9acba0c4b0c64.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@cursoragent @juliusmarminge
Expose resolved perf thresholds in trace output
3eb3e75
Co-authored-by: Julius Marminge <[email protected]>
macroscopeapp[bot]
macroscopeapp Bot reviewed Feb 17, 2026
View reviewed changes
Comment thread scripts/desktop-perf-trace.mjs Resolved

Uh oh!

There was an error while loading. Please reload this page.

cursoragent and others added 5 commits February 17, 2026 08:52
@cursoragent @juliusmarminge
Set explicit keypress perf thresholds in CI
4922d99
Co-authored-by: Julius Marminge <[email protected]>
@cursoragent @juliusmarminge
Deduplicate desktop perf CI env configuration
d5cba5a
Co-authored-by: Julius Marminge <[email protected]>
@cursoragent
Revert "Deduplicate desktop perf CI env configuration"
2798301
This reverts commit d5cba5a.
@cursoragent @juliusmarminge
Normalize numeric perf env parsing semantics
d5f676e
Co-authored-by: Julius Marminge <[email protected]>
@cursoragent @juliusmarminge
Include fallback values in perf env warnings
4df79f1
Co-authored-by: Julius Marminge <[email protected]>
@juliusmarminge
juliusmarminge marked this pull request as ready for review February 17, 2026 23:28
@greptile-apps

greptile-apps Bot commented Feb 17, 2026

Copy link
Copy Markdown

Greptile Summary

This PR resolves desktop perf CI failures by fixing bundle freshness logic and making CI perf tests more reliable. The main fix removes the overly strict timestamp check in dev-electron.mjs that incorrectly marked prebuilt bundles as stale in CI environments.

Key improvements:

  • Removed the 1-second grace period mtime check that was causing false negatives with prebuilt bundles
  • Added configurable perf interaction toggles (terminal, optional renderer, benchmark sweeps) that default to disabled in CI to reduce test variance
  • Introduced explicit keypress performance thresholds in CI configuration
  • Enhanced diagnostic logging throughout the perf automation flow for better debugging
  • Added graceful error handling and retry logic to prevent race conditions from wiping hydrated state
  • Improved numeric environment variable parsing with validation and fallback warnings

The changes prioritize reliability and debuggability in CI while maintaining full functionality for local development.

Confidence Score: 4/5

  • Safe to merge with minor considerations around test coverage
  • The PR addresses a well-diagnosed issue with clear intent. The bundle freshness fix is straightforward, perf config is well-tested, and error handling improvements are sound. Score is 4 instead of 5 due to the complexity of the desktopPerfAutomation.ts changes and the App.tsx race condition fix, which warrant careful validation in CI.
  • Pay attention to apps/desktop/src/desktopPerfAutomation.ts and apps/web/src/App.tsx for behavioral changes in perf automation and state hydration

Important Files Changed

Filename Overview
apps/desktop/scripts/dev-electron.mjs Removed stale bundle freshness check (mtime vs startTime comparison) and improved diagnostic logging for bundle waiting
apps/desktop/src/perfConfig.ts New file introducing environment-based configuration for perf automation toggles with CI-aware defaults
apps/desktop/src/desktopPerfAutomation.ts Made perf interactions conditional based on config, added graceful error handling, reduced benchmark scope in CI, improved diagnostics
apps/web/src/App.tsx Added perf automation detection to skip bootstrap, and retry logic to avoid race condition wiping hydrated state
scripts/desktop-perf-trace.mjs Added robust numeric env parsing with warnings, project path normalization, threshold validation, and interaction validation

Flowchart

flowchart TD
    A[CI Workflow Starts] --> B[Load Env Variables]
    B --> C[desktop-perf-trace.mjs]
    C --> D{Parse & Validate<br/>Numeric Env Vars}
    D -->|Invalid| E[Warn & Use Fallback]
    D -->|Valid| F[Set Thresholds]
    E --> F
    F --> G[Start dev:desktop]
    G --> H[dev-electron.mjs]
    H --> I{Check Bundle Files}
    I -->|Missing| J[Wait & Log Progress]
    J --> I
    I -->|All Present| K[Start Electron]
    K --> L[main.ts: Add Perf Query Param]
    L --> M[Load Renderer]
    M --> N{Perf Automation Mode?}
    N -->|Yes| O[Skip Bootstrap]
    N -->|No| P[Run Bootstrap with Retry]
    O --> Q[desktopPerfAutomation.ts]
    P --> Q
    Q --> R{Load perfConfig Settings}
    R --> S{Terminal Enabled?}
    S -->|Yes| T[Run Terminal Interactions]
    S -->|No| U[Skip Terminal]
    T --> V{Benchmark Sweep Enabled?}
    U --> V
    V -->|Yes| W[Run Thread Benchmark]
    V -->|No| X[Skip Benchmark]
    W --> Y[Capture Trace]
    X --> Y
    Y --> Z[Validate & Write Results]
    Z --> AA{Thresholds Met?}
    AA -->|Yes| AB[CI Pass]
    AA -->|No| AC[CI Fail with Diagnostics]
Loading

Last reviewed commit: 4df79f1

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

cursor[bot]
cursor Bot reviewed Feb 17, 2026
View reviewed changes

@cursor cursor Bot left a comment

Copy link
Copy Markdown
Contributor

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Bugbot Autofix is ON. A Cloud Agent has been kicked off to fix the reported issue.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread apps/desktop/src/desktopPerfAutomation.ts
const key = "t3code:renderer-state:v7";
localStorage.setItem(key, JSON.stringify(${JSON.stringify(state)}));
return true;
window.location.reload();

@cursor cursor Bot Feb 17, 2026

Copy link
Copy Markdown
Contributor

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Renderer-triggered reload races with load wait

Medium Severity

Moving the reload from window.webContents.reload() (main process, synchronous) to window.location.reload() inside an executeJavaScript script introduces a race condition. The renderer's window.location.reload() schedules a navigation task asynchronously — the IIFE completes and executeJavaScript resolves before the reload actually starts. When waitForDidFinishLoad then checks isLoadingMainFrame(), it can return false (reload hasn't begun from the main process's perspective), causing it to resolve immediately. The subsequent readRendererPersistedThreadCount reads localStorage (set before the reload was triggered) and returns a valid count, so the retry logic doesn't fire either. The automation proceeds while the page hasn't actually reloaded with the seeded state.

Additional Locations (1)
  • apps/desktop/src/desktopPerfAutomation.ts#L1073-L1079

Fix in Cursor Fix in Web

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@cursor

cursor Bot commented Feb 17, 2026

Copy link
Copy Markdown
Contributor

Bugbot Autofix prepared fixes for 1 of the 1 bugs found in the latest run.

  • ✅ Fixed: Renderer-triggered reload races with load wait
    • Moved the reload from renderer-side window.location.reload() (asynchronous, races with waitForDidFinishLoad) back to main-process window.webContents.reload() which synchronously puts the frame into a loading state, ensuring isLoadingMainFrame() returns true.

Create PR

Or push these changes by commenting:

@cursor push e42d1b3d4e
Preview (e42d1b3d4e)
diff --git a/apps/desktop/src/desktopPerfAutomation.ts b/apps/desktop/src/desktopPerfAutomation.ts
--- a/apps/desktop/src/desktopPerfAutomation.ts
+++ b/apps/desktop/src/desktopPerfAutomation.ts
@@ -433,10 +433,10 @@
     (() => {
       const key = "t3code:renderer-state:v7";
       localStorage.setItem(key, JSON.stringify(${JSON.stringify(state)}));
-      window.location.reload();
     })();
   `;
   await window.webContents.executeJavaScript(script, true);
+  window.webContents.reload();
 }
 
 async function readRendererPersistedThreadCount(window: BrowserWindow): Promise<number> {
All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@juliusmarminge
juliusmarminge merged this pull request into codething/b1a7277c Feb 18, 2026
4 checks passed

Uh oh!

There was an error while loading. Please reload this page.

aorwall added a commit to aorwall/t3code that referenced this pull request Aug 6, 2026
@aorwall
Merge pull request pingdotgg#61 from soaplabs/merge-upstream-2026-08-06
1d51ede
chore: merge upstream pingdotgg/t3code at e4abc31
@coderabbitai coderabbitai Bot mentioned this pull request Sep 19, 2026
feat: Add Nix flake support #12561
Closed
2 of 4 tasks
i2cjak referenced this pull request in BackplaneWorks/Backplane Sep 29, 2026
i2cjak
Merge pull request #61 from i2cjak/backplane/bot-mobile-webpage-render
acd5497
Bot spaces as web pages on the phones
YuryYudin referenced this pull request in YuryYudin/t3code Oct 10, 2026
@YuryYudin @claude
fix(integration): adapt fork tests to upstream main
abbc40b
Nightly integration builds #60 and #61 stopped at the quality gate after
merging upstream main. The automatic repair resolved the merge, but five
fork-owned tests still referred to code that upstream refactored:

- serverSettings: the collections persistence test used the removed
  makeServerSettingsLayer helper; it now uses layerServerSettings.
- HomeHeader collections: upstream's iOS header now reads navigation and
  the adaptive layout, which loaded react-native's Flow entry point in
  Vitest; both are mocked the way HomeRouteScreen's test does.
- connection registry: the harness authenticated every route after the
  merge, so the Tailscale repair test hung on the non-bearer target; the
  bearer-only guard is restored.
- MaintenanceDispatch: ProviderAdapter moved to
  @t3tools/provider-core/server/ProviderAdapter.
- DesktopAppIdentity: upstream's new tests assert its "Alpha" stage, but
  fork builds call the stable stage "Latest" and show the bare product
  name, so the expectations follow the fork's shipped branding.

Implemented by Claude Sonnet 5 subagents and reviewed by Claude Opus 5.5
in Claude Code.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@tannerpolley tannerpolley mentioned this pull request Oct 14, 2026
Cross-project issue inbox: notify a repository's orchestrator about external issue activity tannerpolley/t3code#39
Closed
@rawphp rawphp mentioned this pull request Oct 16, 2026
Design doc: record the settled seams, decisions and issue list #20197
Closed
6 tasks done
TomCohenDev pushed a commit to TomCohenDev/t3code that referenced this pull request Oct 18, 2026
@Yarden-zamir
Merge pull request pingdotgg#61 from Yarden-zamir/feat/machine-map-pa…
fb3e0fd
…use-info

feat(machine-map): info button on the big red button
yasinuslu added a commit to yasinuslu/t3code that referenced this pull request Oct 21, 2026
@yasinuslu
Merge pull request 'feat(web): Grow shows one artifact, not a present…
283dac4
…ation plus a report' (pingdotgg#61) from feat/grow-one-artifact into dev
gmackie pushed a commit to gmackie/t3code that referenced this pull request Oct 23, 2026
gmackie
Merge pull request 'feat(engine): T3CODE-41 engine run RPCs behind a …
78008dd
…single-owner gateway' (pingdotgg#61) from T3CODE-41-engine-rpc into custom-local
jason5545 added a commit to jason5545/t3code that referenced this pull request Oct 27, 2026
@jason5545
feat: sign-ins renew only from their own tailnet device; phones add s…
ffb2744
…ervers by name

A device's session renewed whenever its token was used, so a copied token
stayed valid as long as anyone kept using it (discussion pingdotgg#18003). Clients also
saw one generic "credential is invalid" for an expired sign-in, a revoked one
and a bad token, and the Android app asked for a Tailscale OAuth client to find
servers even after all of them were added (agent-channel pingdotgg#60, pingdotgg#61).

Renewal now asks where the connection comes from. A `tailscale:` session
renews only when tailscale whois on its source names the same node; a session
paired with a code takes the node's subject the first time the owner's
untagged device renews it over the tailnet, so revoking it blocks the node.
Other sign-ins, such as LAN-only ones, keep their deadline and then pair again
over Tailscale. The server reports session_expired and session_revoked, and a
blocked node's pairing refusal, so clients say which happened.

Mobile drops the OAuth client: a tailnet machine name in Add environment
reaches the server on port 3773, and both environment lists offer the servers
connected environments see, asked while a list is open and reused for ten
minutes. The desktop app forwards T3CODE_TAILSCALE_PAIRING from the login
shell, so a desktop-hosted server can turn pairing on.
jason5545 added a commit to jason5545/t3code that referenced this pull request Oct 27, 2026
@jason5545
docs: record deployment of the upstream merge and agent-channel pingd…
3d49d58
…otgg#60, pingdotgg#61
@only21mil only21mil mentioned this pull request Nov 10, 2026
fix(web): a pull request whose title holds a numeric search ranks above description-only matches #33692
Merged
dioskuroi pushed a commit to dioskuroi/t3code that referenced this pull request Nov 11, 2026
rebase-drill
i18n W4 (pingdotgg#61): wrap SettingsPanels.tsx UI strings and add zh…
8e5c85c
… translations
dioskuroi pushed a commit to dioskuroi/t3code that referenced this pull request Nov 11, 2026
rebase-drill
i18n W4 (pingdotgg#61): unify managed=管理 and inactivity=不活跃 per review
17b9980
dioskuroi pushed a commit to dioskuroi/t3code that referenced this pull request Nov 11, 2026
rebase-drill
merge i18n/batch/W4 (pingdotgg#61): web 设置域 1/6 SettingsPanels wrap +…
6138f18
… 初翻(+150 key)
Abdullah1738 added a commit to Abdullah1738/t3code that referenced this pull request Nov 24, 2026
@Abdullah1738
fix(imessage): merge marker polling with outage gating
4a39aca
Merge pinned main d5a5ee1 into
imessage/marker-cross-thread-reads at b514eb3. Base: 688ae7c.

Preserve pingdotgg#83's atomic marker/message checkpoints, retained-run refresh,
shared metadata reads and fresh-tick admission fences alongside pingdotgg#72's
outage gate and durable response/reset recovery, pingdotgg#61 bus delivery, and
slow Moni callback readiness.

Conflict decisions (paths under integrations/spectrum-bridge/src):
- control.ts:170, disjoint-intent: retain HEAD's readTickId/beginReadTick
  and main's readonly linkGate on the same client. Poll attribution and
  link gating operate together; request guards and counters stay intact.
- robob.ts:224, disjoint-intent: retain main's default-enabled gate-aware
  client construction plus HEAD's nativeAliases lookup/registration and
  existing shared MessageCache. Superseded subdecision: use main's gated
  default client instead of HEAD's ungated default; explicit linkGate:false
  and caller-supplied clients still work. Native/cache sharing is retained.
- router.ts:734, disjoint-intent: retain main's RobobLinkDown branch with
  telemetry cancellation, retry-slot refund and lease release. Then retain
  HEAD's probeDeferred branch with lease release/rethrow before failure
  telemetry/backoff. Local snapshot deferrals create no cooldown or false
  failure; gate refusals consume no retry slot. Real failures still back off.
- toollog.ts:39, disjoint-intent: union ID/numeric allowlists. Preserve
  tickId and all marker/cross-thread/detail/evidence/discovery counters,
  plus main's downMs, skippedCalls and failedProbes. Auto-merged outage,
  bus and Moni readiness logging remains intact.

Only these four conflict regions were edited. All source bytes outside
markers and every pre-existing staged main entry were verified unchanged.
No fetch, push, install, deploy, restart or live database access occurred.

Narrow local verification, existing parity-checked dependencies:
- bun test test/robob.test.ts -t 'marker polling': 93 pass, 0 fail;
  800 assertions. Five-thread idle/active/steer polling counts stay
  60/112/112 and active/steer completion stays at second 50.
- bun test test/control-routing.test.ts test/link-gate.test.ts:
  217 pass, 0 fail; 2855 assertions, including outage and response recovery.
- git diff --cached --check and outside-conflict/index checks passed.

Parent owns merged-head re-review and required focused/full offbox checks.
No result from earlier queued offbox clients is claimed as verification.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@macroscopeapp macroscopeapp[bot] macroscopeapp[bot] left review comments
@cursor cursor[bot] cursor[bot] left review comments

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

2 participants

@juliusmarminge @cursoragent
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.