Skip to content

fix(chat): scope new-chat dashboard to familiar#3912

Merged
BunsDev merged 8 commits into
mainfrom
fix/new-chat-familiar-scope
Jul 26, 2026
Merged

fix(chat): scope new-chat dashboard to familiar#3912
BunsDev merged 8 commits into
mainfrom
fix/new-chat-familiar-scope

Conversation

@BunsDev

@BunsDev BunsDev commented Jul 26, 2026

Copy link
Copy Markdown
Member

Summary

  • scope New Chat Recent threads to the selected familiar through the shared visible-session filter
  • scope Board and Needs-you open work before deriving counts, caps, links, and empty states
  • preserve familiar ownership in the lean dashboard-card projection and pin exact-match behavior

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.ts
  • node --experimental-strip-types src/components/chat-new-dashboard.test.ts
  • node --experimental-strip-types src/lib/chat-open-tasks.test.ts
  • pnpm check:tests-wired
  • pnpm typecheck
  • pnpm lint
  • pnpm test:app — 908 test files passed
  • git diff --check

An initial full-suite run hit the documented load-sensitive vault-ref-cold-start race; that test passed in isolation and the complete rerun passed.

Tracking: cave-hxum1

@BunsDev
BunsDev marked this pull request as ready for review July 26, 2026 20:01
Copilot AI review requested due to automatic review settings July 26, 2026 20:01

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 filterVisibleChatSessions visibility contract when deriving Recent threads for the selected familiar.
  • Preserve familiarId in the lean /api/board dashboard-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.

Comment thread src/components/chat-new-dashboard.tsx
@BunsDev
BunsDev merged commit c6d1ad4 into main Jul 26, 2026
15 checks passed
@BunsDev
BunsDev deleted the fix/new-chat-familiar-scope branch July 26, 2026 21:46
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