Skip to content

feat: show Codex transcripts in the sidebar - #104437

Merged
steipete merged 8 commits into
mainfrom
codex/codex-session-sidebar-transcripts
Jul 11, 2026
Merged

steipete merged 8 commits into
mainfrom
codex/codex-session-sidebar-transcripts

Conversation

@steipete

Copy link
Copy Markdown
Contributor

Closes #104399

AI-assisted: implemented with Codex. I reviewed the source, protocol contract, generated locale output, tests, and rendered browser proof.

What Problem This Solves

Codex supervision currently exposes a fleet catalog, but supervised sessions are not part of the normal sidebar workflow and their persisted content cannot be read. Users can see titles without being able to open the actual Codex work from another computer.

Why This Change Was Made

This adds a host-grouped, non-archived Codex session section to the Control UI sidebar and a native transcript detail route. Transcript reads use Codex App Server's experimental thread/turns/list contract with itemsView: "full", fetching 20 turns at a time through opaque cursors; there is no unbounded history fallback, and each serialized page is capped at 20 MiB.

The Mac node advertises the matching read command only when Codex supervision is enabled. Remote sessions remain read-only: continue and archive stay on the owning computer, and OpenClaw never substitutes another model/runtime for Codex work. Automatic sidebar catalog hydration is bounded at 100 pages / 4,000 active sessions per host, with the full catalog available for further browsing.

User Impact

Users with Codex supervision enabled can see active Codex sessions from the Gateway and paired Mac app nodes in the sidebar, open any session, read its persisted user/assistant/reasoning/tool/file items, inspect the full JSON for each item, and load older history on demand.

Evidence

  • Live Codex 0.144.0-alpha.4 App Server probe: thread/list and paginated thread/turns/list with itemsView: "full" succeed; thread/items/list returns the documented -32601 unsupported response on the default store.
  • Blacksmith Testbox broad changed gate: passed (typechecks, core/extension lint, macOS packaging tests, database/storage/import guards).
  • Blacksmith Testbox focused UI: 5 files, 99 tests passed.
  • Blacksmith Testbox Codex extension: 73 tests passed.
  • Blacksmith Testbox Control UI browser E2E: 1 passed; verifies grouped hosts, partial host failure, transcript content, full item details, cursor paging, search, archive disappearance, and Codex-only continuation behavior.
  • Native macOS tests: 86 passed (catalog, node coordinator, runtime); arm64 app build passed.
  • ui:i18n:check, SwiftFormat lint, and git diff --check passed.
  • Fresh Codex autoreview after fixes and after rebase: no actionable findings.

@openclaw-barnacle openclaw-barnacle Bot added docs Improvements or additions to documentation app: macos App: macos app: web-ui App: web-ui extensions: codex plugin: file-transfer size: XL maintainer Maintainer-authored PR labels Jul 11, 2026
@steipete

Copy link
Copy Markdown
Contributor Author

Land-ready proof:

  • pnpm check:changed on Blacksmith Testbox passed: typechecks, core/extension lint, macOS packaging tests, and storage/import guards.
  • pnpm test extensions/codex/src/session-catalog.test.ts: 73 passed.
  • pnpm test ui/src/pages/plugin/codex-sidebar.test.ts ui/src/pages/plugin/codex-sessions-controller.test.ts ui/src/pages/plugin/codex-sessions-view.test.ts ui/src/pages/plugin/plugin-page.test.ts ui/src/app-navigation.test.ts: 99 passed on Testbox run https://github.com/openclaw/openclaw/actions/runs/29150888453.
  • node scripts/run-vitest.mjs run --config test/vitest/vitest.ui-e2e.config.ts --configLoader runner ui/src/e2e/codex-sessions.e2e.test.ts: 1 browser E2E passed on the same Testbox run.
  • Native macOS catalog/coordinator/runtime tests: 86 passed; arm64 app build passed.
  • node --import tsx scripts/control-ui-i18n.ts check, ./scripts/format-swift.sh macos, and git diff --check: passed.
  • Live Codex 0.144.0-alpha.4 App Server probe verified thread/turns/list cursor paging with itemsView: "full"; the unsupported thread/items/list path is not used.
  • Fresh autoreview after the client-switch privacy fix: no actionable findings.

Known proof gap: the mock browser screenshots/video were captured and inspected, but this workstation's Crabbox artifact broker is not configured, so they were not uploaded. Signed multi-Mac fleet validation follows the merge because the deployable app must be built from landed main.

