fix(chat): scope new-chat dashboard to familiar#3912
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Scopes the New Chat dashboard’s “Recent threads” and “Open work” to the currently selected familiar, preventing cross-familiar leakage of sessions, board cards, and inbox items.
Changes:
- Apply familiar scoping before deriving Open Work rows/counts/caps/empty states (Board + Needs-you).
- Use the shared
filterVisibleChatSessionsvisibility contract when deriving Recent threads for the selected familiar. - Preserve
familiarIdin the lean/api/boarddashboard-card projection and pin this behavior with tests.
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| tests/chat-boot-landing.spec.ts | Updates fixture to ensure landing only surfaces familiar-owned work. |
| src/components/home/use-dashboard-board.ts | Extends DashboardCard to retain familiarId from the Board API response. |
| src/components/home/dashboard-open-work.ts | Adds filterFamiliarOwned helper to scope work items to a familiar. |
| src/components/home/dashboard-open-work.test.ts | Adds unit coverage for exact-match familiar ownership filtering. |
| src/components/chat-new-dashboard.tsx | Scopes board/inbox open work + recent threads to the selected familiar. |
| src/components/chat-new-dashboard.test.ts | Adds contract-style assertions to prevent regressing familiar scoping and ownership retention. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
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.
Summary
Why
The New Chat dashboard consumed workspace-wide session, board, and inbox data, so selecting one familiar could surface another familiar’s chats or work.
Verification
node --experimental-strip-types src/components/home/dashboard-open-work.test.tsnode --experimental-strip-types src/components/chat-new-dashboard.test.tsnode --experimental-strip-types src/lib/chat-open-tasks.test.tspnpm check:tests-wiredpnpm typecheckpnpm lintpnpm test:app— 908 test files passedgit diff --checkAn initial full-suite run hit the documented load-sensitive
vault-ref-cold-startrace; that test passed in isolation and the complete rerun passed.Tracking:
cave-hxum1