Skip to content

fix: filter chat sessions by connectionId#137

Merged
dory-finn merged 1 commit intomainfrom
fix/chat-sessions-filter-by-connection-id
Apr 1, 2026
Merged

fix: filter chat sessions by connectionId#137
dory-finn merged 1 commit intomainfrom
fix/chat-sessions-filter-by-connection-id

Conversation

@solarhell
Copy link
Copy Markdown
Collaborator

Summary

  • The organization refactor (teamIdorganizationId) broke session isolation — listSessions and createGlobalSession lost the connection-level scoping that teamId previously provided, causing sessions from all connections to appear together in the sidebar
  • Added required connectionId parameter to the full list/create stack: type interface → DB query → API routes → frontend API → session controller (via useParams)
  • API routes now return 400 if connectionId is missing

Test plan

  • Open chatbot under connection A, verify only connection A's sessions appear
  • Create a new session under connection A, verify it has connectionId set
  • Switch to connection B, verify only connection B's sessions appear
  • Verify API returns 400 when connectionId query param is missing

The organization refactor (teamId → organizationId) broke session
isolation — sessions from all connections under the same org were
returned together. This adds required connectionId filtering to both
list and create session flows across the full stack.
@vercel
Copy link
Copy Markdown

vercel bot commented Apr 1, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
dory Ready Ready Preview, 💬 2 unresolved Apr 1, 2026 9:24am
2 Skipped Deployments
Project Deployment Actions Updated (UTC)
dory-admin Ignored Ignored Comment Apr 1, 2026 9:24am
dory-beta Ignored Ignored Comment Apr 1, 2026 9:24am

Request Review

@dory-finn dory-finn merged commit a180a7e into main Apr 1, 2026
4 of 6 checks passed
@solarhell solarhell deleted the fix/chat-sessions-filter-by-connection-id branch April 1, 2026 10:47
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