Skip to content

Preview Codex session links in Sessions - #119

Merged
merefield merged 3 commits into
mainfrom
feat/session-thread-links
Nov 25, 2026
Merged

merefield merged 3 commits into
mainfrom
feat/session-thread-links

Conversation

@merefield

Copy link
Copy Markdown
Owner

Why

Codex can link to another session or sub-agent in a reply. Codexometer should let you follow that link without losing your place, switching sessions, or starting work by accident.

What changes

  • Follow native codex://threads/… Markdown links from assistant replies and transcript previews in the terminal and browser. The TUI also offers an L picker for links on screen.
  • Browse nested, read-only previews and return to the original reply without clearing the draft. Opening a live session or resuming a saved one is a separate action; saved-session resume uses the existing review flow.
  • Verify the target under the current shared app-server account before loading its transcript. Linked sub-agents only show attributable history; unavailable or unverified targets get a generic message.

Verification

  • Go vet and full Go test suite; focused Go race tests
  • Svelte/TypeScript and formatting checks; six targeted Playwright tests; embedded browser assets rebuilt
  • Screenshot integrity, Go vulnerability scan, and duplication gate (no baseline change)

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

A moderate active finding remains in internal/prose/prose.go: link labels with nested formatting are projected via raw source text, causing Markdown delimiters to appear in both UIs instead of preserving the intended formatting.

1 open issue
What changed in this PR

Adds read-only previews for native codex://threads/... links across the terminal UI and browser, with nested navigation, account-scoped verification, draft preservation, and separate open/resume actions.

Changes:

  • Adds typed thread-link parsing and interactive preview handling in the terminal and browser.
  • Adds verified linked-session preview APIs with attributable agent-history filtering.
  • Extends tests, documentation, localization, and embedded browser assets.
File Description
web/​tests/​browser.spec.ts Adds browser coverage for nested previews, unavailable targets, draft preservation, and resume outcomes.
web/​src/​state.svelte.ts Adds linked-session preview state and scoped API integration.
web/​src/​SessionTranscript.svelte Displays transcript content and agent-history verification states.
web/​src/​Sessions.svelte Mounts link previews and suppresses conflicting session interactions while previewing.
web/​src/​SessionProse.svelte Renders thread references as accessible interactive buttons.
web/​src/​SessionLinkPreview.svelte Implements the browser preview dialog, nested navigation, and open/resume actions.
web/​src/​SessionInspector.svelte Reuses transcript verification handling for agent inspections.
web/​src/​SessionCopy.svelte Prevents copying while a link preview is active.
web/​src/​SessionActions.svelte Prevents conflicting keyboard actions during previews.
web/​src/​SavedSessions.svelte Supports targeted saved-session previews and resume flows.
web/​src/​contracts.generated.ts Adds the serialized thread identifier to prose runs.
README.md Documents thread-link preview behavior, controls, verification, and limitations.
internal/​web/​session_links.go Adds the scoped linked-session preview HTTP endpoint.
internal/​web/​session_links_test.go Tests pairing, scope validation, read-only behavior, and restricted transcript handling.
internal/​web/​server.go Registers the linked-session preview capability and route.
internal/​web/​dist/​index.html Updates the embedded frontend to reference rebuilt assets.
internal/​web/​dist/​assets/​index-EBtDZ1sz.css Adds rebuilt styles for thread links and preview dialogs.
internal/​web/​dist/​assets/​index-BB69csfa.css Removes the superseded browser stylesheet bundle.
internal/​ui/​view.go Adds the terminal link-picker footer hint.
internal/​ui/​session_thread_links.go Implements terminal link discovery, hit testing, nested previews, and actions.
internal/​ui/​session_thread_links_test.go Tests terminal preview navigation, draft preservation, and read-state behavior.
internal/​ui/​session_inspector.go Extracts shared inspection-frame rendering.
internal/​ui/​session_finder.go Separates opening the resume picker from loading saved sessions.
internal/​ui/​monitor.go Renders the thread-link preview panel in monitor mode.
internal/​ui/​monitor_read.go Prevents preview interaction from acknowledging source sessions.
internal/​ui/​monitor_prose.go Adds terminal hyperlink markers and styling for thread links.
internal/​ui/​model.go Adds thread-link state and update-handler integration.
internal/​prose/​thread_links_test.go Tests valid, invalid, and inert thread-link Markdown.
internal/​prose/​prose.go Parses and projects native thread references into typed prose runs.
internal/​i18n/​locales/​zh-Hans.json Adds Simplified Chinese preview and link labels.
internal/​i18n/​locales/​tr.json Adds Turkish preview and link labels.
internal/​i18n/​locales/​sv.json Adds Swedish preview and link labels.
internal/​i18n/​locales/​ru.json Adds Russian preview and link labels.
internal/​i18n/​locales/​pt-PT.json Adds European Portuguese preview and link labels.
internal/​i18n/​locales/​pt-BR.json Adds Brazilian Portuguese preview and link labels.
internal/​i18n/​locales/​nl.json Adds Dutch preview and link labels.
internal/​i18n/​locales/​nb.json Adds Norwegian preview and link labels.
internal/​i18n/​locales/​ja.json Adds Japanese preview and link labels.
internal/​i18n/​locales/​it.json Adds Italian preview and link labels.
internal/​i18n/​locales/​fr.json Adds French preview and link labels.
internal/​i18n/​locales/​fi.json Adds Finnish preview and link labels.
internal/​i18n/​locales/​et.json Adds Estonian preview and link labels.
internal/​i18n/​locales/​es.json Adds Spanish preview and link labels.
internal/​i18n/​locales/​en-GB.json Adds English preview and link labels.
internal/​i18n/​locales/​de.json Adds German preview and link labels.
internal/​i18n/​locales/​da.json Adds Danish preview and link labels.
internal/​codex/​session_links.go Defines the linked-session preview client and target attribution logic.
internal/​codex/​session_links_unix.go Verifies account scope, session ownership, transport state, and attributable history.
internal/​codex/​session_links_unix_test.go Tests account verification, agent filtering, legacy server support, and no-write behavior.
internal/​codex/​session_history_unix.go Adds transport-pinned history reads for preview consistency.
internal/​codex/​session_finder_unix.go Adds server-version capability checks and reusable saved-page reads.
internal/​codex/​session_agents.go Extracts rollout attribution lookup for linked-agent previews.
internal/​codex/​daemon_status_unix.go Tracks exact-ID support and exposes current transport state.

Review effort: Lite

Comment thread internal/prose/prose.go Resolved
@merefield
merefield merged commit 498d149 into main Nov 25, 2026
8 checks passed
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.

2 participants