Skip to content

refactor(server): move session manager - #380

Merged
delete-cloud merged 1 commit into
mainfrom
refactor/server-session-manager
May 24, 2026
Merged

delete-cloud merged 1 commit into
mainfrom
refactor/server-session-manager

Conversation

@delete-cloud

@delete-cloud delete-cloud commented May 24, 2026 •

Copy link
Copy Markdown
Owner

Summary

  • move SessionManager implementation to coding_agent.server.session_manager
  • update production imports in HTTP server and REPL to use the new canonical path
  • keep coding_agent.ui.session_manager as a module alias for existing monkeypatch/import compatibility

Verification

  • uv run pytest tests/ui/test_session_manager_public_api.py tests/ui/test_session_manager_runtime.py tests/ui/test_session_manager_owner_checks.py tests/ui/test_session_manager_approval_runtime.py -v
  • uv run pytest tests/ui/test_http_server.py tests/ui/test_http_server_failover.py tests/ui/test_http_server_workspace_transfer.py -v
  • uv run pytest tests/cli/test_remote_client.py::test_serve_config_sets_explicit_server_config tests/cli/test_remote_client.py::test_serve_config_uses_server_host_and_port_when_cli_omits_them tests/cli/test_entrypoint_contract.py -v
  • uv run pytest tests/integration/test_wire_http_integration.py tests/integration/test_durable_runtime_smoke.py -v
  • uv run ruff check src/coding_agent/server/session_manager.py src/coding_agent/ui/session_manager.py src/coding_agent/server/http_server.py src/coding_agent/cli/repl.py
  • git diff --check

Summary by CodeRabbit

  • Chores
    • Internal reorganization of session management module imports to improve code structure and maintainability.
    • Removed unused dependencies and consolidated import paths for cleaner codebase organization.

Review Change Stack

@coderabbitai

coderabbitai Bot commented May 24, 2026 •

Copy link
Copy Markdown
Contributor

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: f1fe02ed-0fea-43c5-9be9-a0069e8a87d6

📥 Commits

Reviewing files that changed from the base of the PR and between 1f96ae4 and 4f10672.

📒 Files selected for processing (4)
  • coding-agent/src/coding_agent/cli/repl.py
  • coding-agent/src/coding_agent/server/http_server.py
  • coding-agent/src/coding_agent/server/session_manager.py
  • coding-agent/src/coding_agent/ui/session_manager.py

📝 Walkthrough

Walkthrough

This PR relocates session management types from the UI module to the server module. SessionManager and Session imports are updated in the HTTP server and REPL CLI, with unused imports cleaned up in the CLI.

Changes

Session management relocation from UI to server module

Layer / File(s) Summary
Session management import relocation and cleanup
coding-agent/src/coding_agent/server/http_server.py, coding-agent/src/coding_agent/cli/repl.py
HTTP server and REPL CLI update SessionManager and Session imports to source from coding_agent.server.session_manager instead of coding_agent.ui.session_manager. REPL also removes unused asyncio and CodingAgentTUI imports.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

Poem

🐰 Session types hop to their proper home,
From UI's nest to server's dome,
Imports shuffled, cleanup done with care,
The modules breathe fresh server air! ✨

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately describes the main change: moving SessionManager to a new location in the server module and updating imports accordingly.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch refactor/server-session-manager

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@delete-cloud
delete-cloud force-pushed the refactor/server-session-manager branch from 8e72ce6 to 4f10672 Compare May 24, 2026 19:09
@delete-cloud
delete-cloud marked this pull request as ready for review May 24, 2026 19:28
@delete-cloud
delete-cloud merged commit 275f7a2 into main May 24, 2026
1 check passed
@delete-cloud
delete-cloud deleted the refactor/server-session-manager branch May 24, 2026 19:30
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