refactor(server): route session stragglers through effect services - #1326
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (5)
📝 WalkthroughWalkthroughFive session route handlers in ChangesSession Effect Migration — straggler pass
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)
Warning There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure. 🔧 ESLint
ESLint install failed. For unrecoverable errors, disable the tool in CodeRabbit configuration. 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. Comment |
There was a problem hiding this comment.
Code Review
This pull request migrates several session-related route handlers in packages/opencode/src/server/instance/session.ts to use the Effect-based AppRuntime.runPromise pattern, including listing sessions, sharing/unsharing sessions, summarizing, and replying to permissions. It also introduces the list method to the Session.Service interface and updates corresponding tests. Feedback on the changes suggests renaming the resolved Session.Service variable in the GET /session handler to sessionService to avoid naming conflicts with the outer sessions array and to maintain consistency across the codebase.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
Summary
Routes the listed session owner facade stragglers through the shared Effect runtime boundary:
Session.Service.listwhile preserving the legacySession.listgenerator facade for existing callers./session, share/unshare session fetches, summarize post-loop message reads, and the deprecated session permission response route ontoAppRuntime+Session.Service/Permission.Service.Why
This is part of the non-UI backend Effect migration lane. The current session route owner still had a few raw facade calls in otherwise Effect-aware route code; this PR clears those specific stragglers without expanding into session processor, prompt, or run-state internals.
Related Issue
Related to #936
Human Review Status
Pending
Review Focus
Please focus on whether the new
Session.Service.listboundary preserves the legacy list query behavior and whether the route handlers still return the same HTTP responses while using the shared runtime.Risk Notes
Low risk backend migration. Permission surface touched only for the deprecated session permission response route; behavior is covered by a focused route test and the reply schema is unchanged. Migration docs were updated only to record this partial straggler cleanup. No UI/copy, platform/packaging, dependency, credential, generated-content, or deletion behavior was changed.
How To Verify
Screenshots or Recordings
Not applicable. No visible UI changes.
Checklist
bug,enhancement,task,documentation. Type labels are author-added; the labeler bot does NOT assign them. Add the label in the GitHub UI, then tick this.app,ui,platform,harness,ci. The labeler bot assigns these on PR open based on changed paths. Confirm the bot's choice (or override if wrong), then tick this.P0,P1,P2,P3. The priority-triage bot suggests one on PR open. Confirm or override, then tick this.Pending,Approved by @<reviewer>, orNot required: <reason>(default isPending; "not required" is restricted to bot-authored low-risk PRs).dev, and my PR title and commit messages use Conventional Commits in English.Summary by CodeRabbit