fix(ssh): show actionable MaxSessions panel when channels are exhausted#2080
Conversation
jschwxrz
commented
May 18, 2026
- edit modal copy
- also show channel unavailable issues on project mount
Greptile SummaryThis PR surfaces the
Confidence Score: 3/5Safe to merge after fixing the sshd_config comment syntax in the instructions panel. The instructions card in SshChannelUnavailablePanel shows a pre block containing MaxSessions 100 // 500 for heavy parallel use. sshd_config only recognises # as a comment character; // is treated as a literal value, making the line unparseable. A user who copies the snippet verbatim will get a config-parse error when reloading sshd. The other two changes are correct and well-scoped. ssh-channel-unavailable-panel.tsx — the pre config snippet uses invalid comment syntax for sshd_config.
|
| Filename | Overview |
|---|---|
| src/renderer/features/projects/components/ssh-channel-unavailable-panel.tsx | Improved copy and added an actionable instructions card; pre block uses // comment syntax instead of #, which is invalid in sshd_config and can break the user's SSH daemon if pasted verbatim. |
| src/renderer/features/projects/components/project-ssh-health-gate.tsx | Widens the check from mounted-only to any ProjectStore state by reading data directly instead of via asMounted; allows the degraded panel to appear during project boot/mount phase. Handles null data safely via optional chaining. |
| src/main/core/projects/create-project-provider.ts | Calls reportChannelError in the SSH provider creation catch block so that channel-open failures during mount set the degraded health state and surface the new panel. |
Sequence Diagram
sequenceDiagram
participant App as Renderer
participant Gate as ProjectSshHealthGate
participant Store as ProjectStore
participant Main as createSshProvider (main)
participant Manager as SshConnectionManager
App->>Gate: mount(projectId)
Gate->>Store: getProjectStore(projectId)?.data
Note over Store: data available in ALL states
Store-->>Gate: "SshProject { connectionId }"
Gate->>App: healthFor(connectionId) null ok
App->>Main: createSshProvider()
Main->>Manager: connect(connectionId)
Manager-->>Main: throws channel-open error
Main->>Manager: reportChannelError(connectionId, error)
Manager-->>App: health state degraded
App->>Gate: re-render MobX reaction
Gate-->>App: SshChannelUnavailablePanel
Prompt To Fix All With AI
Fix the following 1 code review issue. Work through them one at a time, proposing concise fixes.
---
### Issue 1 of 1
src/renderer/features/projects/components/ssh-channel-unavailable-panel.tsx:19-22
The `<pre>` block will render as `MaxSessions 100 // 500 for heavy parallel use` on a single line. `sshd_config` does not recognize `//` as a comment delimiter — only `#` is valid. A user who copies the full `<pre>` content and pastes it verbatim will get a config-parse error when sshd tries to reload, which is the exact failure path this panel is trying to help them recover from.
```suggestion
<pre className="text-[11px] font-mono text-foreground bg-background rounded px-2 py-1 overflow-x-auto">
{'MaxSessions 100 # 500 for heavy parallel use'}
</pre>
```
Reviews (1): Last reviewed commit: "fix(projects): render SSH health panel b..." | Re-trigger Greptile