Skip to content

Bring main to tested dev stack: fresh-agent, Codex durability, OpenCode restore, tabs sync#358

Merged
danshapiro merged 1 commit into
mainfrom
integration/main-to-tested-dev-stack-20260520
May 21, 2026
Merged

Bring main to tested dev stack: fresh-agent, Codex durability, OpenCode restore, tabs sync#358
danshapiro merged 1 commit into
mainfrom
integration/main-to-tested-dev-stack-20260520

Conversation

@danshapiro
Copy link
Copy Markdown
Owner

What happened

Freshell has been self-hosting from the local dev integration branch, while origin/main lagged behind the working stack. This PR brings origin/main to the tested dev integration state.

This is broader than a normal feature PR because Dan had a system failure and lost interim local data and history that would normally have supported cleaner incremental landing steps. Rather than hiding that history behind a narrow hotfix, this PR makes the recovery explicit and lands the integrated result in one review surface.

Branch provenance

  • Base: origin/main at 8cd9ccf1.
  • Integration source: origin/dev at e3fd3481.
  • Branch: integration/main-to-tested-dev-stack-20260520.
  • Commit: 4813bbbf.
  • Shape: origin/main + 1 commit.
  • Diff from origin/main: 282 files changed, 44,769 insertions, 8,187 deletions.
  • Diff from origin/dev: 7 files changed, 147 insertions, 43 deletions.

The branch tree is origin/dev plus these integration fixes:

  • package.json
  • src/components/Sidebar.tsx
  • src/store/tabsSlice.ts
  • test/helpers/coding-cli/real-session-contract-harness.ts
  • test/integration/real/coding-cli-session-contract.test.ts
  • test/unit/client/components/panes/PaneContainer.test.tsx
  • test/unit/server/coding-cli/codex-app-server/runtime.test.ts

What is included

  • Fresh-agent pane UI, store state, persistence, WebSocket handling, server runtime adapters, and provider registry support.
  • Codex app-server durability, managed launch config, restore decisions, remote proxy behavior, sidecar ownership, and retry handling.
  • OpenCode restore and activity fixes, including canonical identity handling and 3-views session classification.
  • Tabs registry compact device snapshots, client retirement handling, cross-tab sync, and multi-row tab settings.
  • MCP/editor pane parity, including editor line wrap behavior and split-pane defaults.
  • Real provider contract autodetection so installed and configured providers run, while missing providers skip clearly.
  • Live-only terminal and sidebar metadata fixes found while validating the integrated stack.
  • Test stabilization for lazy editor loading and Codex app-server runtime timing on this stack.

Why this is one PR

The smaller replacement PR path exists, but the stack is already integrated and tested as a unit on dev. Replaying those PRs one by one now adds rebase and sequencing risk without adding confidence. This PR is intentionally broad so reviewers can see the actual recovery step: main is being brought to the tested integration state, with the remaining differences from dev called out above.

What this is not

  • It is not a rollback.
  • It is not a local-only merge hidden inside dev.
  • It is not presented as a small feature change.
  • It does not try to preserve a clean history that no longer exists after the system failure.

Verification

Final verification on commit 4813bbbf:

  • npm run build passed.
  • FRESHELL_TEST_SUMMARY='final integration PR verification after provider script fix' npm run check passed.
  • Coordinator status after the run: latest-suite: full-suite success exit=0, dirty:0.
  • Client suite: 361 files passed, 3,662 tests passed.
  • Server suite: 227 files passed, 3,514 tests passed, 2 skipped.
  • Electron suite: 18 files passed, 208 tests passed.
  • Real provider contracts ran in the server suite:
    • Codex passed.
    • OpenCode passed.
    • Claude Code skipped because WSL has the binary but lacks ~/.claude/.credentials.json.
  • npm run test:real:coding-cli-contracts was fixed to use the server Vitest config and passed before the final full check with 7 passed, 2 skipped.

Provider binaries validated in WSL:

  • codex: /home/dan/.nvm/versions/node/v22.21.1/bin/codex, codex-cli 0.132.0.
  • claude: /home/dan/.nvm/versions/node/v22.21.1/bin/claude, 2.1.146.
  • opencode: /home/dan/.nvm/versions/node/v22.21.1/bin/opencode, 1.15.6.

Additional trial validation before the final package-script correction:

  • A production build was launched from the worktree.
  • A Playwright/WebSocket live session created a shell terminal and executed a command successfully.
  • The later package-script correction only changed how the real-provider contract script selects Vitest config.

Supersedes

This PR appears to supersede these open PRs:

This PR does not appear to supersede #297 or #289 based on the validation pass.

Review notes

Please review this as an integration recovery PR. The review questions are whether this accurately represents the tested dev state, whether the seven files beyond origin/dev are the right stabilization fixes, and whether any included behavior should become a follow-up cleanup issue after main is restored.

Copy link
Copy Markdown

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

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: 4813bbbf2f

ℹ️ 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 136 to 139
a.cwd === b.cwd &&
a.projectPath === b.projectPath &&
a.isFallback === b.isFallback &&
a.liveTerminalOnly === b.liveTerminalOnly &&
a.ratchetedActivity === b.ratchetedActivity &&
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Compare liveTerminalOnly in sidebar item equality checks

handleItemClick now passes item.liveTerminalOnly into openSessionTab, and openSessionTab uses that flag to decide whether to persist sessionRef on terminal panes (src/store/tabsSlice.ts, sessionRef: liveTerminalOnly ? undefined : ...). After this change, the memo/equality paths in Sidebar no longer track liveTerminalOnly, so an item can stay memoized with stale click payload when only that flag changes (for example during live-only ↔ durable identity transitions). That causes incorrect session association state to be written when opening the session (either persisting a live-only synthetic ref or dropping a durable ref).

Useful? React with 👍 / 👎.

@danshapiro danshapiro merged commit d4c7f5b into main May 21, 2026
1 check 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