Bug: session list shows no title for seeded (forked/resumed) sessions until opened #6496
Replies: 3 comments
|
Confirmed on master c291e79 (note: master is 0.1.5-rc.2 now, your repro is rc.1 - the path is identical). The fallback is real: the cold-session list summarizes seeded sessions with no projections (list.ts:274-279 - the isSeeded ternary matches your quote verbatim), so the client falls back to displayTitle = title ?? workspaceTitleOf(cwd basename) ?? id (service.ts:146-153, called from tree.ts:156-158). The root cause matches your analysis: the projection-cache identity compares createdAt/cwd/isSeeded/inheritedEventCount (session-projection-cache/src/index.ts:435-443), and for cold seeded rows the API deliberately skips the cache query (list.ts:275-276). One precision: it does not even attempt SessionLogOffset(0) - the skip is hard-coded, while the session's own cache row does hold isSeeded plus the real inheritedEventCount (identityOf :394-410). So the title data exists, but the list API withholds the projection hint for cold seeded rows. Your cachedSeededTitleHint-style fix direction is consistent with the existing cachedPredecessorTitle semantics; master has not changed since 2026-09-10. The disk-cache-row evidence I could not reproduce locally【未核实】. |
|
Adding two datapoints to the confirmed analysis (still reproducing on 1. The on-disk cache row is observable — closing the unverified note (【未核实】) in the reply above. For a cold fork whose sidebar row shows {"identity":{"formatVersion":3,"createdAt":<ts>,"cwd":"...","isSeeded":true,"inheritedEventCount":<inherited count>},
"rows":{"title":{"ver":1,"seq":<title seq>,"val":"<redacted title>"},
"sessionListMetadata":{"ver":1,"seq":<metadata seq>,"val":{"blank":false,"lastPromptAt":<ts>}}}}The 2. A second symptom of the same short-circuit: |
|
Thanks both — picking up the two threads. On the 【未核实】 disk-row evidence (for @PerryLink): the cache rows are directly observable on my deployment. Path: Adopted @Rice00's suggestion: the seeded hint now serves both One new datapoint neither reply had yet: sessions written before the lineage fields existed (V0-era forks) have cache rows whose Local patch shape (fork): |
Uh oh!
There was an error while loading. Please reload this page.
Symptom
In the Web sidebar session list, sessions created by fork/continue (i.e.
header.isSeeded === true) render as the workspace basename (e.g.deepseektest) instead of their durable title. Opening the session (attaching it) makes the correct title appear; after it goes cold again the row loses the title again.Environment
DSH 0.1.5-rc.1 (the same code is still on
masteras of 2026-09-13).Root cause
packages/api/session-controller/src/list.ts—ApiSessionList.projectionsFor:For a cold seeded session the lister can only pass
SessionLogOffset(0)as the inherited-event-count witness, while the stored projection-cache row was written with the lifecycle's realinheritedEventCount(e.g. 3877).lifecycleIdentityMatches(inpackages/session/session-projection-cache) compares that field, so the strict identity match can never succeed from this call site — theisSeededbranch forecloses it. The row therefore reportsprojections: undefined, and the client falls back to the workspace basename.Evidence that the data is intact
The projection-cache rows on disk (
<DSH_HOME>/storages/session_projcache/sessions/<id>.json) do contain the correct titles for these sessions, e.g.:{"identity":{"formatVersion":3,"createdAt":1789262305293,"cwd":"...","isSeeded":true,"inheritedEventCount":3877}, "rows":{"title":{"ver":1,"seq":3878,"val":"DSH最新版本兼容性技术分析 (2)"}}}So the log, the fold, and the cache are all fine — only the list hint is withheld.
Suggested fix
Serve a title-only hint for seeded cold sessions using the identity fields the lister does know (
id+formatVersion+createdAt+cwd+isSeeded), ignoringinheritedEventCount— e.g. acachedSeededTitleHint(meta)on the projection cache used in place of theundefinedbranch:We run this as a local patch and the sidebar then shows seeded titles without opening the sessions. The title row is written by this lifecycle's own live checkpoint, so serving it is a possibly-stale but genuine fact of this log — matching the semantics
cachedPredecessorTitlealready accepts for unseeded rows.All reactions