galaxyproject / galaxyproject/loom
appendShellNote writes to a channel nothing listens to
- Dominant language
- TypeScript
- Stars
- 14
- Forks
- 12
- Avg merge
- 6d 5h
- Merged PRs (30d)
- 17
Description
Split out of #439, where I went looking for somewhere to put a startup failure message and found this.
`AgentManager.appendShellNote()` (`app/src/main/agent.ts`) sends `agent:shell`:
```ts
this.window.webContents.send("agent:shell", { kind: "info", text });
```
Nothing receives it. There's no `agent:shell` in `app/src/preload/preload.ts`, no listener in the renderer, and no mapping in `web/orbit-shim.ts` -- the only occurrences of that string in the repo are the send itself and the comment above it, which says "The renderer's onAgentShell handler already paints these." There is no such handler.
Two notes go through it today, both on the crash path:
- `[orbit] brain exited with code N; restarting (attempt 1/3)`
- `[orbit] brain has crashed too many times in 60s; auto-restart disabled`
So the three silent restarts are genuinely silent -- no breadcrumb anywhere a user or a bug reporter can see. That's part of why #429 read as "the app crashed" instead of "the brain can't authenticate".
The destination it was obviously written for still exists: the activity shell renders via `shell.append(text, kind)` in the renderer, driven by parsing `agent:event` rather than `agent:shell`. The `{ kind, text }` payload lines up with `shell.append`'s signature exactly, so this looks like a bridge that got dropped somewhere rather than a deliberate call.
Either direction works:
1. Wire it up -- preload bridge plus a renderer listener calling `shell.append(text, kind)`, putting the restart breadcrumbs in the Activity pane where they belong.
2. Delete `appendShellNote` and its two call sites, and log to the main-process console instead.
I lean towards 1, since a silent restart leaving no trace is exactly what made #429 hard to diagnose, but 2 is at least honest about the current state. Worth a look at whether anything else wants a low-priority main -> renderer note channel before picking.
Not blocking anything -- #439 deliberately routes its message through `agent:event` instead.
Contributor guide
No contributing guide indexed for this repository
Research direction
Start in app/src/main/agent.ts and trace appendShellNote's two crash-path call sites. Compare the missing bridge in app/src/preload/preload.ts and web/orbit-shim.ts with the renderer's shell.append(text, kind) path and existing agent:event handling. Done means the restart notes are either visible in the Activity pane or intentionally logged to the main-process console, with the unused channel and its references resolved.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- desktop
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100