Skip to content

Keep a person's chats inside the workspace they were started in - #65

Merged
icaliman merged 2 commits into
mainfrom
tenant-wall
Nov 18, 2026
Merged

icaliman merged 2 commits into
mainfrom
tenant-wall

Conversation

@icaliman

Copy link
Copy Markdown
Member

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_conversations gets a nullable tenant column; AgentConversationStore::conversationsOf() is the one query for a person's chats, filtered by the current workspace when there is one
  • New conversations record the workspace; conversationBelongsTo(), the chat list, search and AgentTurns::owned() check it
  • On top: the migration fills in tenant for existing chats from their first turn that has one, so chats stay visible after the upgrade, and it reads the table name from ai.conversations.tables.conversations

Upgrading

Run php artisan migrate. Apps without workspaces see no change.

Tests

TenantWallTest (the wall, no-workspace apps, the backfill); PostedAndDeferredTest expects the other workspace's chat to be refused. 132 passed.

Supersedes #62.

labbiz-1 and others added 2 commits November 18, 2026 21:32
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
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