fix: review-bot findings on the provider-hosted shell
- Keep ConversationSession mounted for blank sessions (chrome-less) so the draft-persistence mirror stays bound in the hero; hero typing reaches the chat store again. - Restore the baselines-ready gate in AppFrame: empty boot snapshots no longer flash the New Workspace hero before either baseline lands. - Commit ordinary sends through the machine (send-committed event + Shell.commitSend): undo can no longer resurrect already-sent content on the default-sink path. - Give the production InputMachine a real wall clock so the typing-run merge window actually expires. - Coalesce concurrent connectWorkspace creates per workspace: the summary has no cwd until the host frame lands, so a second New Session inside that window minted a duplicate hidden blank session.
This commit is contained in:
@@ -167,6 +167,7 @@ export class InputMachine {
|
||||
case 'adjudicated': return this.onAdjudicated(ev.attempt, ev.outcome)
|
||||
case 'adjudication-failed': return this.onAdjudicationFailed(ev.attempt, ev.message)
|
||||
case 'submit-settled': return this.onSubmitSettled(ev)
|
||||
case 'send-committed': return this.onSendCommitted()
|
||||
case 'release': return this.onRelease()
|
||||
default: return unreachable(ev)
|
||||
}
|
||||
@@ -542,6 +543,19 @@ export class InputMachine {
|
||||
return [{ type: 'notice', level: 'error', text }]
|
||||
}
|
||||
|
||||
/** Ordinary send accepted: clear as a commit (no undo unit; sent content
|
||||
* must not be resurrectable — same discipline as submit-settled success). */
|
||||
private onSendCommitted(): InputEffect[] {
|
||||
this.claim = undefined
|
||||
this.occurrences = []
|
||||
this.adopt('')
|
||||
this.log = []
|
||||
this.redoStack = []
|
||||
this.typingRun = undefined
|
||||
this.paste = undefined
|
||||
return []
|
||||
}
|
||||
|
||||
private onRelease(): InputEffect[] {
|
||||
if (this.inflight !== undefined) {
|
||||
this.inflight.controller.abort()
|
||||
|
||||
Reference in New Issue
Block a user