Skip to content

Commit dedffdb

Browse files
committed
docs(hub): clarify DF8206 recovery steps
Address review feedback on the wording only, no behaviour change: remove() is a method on ctx.terminals, not on the session, so both restart() JSDoc lines said it wrongly; DF8206's fix text now prefixes the calls with ctx.terminals. the way DF8202/DF8204 do and spells out the two recovery steps instead of contracting them; the docs page's Fix section is reworded as a sentence. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
1 parent e56dd62 commit dedffdb

3 files changed

Lines changed: 4 additions & 4 deletions

File tree

‎docs/errors/DF8206.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ outline: deep
1414

1515
## Fix
1616

17-
`ctx.terminals.remove(session)` the spent session, then spawn a fresh one via `startChildProcess()` / `startPtySession()` with a new id.
17+
Drop the spent session with `ctx.terminals.remove(session)`, then spawn a replacement via `ctx.terminals.startChildProcess()` or `ctx.terminals.startPtySession()` with a fresh id.
1818

1919
## Source
2020

‎packages/hub/src/node/diagnostics.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ export const diagnostics = defineDiagnostics({
6969
},
7070
DF8206: {
7171
why: (p: { id: string }) => `Terminal session "${p.id}" cannot be restarted — its output stream is already closed`,
72-
fix: 'The session already exited (or was terminated) and its stream is spent. `ctx.terminals.remove(session)` then re-`startChildProcess()`/`startPtySession()` with a fresh id instead.',
72+
fix: 'The session already exited (or was terminated) and its stream is spent. Drop it with `ctx.terminals.remove(session)`, then spawn a replacement via `ctx.terminals.startChildProcess()` or `ctx.terminals.startPtySession()` with a fresh id.',
7373
},
7474
DF8400: {
7575
why: (p: { id: string }) => `Command "${p.id}" is already registered`,

‎packages/hub/src/types/terminals.ts‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ export interface DevframeChildProcessTerminalSession extends DevframeTerminalSes
114114
*/
115115
getResult: () => DevframeChildProcessResult
116116
terminate: () => Promise<void>
117-
/** Throws `DF8206` once the session's output stream has closed (after a natural exit or `terminate()`) — `remove()` it and start a fresh session instead. */
117+
/** Throws `DF8206` once the session's output stream has closed (after a natural exit or `terminate()`) — drop it with `ctx.terminals.remove(session)` and start a fresh session instead. */
118118
restart: () => Promise<void>
119119
}
120120

@@ -140,6 +140,6 @@ export interface DevframePtyTerminalSession extends DevframeTerminalSession {
140140
/** Current foreground process name, when the backend can resolve it. */
141141
getProcessName: () => string | undefined
142142
terminate: () => Promise<void>
143-
/** Throws `DF8206` once the session's output stream has closed (after a natural exit or `terminate()`) — `remove()` it and start a fresh session instead. */
143+
/** Throws `DF8206` once the session's output stream has closed (after a natural exit or `terminate()`) — drop it with `ctx.terminals.remove(session)` and start a fresh session instead. */
144144
restart: () => Promise<void>
145145
}

0 commit comments

Comments
 (0)