Skip to content

Refactor chat session boundaries and host hook layout#74

Merged
roackb2 merged 2 commits into
mainfrom
codex/refactor-chat-app-controller
May 13, 2026
Merged

Refactor chat session boundaries and host hook layout#74
roackb2 merged 2 commits into
mainfrom
codex/refactor-chat-app-controller

Conversation

@roackb2
Copy link
Copy Markdown
Owner

@roackb2 roackb2 commented May 13, 2026

Summary

  • move chat host orchestration toward the documented hook/controller layout
  • split chat session persistence into a file-backed repository and separate session record helpers
  • make the TUI session hook call core session services instead of touching storage directly
  • update boundary docs/comments and add coverage for the session service changes

Verification

  • yarn eslint
  • yarn typecheck
  • focused vitest coverage for chat/session/control-plane paths
  • npx tsx scripts/verify-tui-session-switch.tsx
  • real ask-mode smoke checks with --new-session and --latest

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: 4bc2d5c268

ℹ️ 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 24 to 29
type UseChatSessionsArgs = {
sessionCatalogFile: string;
apiKeyPresent: boolean;
defaultModel: string;
workspaceRoot: string;
stateRoot: string;
};
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 Keep chat session storage path configurable

The session hook no longer accepts sessionCatalogFile and now always builds its service config from stateRoot, which hardwires persistence to stateRoot/chat-sessions.catalog.json. This breaks callers that provide a non-default catalog path (for example embedding runtimes), and it can desynchronize state because turn execution still reads from runtime.sessionCatalogFile in the run controller path. Please thread the runtime-provided session catalog path through useChatSessions so both session CRUD and turn execution target the same file.

Useful? React with 👍 / 👎.

@roackb2 roackb2 merged commit fa0cdec into main May 13, 2026
4 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.

1 participant