fix(core): distinguish never-named sessions from named-then-cleared - #2437
Draft
flora131 wants to merge 1 commit into
Draft
fix(core): distinguish never-named sessions from named-then-cleared#2437flora131 wants to merge 1 commit into
flora131 wants to merge 1 commit into
Conversation
Collaborator
Author
|
A tmux capture is not applicable to L17 (never-named versus named-then-cleared): this layer's behavior has no directly drivable interactive surface. Its evidence is the named regression tests in this PR plus the local gates — |
flora131
force-pushed
the
pi-0.84.2/session-naming
branch
from
August 16, 2026 03:16
8a732fb to
5e15ad7
Compare
Upstream 7bdb16c2 gave pi's storage a has_session_name / session_name
pair so a cleared title stops reading as "never named" (spec §5.6
gap 7). Atomic's JSONL already records the distinction durably — a
clear appends a session_info entry with name "", a never-named session
has none — but both readers collapsed it: getLatestSessionName reduced
everything to string | undefined with `|| undefined`, and the
SessionInfo list reducer did the same, so no read surface could tell
the two states apart.
Read-side only; no storage change, no migration, and the SQLite
session backend is not adopted:
- SessionNameState ({ hasName, name? }) mirrors pi's pair and is
exported from the package index alongside SessionInfo.
- getLatestSessionName returns the state; SessionManager.getSessionName
keeps its bare-string contract via .name, and the new
getSessionNameState() exposes the state (also picked into
ReadonlySessionManager, with the matching create-harness stub).
- The SessionInfo list reducer records hasName alongside name.
- The picker's named filter still filters on the current name; its
hasSessionName helper now documents that a cleared name filters as
unnamed.
Named regression cleared-session-name-differs-from-never-named runs
against hand-written existing-shape session files and asserts both
readers (list reducer and SessionManager.open) keep the states apart,
that the bare-string surface is unchanged, and that the live name/clear
path still writes the clear as name "". docs/session-format.md
documents the durable distinction and the new reader.
Assistant-model: Claude Opus 5
flora131
force-pushed
the
pi-0.84.2/session-naming
branch
from
August 16, 2026 05:03
5e15ad7 to
afcceac
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Upstream 7bdb16c2 gave pi's storage a has_session_name / session_name
pair so a cleared title stops reading as "never named" (spec §5.6
gap 7). Atomic's JSONL already records the distinction durably — a
clear appends a session_info entry with name "", a never-named session
has none — but both readers collapsed it: getLatestSessionName reduced
everything to string | undefined with
|| undefined, and theSessionInfo list reducer did the same, so no read surface could tell
the two states apart.
Read-side only; no storage change, no migration, and the SQLite
session backend is not adopted:
exported from the package index alongside SessionInfo.
keeps its bare-string contract via .name, and the new
getSessionNameState() exposes the state (also picked into
ReadonlySessionManager, with the matching create-harness stub).
hasSessionName helper now documents that a cleared name filters as
unnamed.
Named regression cleared-session-name-differs-from-never-named runs
against hand-written existing-shape session files and asserts both
readers (list reducer and SessionManager.open) keep the states apart,
that the bare-string surface is unchanged, and that the live name/clear
path still writes the clear as name "". docs/session-format.md
documents the durable distinction and the new reader.
Assistant-model: Claude Opus 5
Stack created with GitHub Stacks CLI • Give Feedback 💬
Need help on this PR? Tag
@codesmith-botwith what you need. Autofix is disabled.