Repository navigation
Keep a person's chats inside the workspace they were started in - #65
Merged
Merged
Conversation
One person who belongs to two workspaces saw, opened and searched the chats of both: conversations were keyed by the participant alone. A conversation now records its workspace and every lookup of "the person's chats" filters by the current one. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WQ7RLkriGEGCWb5ydUfdzf
…nversations table name from config
This was referenced Nov 18, 2026
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
On a panel with workspaces, chats were keyed by the person alone, so someone who belongs to two workspaces saw, opened and searched one workspace's chats from the other, and the turn endpoint accepted them there. This is #62 by @Biz-lab-ai (their commit, unchanged), rebased onto 1.12.0, with one commit on top.
Change
agent_conversationsgets a nullabletenantcolumn;AgentConversationStore::conversationsOf()is the one query for a person's chats, filtered by the current workspace when there is oneconversationBelongsTo(), the chat list, search andAgentTurns::owned()check ittenantfor existing chats from their first turn that has one, so chats stay visible after the upgrade, and it reads the table name fromai.conversations.tables.conversationsUpgrading
Run
php artisan migrate. Apps without workspaces see no change.Tests
TenantWallTest(the wall, no-workspace apps, the backfill);PostedAndDeferredTestexpects the other workspace's chat to be refused. 132 passed.Supersedes #62.