Skip to content

feat(session-list): copy session ID from the long-press menu#1425

Open
chphch wants to merge 1 commit into
slopus:mainfrom
chphch:feat/copy-session-id
Open

feat(session-list): copy session ID from the long-press menu#1425
chphch wants to merge 1 commit into
slopus:mainfrom
chphch:feat/copy-session-id

Conversation

@chphch

@chphch chphch commented Jun 21, 2026

Copy link
Copy Markdown
Contributor

Add a "Copy session ID" action to the session quick-actions menu (long-press a session row, or the web actions popover) that copies the Happy session ID to the clipboard and shows the existing confirmation toast. Today the only way to grab a session's ID is to open Session Info and tap the "Happy Session ID" row — this surfaces the same copy one long-press away, alongside the existing (dev-only) "Copy session metadata" actions. The internal Claude/Codex ids keep their dedicated copy rows on the Session Info screen.

Implemented as a small copySessionIdToClipboard helper mirroring the existing copySessionMetadataToClipboard, wired into useSessionQuickActions's actionItems so every consumer picks it up automatically (the long-press Modal.alert menu in SessionsList / ActiveSessionsGroupCompact, and SessionActionsPopover). It reuses the existing sessionInfo.happySessionIdCopied / sessionInfo.failedToCopySessionId strings and adds one new label key sessionInfo.copySessionId across all 10 locales.

Proof

Verified end-to-end on web via a standalone happy-server (PGlite) + Expo web, authenticated with the dev-token URL bypass and driven headlessly with Playwright: the session action menu renders the new Copy session ID item, tapping it writes session.id to the clipboard (asserted navigator.clipboard.readText() === session.id), and the "Happy Session ID copied to clipboard" confirmation appears. pnpm typecheck is clean. GIF in the comment below.

Add an always-visible "Copy session ID" action to the session quick-actions
menu (long-press on a session row + the web actions popover). It copies the
Happy session ID via expo-clipboard and shows the existing success/failure
modal. The internal Claude/Codex ids keep their own copy rows on the Session
Info screen.

Reuses the existing sessionInfo.happySessionIdCopied / failedToCopySessionId
strings; adds one new label key sessionInfo.copySessionId across all 10 locales.

Generated with [Claude Code](https://claude.ai/code)
via [Happy](https://happy.engineering)

Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Happy <yesreply@happy.engineering>
@chphch

chphch commented Jun 21, 2026

Copy link
Copy Markdown
Contributor Author

Proof — Copy session ID works end-to-end

Captured locally via a standalone happy-server (PGlite) + Expo web, authenticated through the getDevWebQueryCredentials() dev-token URL bypass and driven headlessly with Playwright.

The session action menu renders the new Copy session ID item; tapping it writes session.id to the clipboard (assertion: navigator.clipboard.readText() === session.id ✅) and the "Happy Session ID copied to clipboard" confirmation appears.

Copy session ID proof

The action flows through useSessionQuickActions's actionItems, so it appears in every consumer (the long-press Modal.alert menu in SessionsList / ActiveSessionsGroupCompact, and SessionActionsPopover) with no per-surface wiring. Web renders the action menu compactly via Modal.alert; on device it's the native action sheet. pnpm typecheck is clean.

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