Skip to content

feat(session-controller): offer installed Agent session stores in one dropdown - #4

Closed
tyza66 wants to merge 1 commit into
mainfrom
codex/session-import-dropdown
Closed

tyza66 wants to merge 1 commit into
mainfrom
codex/session-import-dropdown

Conversation

@tyza66

@tyza66 tyza66 commented Oct 23, 2026

Copy link
Copy Markdown
Member

The session management page asked for a source directory path, so importing a Codex, Claude Code or ZCode store meant knowing where that Agent keeps its sessions on this machine and typing the path by hand. The page now asks which Agent to import instead: the Host detects the installed stores and the section offers them in one dropdown with the Import button beside it.

  • listAgentSessionSources holds the fixed home-directory layout of each foreign Agent and marks one installed only when its marker paths exist, so an Agent that was never run here offers nothing instead of an import that refuses every session.
  • Alpha's own store leads the list and reads the deployment-configured root, so a configured root outside the default layout stays the one this import opens. Detection never opens a Session; the import re-detects the format of whatever root the caller picked.
  • The list reaches the Client through a new harnessSessionSources remote and the sessionSources client method. Only detected installations appear as options, the selection stays disabled until at least one is, and the section shows a detecting state and an empty state.
  • Docs (EN/zh), the config and persistence catalogs, and the Cordis API catalog are regenerated in the same change.

… dropdown

The session management page asked for a source directory path, so importing a
Codex, Claude Code or ZCode store meant knowing where that Agent keeps its
sessions on this machine and typing the path by hand. The page now asks which
Agent to import instead: the Host detects the installed stores and the section
offers them in one dropdown with the Import button beside it, so the import
opens whatever is actually on disk rather than whatever the user remembered.

`listAgentSessionSources` holds the fixed home-directory layout of each foreign
Agent and marks one installed only when its marker paths exist, so an Agent
that was never run here offers nothing instead of an import that refuses every
session. Alpha's own store leads the list and reads the deployment-configured
root, so a configured root outside the default layout stays the one this
import opens. Detection never opens a Session: the import re-detects the
format of whatever root the caller picked.

The list reaches the Client through a new `harnessSessionSources` remote and
the `sessionSources` client method, and the section shows a detecting state
while the Host walks the markers and an empty state when no Agent is found.
Only detected installations appear as options, and the selection is disabled
until at least one is.
Copilot AI balanced review requested due to automatic review settings October 23, 2026 09:13

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.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

An organization owner can choose the repository organization as the billing source for reviews requested by members with a paid Copilot license. Learn about Copilot code review billing.

@tyza66 tyza66 added area/api Cross-interface protocols, remotes, and the session-controller surface. area/session Session format, persistence, and recorded history. area/web Browser and Electron graphical interfaces. kind/feature Adds or intentionally changes behavior. labels Oct 23, 2026
@tyza66

tyza66 commented Oct 23, 2026

Copy link
Copy Markdown
Member Author

CI verdict on this branch

All 33 check-runs finished: 19 success, 10 skipped, 4 failure. The 4 red lanes are pre-existing and reproduce identically without this change.

Why this PR exists: ci.yml triggers only on pull_request, so the full gate suite (coverage, static, snapshots, Windows lanes) never runs on a direct push to main.

1. No green ci.yml run exists in this repository. All 16 historical runs ended failure or cancelled. node 24 / coverage, node 24 / snapshots and artifacts, and windows node 24 / coverage failed on every one of them, including runs from 2026-10-07.

2. Coverage lane, compared against the immediately preceding PR run (fac2ce6b80, 2026-10-23 04:02 UTC, job 120233546760, which does not contain this change):

  • The same 57 .client.spec files fail to load there with Failed to resolve import "@mutantcat/dsh-llm/error" from "packages/client/ui-chat/src/client/chat/MessageItem.tsx". That resolution error is what empties the coverage of the hundreds of files the gate then reports at 0%.
  • ImportSessionsSection.tsx was already below threshold before this change (93.33% lines) and reads 93.65% after it.
  • harness-import.ts was already below threshold (76.92% lines) and reads 81.25% after it.

So this change moves both files it touches in the right direction and introduces no uncovered code of its own.

3. Snapshots lane: the failing set is identical. 128 failing snapshot case names before this change, 128 after, matching one-for-one with zero added and zero removed. The root cause is recorded-machine-local <available_skills> entries committed into the fixtures, which CI runners do not have. minimal-preset.snapshot.ts and preset-migration.snapshot.ts fail for unrelated a11y-text and node-structure reasons on both sides.

4. Windows coverage lane: the same @mutantcat/dsh-llm/error resolution error, plus the pre-existing path-separator assertion at harness-import.host.spec.ts:348 that fails on Windows with or without this change.

This change's own tests pass on Windows too: agent-session-sources.host.spec.ts (4 tests) and components.client.spec.tsx (11 tests) are green in the Windows coverage log, alongside 18 green locally.

Why this is closed rather than merged

main already carries this change as 29fd1c2d3e, whose tree is identical to this branch's. Merging would add a merge commit that pulls the duplicate cherry-pick into main's first-parent history for no content gain, so the branch is being retired instead. The run above is the record of the full gate suite against this change.

@tyza66 tyza66 closed this Oct 23, 2026
@tyza66
tyza66 deleted the codex/session-import-dropdown branch October 23, 2026 09:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/api Cross-interface protocols, remotes, and the session-controller surface. area/session Session format, persistence, and recorded history. area/web Browser and Electron graphical interfaces. kind/feature Adds or intentionally changes behavior.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants