docs(session): clarify blank-state projection guarantees
This commit is contained in:
1 parent
fa2abdd6f1
commit
f65799a236
9 files changed
+21
-10
No files matched your search
@@ -19,7 +19,7 @@ export interface SessionListEntry {
|
||||
title?: string
|
||||
updatedAt: number
|
||||
running: boolean
|
||||
/** Empty-log bit mirrored from the summary; lists hide blank sessions (filtering stays with the consumer). */
|
||||
/** Summary blankness reconciled with `sessionListMetadata`; lists hide blank sessions (filtering stays with the consumer). */
|
||||
blank: boolean
|
||||
parentSessionId?: SessionId
|
||||
/** Coarse durable origin for navigation filtering; not a continuation capability. */
|
||||
|
||||
@@ -334,6 +334,7 @@ export class SessionManager {
|
||||
store = new ProjectionValueStore()
|
||||
const projections = store
|
||||
store.subscribeAny(() => {
|
||||
// Newer history or control metadata corrects a resident Session's stale list hint.
|
||||
if (projections.values().sessionListMetadata?.blank === false) {
|
||||
this.sessions.get(sessionId)?.handleBlank(false)
|
||||
}
|
||||
@@ -481,7 +482,7 @@ export class SessionManager {
|
||||
this.listPhase = 'ready'
|
||||
// Covers the empty-mutations pull (a plain baseline carries no edge).
|
||||
this.syncCompletedNotifications()
|
||||
// Push running/blank bits down to instantiated Sessions (the list is the authoritative summary source).
|
||||
// Sessions reconcile list blank hints with their current metadata projection.
|
||||
for (const s of this.summaries) {
|
||||
const session = this.sessions.get(s.sessionId)
|
||||
if (session === undefined) continue
|
||||
|
||||
@@ -50,10 +50,10 @@ export interface SessionSummary {
|
||||
/** Finished while not selected and not yet opened — the sidebar's green "done" reminder. Absent = false. */
|
||||
completed?: boolean
|
||||
/**
|
||||
* Empty-log bit (host summary derivation mirror). New Session reuses a blank
|
||||
* one targeting the same workspace. Filtering stays with the consumer: the
|
||||
* store carries every row, while the Workspace browser shows only the
|
||||
* selected blank entry.
|
||||
* Blankness from the Host summary reconciled with `sessionListMetadata`.
|
||||
* New Session reuses a blank one targeting the same workspace. Filtering
|
||||
* stays with the consumer: the store carries every row, while the Workspace
|
||||
* browser shows only the selected blank entry.
|
||||
*/
|
||||
blank: boolean
|
||||
updatedAt: number
|
||||
|
||||
Reference in new issue
Block a user