Repository navigation
fix(ui): bind sessions to repo path - #83
Conversation
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent) Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (2)
🚧 Files skipped from review as they are similar to previous changes (1)
📝 WalkthroughWalkthrough
Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
Pull request overview
This PR updates session initialization so that a session’s default local execution workspace is derived from the session’s repo_path (instead of the server process CWD), while preserving any explicitly provided execution binding, and adds regression tests covering both behaviors.
Changes:
- Default
Session.execution_bindinginitialization now derivesworkspace_rootfromrepo_path.resolve()when no binding is provided. Session.execution_bindingis now nullable in the dataclass and is initialized in__post_init__, with defensive runtime checks added before persistence/workspace resolution.- Added tests verifying default binding-from-repo behavior and explicit binding precedence.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| coding-agent/src/coding_agent/ui/session_manager.py | Changes Session initialization to default execution_binding from repo_path and adds guards where binding is assumed initialized. |
| coding-agent/tests/ui/test_session_manager_public_api.py | Adds regression tests for default binding from repo_path and for preserving explicitly provided bindings. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| workspace_root=str(Path.cwd().resolve()) | ||
| ) | ||
| ) | ||
| execution_binding: ExecutionBinding | None = None |
| workspace_root=str(Path.cwd().resolve()) | ||
| ) | ||
| ) | ||
| execution_binding: ExecutionBinding | None = None |
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent) Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@coding-agent/src/coding_agent/ui/session_manager.py`:
- Around line 134-142: The legacy hydration branch in Session.from_store_data
leaves repo_path/workspace root un-normalized, causing non-canonical workspace
roots versus new construction; update the legacy branch that sets
self.execution_binding to LocalExecutionBinding to resolve repo_path with
Path.resolve() (use str(self.repo_path.resolve()) or str(Path.cwd().resolve())
when repo_path is None) and assign that resolved path to workspace_root before
constructing LocalExecutionBinding so the behavior matches the new default path
semantics in the execution_binding initialization.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro Plus
Run ID: d547a7c3-37b7-46d6-b67c-1e50df69a5d6
📒 Files selected for processing (1)
coding-agent/src/coding_agent/ui/session_manager.py
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent) Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
Summary
Verification
Summary by CodeRabbit
Bug Fixes
Tests