@steipete
steipete force-pushed the codex/codex-session-sidebar-transcripts branch from 8a923b2 to ac28895 Compare July 11, 2026 11:31

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 8a923b2451

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +70 to +80
if (this.connected && this.client && this.loadedClient !== this.client) {
if (this.loadedClient) {
this.hydrationToken = null;
this.clearRefreshTimer();
stopCodexSessionsPolling(this.controllerHost);
sessionsState.requestUpdate = () => {
this.revision += 1;
};
}
this.loadedClient = this.client;
this.beginRefresh();

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

P1 Badge Clear stale Codex sessions when the Gateway client changes

When the Control UI switches from one connected Gateway client to another, this branch starts the new refresh without clearing the controller state for the previous client. If the replacement Gateway is slow or its first codex.sessions.list fails, render() continues showing the old Gateway's Codex session titles/hosts under the new connection, leaking stale private session metadata across Gateway contexts. The disconnect path already calls stopCodexSessionsPolling, but the connected client-replacement path needs the same teardown before beginRefresh().

Useful? React with 👍 / 👎.

@clawsweeper

clawsweeper Bot commented Jul 11, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs real behavior proof before merge. Reviewed July 11, 2026, 7:59 AM ET / 11:59 UTC.

Summary
The PR adds host-grouped Codex sessions to the Control UI sidebar and a read-only, cursor-paginated transcript route for local and paired-node sessions.

Reproducibility: yes. from source: connect a paired node that advertises the existing Codex list command but not the new turn-read command, then click Read; the UI enables navigation and the request fails unavailable.

Review metrics: 1 noteworthy metric.

  • Remote read surface: 1 Gateway method and 1 node command added. Both additions need explicit mixed-version and pairing-approval compatibility handling before merge.

Stored data model
Persistent data-model change detected: persistent cache schema: ui/src/i18n/.i18n/ar.tm.jsonl, persistent cache schema: ui/src/i18n/.i18n/de.tm.jsonl, persistent cache schema: ui/src/i18n/.i18n/es.tm.jsonl, persistent cache schema: ui/src/i18n/.i18n/fa.tm.jsonl, persistent cache schema: ui/src/i18n/.i18n/fr.tm.jsonl, persistent cache schema: ui/src/i18n/.i18n/hi.tm.jsonl, and 15 more. Confirm migration or upgrade compatibility proof before merge.

Root-cause cluster
Relationship: fixed_by_candidate
Canonical: #104399
Summary: This PR is the candidate implementation for the linked feature issue.

Members:

Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything.

Merge readiness
Overall: 🦪 silver shellfish
Proof: 🦪 silver shellfish
Patch quality: 🦐 gold shrimp
Result: blocked until stronger real behavior proof is added.

Overall follows the weaker of proof and patch quality, so missing proof can cap an otherwise strong patch.

Rank-up moves:

  • Gate transcript navigation on explicit per-host turn-read capability.
  • Upload redacted real local and paired-node Control UI proof.

Proof guidance:

  • [P1] Needs stronger real behavior proof before merge: The live Codex probe validates the dependency method, but mocked browser E2E and test output do not prove the real Control UI and paired-node flow; upload a redacted screenshot sequence, recording, live output, or linked artifact, then update the PR body to trigger review or ask a maintainer for @clawsweeper re-review.

Risk before merge

  • [P1] Existing paired nodes can list sessions but fail every transcript open until they are upgraded and separately approved for the newly advertised command.
  • [P1] The user-visible surface relies on an experimental Codex API and has no inspectable after-fix real Control UI or paired-node proof.

Maintainer options:

  1. Gate transcript reads by host capability (recommended)
    Expose turn-read support per host and prevent navigation until the selected node advertises and has approval for the new command.
  2. Pause the experimental surface
    Defer the PR until the upstream API and mixed-version fleet behavior have a maintainer-approved stability contract.

Next step before merge

  • [P1] The capability defect is concrete, but the protected maintainer label, experimental API acceptance, and real-proof gate require maintainer handling before merge.

Maintainer decision needed

  • Question: Should OpenClaw ship this experimental cross-host Codex transcript surface now, after capability gating and real mixed-version proof, or defer it until the upstream method and fleet upgrade path are more stable?
  • Rationale: The feature adds a user-visible supervision contract and a new paired-node command backed by an experimental dependency API, so maintainers must accept the stability and upgrade burden.
  • Likely owner: steipete — The current Codex supervision implementation and recent sidebar work trace primarily to this person.
  • Options:
    • Gate, prove, and land (recommended): Keep the feature, add explicit per-host read capability gating, and require real local and paired-node upgrade proof before merge.
    • Defer the feature: Keep the catalog-only supervision surface until the Codex pagination API and node upgrade contract are stable.

Security
Cleared: Transcript reads remain behind operator write authorization and node consent or command approval; no dependency, workflow, package-resolution, secret, or permission broadening defect was found.

Review findings

  • [P1] Gate transcript opens on the new node command — ui/src/pages/plugin/codex-sessions-view.ts:247-248
Review details

Best possible solution:

Carry transcript-read capability in every host result, disable or hide Read until the paired node advertises and is approved for the command, then prove local, mixed-version, and paired-node flows with redacted real artifacts.

Do we have a high-confidence way to reproduce the issue?

Yes from source: connect a paired node that advertises the existing Codex list command but not the new turn-read command, then click Read; the UI enables navigation and the request fails unavailable.

Is this the best way to solve the issue?

No in its current form: bounded upstream pagination is the right data source, but listing support must not be treated as proof that transcript reads are available.

Full review comments:

  • [P1] Gate transcript opens on the new node command — ui/src/pages/plugin/codex-sessions-view.ts:247-248
    A connected paired node can still be listed through the existing codex.appServer.threads.list.v1 command while lacking or awaiting approval for codex.appServer.thread.turns.list.v1. This button remains enabled for that host, so every open navigates to a request that can only fail unavailable. Carry read capability in the host payload and disable or hide this action until it is present. This was equally visible on the prior reviewed head and is a late discovery.
    Confidence: 0.99
    Late finding: first raised on code an earlier review cycle already covered.

Overall correctness: patch is incorrect
Overall confidence: 0.99

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning high; reviewed against 90e465833b30.

Label changes

Label justifications:

  • P2: The feature is valuable but affects an opt-in workflow, and the current blocker has limited blast radius rather than emergency impact.
  • merge-risk: 🚨 compatibility: Nodes supporting the existing list command can remain visible while lacking or awaiting approval for the newly added transcript-read command.
  • rating: 🦪 silver shellfish: Overall readiness is 🦪 silver shellfish; proof is 🦪 silver shellfish and patch quality is 🦐 gold shrimp.
  • status: 📣 needs proof: The PR needs real behavior proof before ClawSweeper can clear the contributor ask. Needs stronger real behavior proof before merge: The live Codex probe validates the dependency method, but mocked browser E2E and test output do not prove the real Control UI and paired-node flow; upload a redacted screenshot sequence, recording, live output, or linked artifact, then update the PR body to trigger review or ask a maintainer for @clawsweeper re-review.
Evidence reviewed

Acceptance criteria:

  • [P1] pnpm test extensions/codex/src/session-catalog.test.ts.
  • [P1] pnpm test ui/src/pages/plugin/codex-sessions-controller.test.ts ui/src/pages/plugin/codex-sessions-view.test.ts ui/src/pages/plugin/codex-sidebar.test.ts.
  • [P1] node scripts/run-vitest.mjs run --config test/vitest/vitest.ui-e2e.config.ts --configLoader runner ui/src/e2e/codex-sessions.e2e.test.ts.

What I checked:

  • Mixed-version capability mismatch: The session card enables its Read action for every connected host without checking whether that paired node advertises the newly added transcript command. (ui/src/pages/plugin/codex-sessions-view.ts:247, f36ee7eb2a02)
  • Catalog lacks read capability state: The host result carries identity, connection state, sessions, cursors, and errors but no indication that the selected node supports or has approval for transcript reads. (extensions/codex/src/session-catalog-types.ts:1, f36ee7eb2a02)
  • Re-review continuity: The prior ClawSweeper cycle reviewed the same SHA, so the capability-gating defect was equally visible then and is reported as a late discovery. (ui/src/pages/plugin/codex-sessions-view.ts:247, f36ee7eb2a02)
  • Upstream Codex contract: Codex current source defines and tests bounded thread/turns/list pagination with full item projection, sort direction, opaque forward and backward cursors, and explicit stale-cursor and pre-first-message errors. (../codex/codex-rs/app-server/tests/suite/v2/thread_read.rs:355, 5c19155cbd93)
  • Current-main behavior: Current main implements the list-only Codex session catalog and node command but does not provide transcript reads or sidebar transcript navigation, so the feature has not been superseded. (extensions/codex/src/session-catalog.ts:945, 90e465833b30)
  • Real-proof gap: The contributor reports a live dependency probe and extensive tests but explicitly states that the mocked browser screenshots and video were not uploaded and signed multi-Mac validation would follow merge. (f36ee7eb2a02)

Likely related people:

  • steipete: The existing Codex supervision catalog and view, plus recent Control UI sidebar work, trace to merged commits authored by this person. (role: feature owner and recent area contributor; confidence: high; commits: 72cf43fa8092, d5fe0c5e73d9; files: extensions/codex/src/session-catalog.ts, ui/src/pages/plugin/codex-sessions-view.ts, ui/src/components/app-sidebar.ts)
What the crustacean ranks mean
  • 🦀 challenger crab: rare, exceptional readiness with strong proof, clean implementation, and convincing validation.
  • 🦞 diamond lobster: very strong readiness with only minor maintainer review expected.
  • 🐚 platinum hermit: good normal PR, likely mergeable with ordinary maintainer review.
  • 🦐 gold shrimp: useful signal, but proof or patch confidence is still limited.
  • 🦪 silver shellfish: thin signal; proof, validation, or implementation needs work.
  • 🧂 unranked krab: not merge-ready because proof is missing/unusable or there are serious correctness or safety concerns.
  • 🌊 off-meta tidepool: rating does not apply to this item.

Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics.

How this review workflow works
  • ClawSweeper keeps one durable marker-backed review comment per issue or PR.
  • Re-runs edit this comment so the latest verdict, findings, and automation markers stay together instead of adding duplicate bot comments.
  • A fresh review can be triggered by eligible @clawsweeper re-review comments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.
  • PR/issue authors and users with repository write access can comment @clawsweeper re-review or @clawsweeper re-run on an open PR or issue to request a fresh review only.
  • Maintainers can also comment @clawsweeper review to request a fresh review only.
  • Fresh-review commands do not start repair, autofix, rebase, CI repair, or automerge.
  • Maintainer-only repair and merge flows require explicit commands such as @clawsweeper autofix, @clawsweeper automerge, @clawsweeper fix ci, or @clawsweeper address review.
  • Maintainers can comment @clawsweeper explain to ask for more context, or @clawsweeper stop to stop active automation.
Review history (1 earlier review cycle)
  • reviewed 2026-07-11T11:51:52.032Z sha f36ee7eb2a02d1375190ec04cecaffe29cf2bef8 :: needs real behavior proof before merge. :: none

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 1fbeca0766

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

class="btn btn--small codex-session__open"
type="button"
aria-label=${t("codexSessions.actions.readTranscriptLabel", { title })}
?disabled=${!interactionsEnabled || !host.connected}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

P2 Badge Disable transcript opens for nodes without turn reads

When a paired node is still on the list-only command set, or the newly added turns command has not been approved yet, the catalog can still return that node because listing only requires codex.appServer.threads.list.v1, but codex.sessions.read later rejects the same node unless it advertises codex.appServer.thread.turns.list.v1. This button is enabled for any connected host, so selecting one of those remote rows opens a transcript route that can only fail as unavailable; please expose transcript capability in the host payload or disable/filter these opens until turns are available.

Useful? React with 👍 / 👎.

@clawsweeper clawsweeper Bot added rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. feature: ✨ showcase ClawSweeper spotlight: unusually compelling feature idea for maintainer attention. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. P2 Normal backlog priority with limited blast radius. merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. labels Jul 11, 2026
@openclaw-barnacle openclaw-barnacle Bot added channel: whatsapp-web Channel integration: whatsapp-web app: android App: android gateway Gateway runtime scripts Repository scripts agents Agent runtime and tooling extensions: qa-lab labels Jul 11, 2026
@steipete
steipete force-pushed the codex/codex-session-sidebar-transcripts branch from 0343ee2 to be4f720 Compare July 11, 2026 12:39
@openclaw-barnacle openclaw-barnacle Bot removed channel: whatsapp-web Channel integration: whatsapp-web app: android App: android gateway Gateway runtime scripts Repository scripts agents Agent runtime and tooling extensions: qa-lab labels Jul 11, 2026
@steipete
steipete merged commit 05aecc1 into main Jul 11, 2026
37 of 38 checks passed
@steipete
steipete deleted the codex/codex-session-sidebar-transcripts branch July 11, 2026 12:39
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Jul 12, 2026
* feat: show Codex transcripts in sidebar

* fix: clear Codex sidebar on Gateway switch

* chore: leave release notes to release workflow

* chore: refresh native i18n inventory

* fix: satisfy macOS Codex node lint

* fix: refresh native localization inventory

* docs: refresh documentation map

* chore: refresh UI locale metadata
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

app: macos App: macos app: web-ui App: web-ui docs Improvements or additions to documentation extensions: codex feature: ✨ showcase ClawSweeper spotlight: unusually compelling feature idea for maintainer attention. maintainer Maintainer-authored PR merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. P2 Normal backlog priority with limited blast radius. plugin: file-transfer rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. size: XL status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat: show Codex sessions and paginated transcripts in the sidebar

1 participant