A session-transcript-activity message that arrives before app.js has run throws in the renderer:
[renderer:3] :136 Uncaught Error: activePtyIds is not defined
Seen once at startup on an isolated instance whose HOME had live sessions writing transcripts during load (2026-10-02, at #414's head).
Cause:
public/local-transcript-adapter.js:135 registers window.api.onSessionTranscriptActivity(onLocalTranscriptActivity) at top level.
- That script loads before
app.js (index.html:156 vs :163).
- The handler reads
activePtyIds (local-transcript-adapter.js:88, sub-agent path :102), which is declared at public/app.js:127.
main.js sends the message from the projects watcher, which starts right after createWindow() with no renderer-readiness gate.
:136 is the ipcRenderer.on('session-transcript-activity', …) line of preload.js plus Electron's sandbox wrapper offset.
Not a regression:
Supposed impact (not measured): one dropped busy signal for that session. The next send, at most 1 s later, works once app.js has loaded.
Fix direction: register the listener from app.js once its state exists, or guard the handler until the renderer is ready.
A
session-transcript-activitymessage that arrives beforeapp.jshas run throws in the renderer:Seen once at startup on an isolated instance whose HOME had live sessions writing transcripts during load (2026-10-02, at #414's head).
Cause:
public/local-transcript-adapter.js:135registerswindow.api.onSessionTranscriptActivity(onLocalTranscriptActivity)at top level.app.js(index.html:156vs:163).activePtyIds(local-transcript-adapter.js:88, sub-agent path:102), which is declared atpublic/app.js:127.main.jssends the message from the projects watcher, which starts right aftercreateWindow()with no renderer-readiness gate.:136is theipcRenderer.on('session-transcript-activity', …)line ofpreload.jsplus Electron's sandbox wrapper offset.Not a regression:
app.jsby 3 s withprotocol.handle('file'), send the message every 200 ms, and reload: 14 errors.Supposed impact (not measured): one dropped busy signal for that session. The next send, at most 1 s later, works once
app.jshas loaded.Fix direction: register the listener from
app.jsonce its state exists, or guard the handler until the renderer is ready.