Skip to content

fix(tui): gate /copy-session-id behind a live session - #140

Merged
jkyberneees merged 1 commit into
mainfrom
fix/copy-session-id-pre-session
Sep 30, 2026
Merged

jkyberneees merged 1 commit into
mainfrom
fix/copy-session-id-pre-session

Conversation

@jkyberneees

Copy link
Copy Markdown
Contributor

What

/copy-session-id copied the connect-time session id — the wire session frame stamps an id before any prompt is sent.

Fix

  • New sessionLive gate: armed by the first prompt (sendPrompt), a session resume, or a wire/wake turn; cleared by /new.
  • copySessionID requires sessionLive && validSessionID; otherwise shows a note and copies nothing.
  • The command is hidden from the slash popup and /help until the session exists.

Testing

RED-first: 5 new tests in copy_session_id_test.go (pre-session unavailable, available after prompt, dormant after /new, hidden from popup/help). make test -race ./... green.

The wire session event stamps an id on connect, before any prompt, so
/copy-session-id copied that placeholder. Gate the command (and its
visibility in the slash popup and /help) on sessionLive — armed by the
first prompt, a resume, or a wire turn, cleared by /new.
@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Sep 30, 2026 •

Copy link
Copy Markdown

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Preview URL Updated (UTC)
✅ Deployment successful!
View logs
bodek 172d853 Commit Preview URL

Branch Preview URL
Sep 30 2026, 08:01 AM

@jkyberneees
jkyberneees merged commit 3a568df into main Sep 30, 2026
9 checks passed
@jkyberneees
jkyberneees deleted the fix/copy-session-id-pre-session branch September 30, 2026 08:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant