@@ -58,6 +58,7 @@ import { useSearchScrollRestoration } from "../workspace/useSearchScrollRestorat
5858import { useThreadJumpShortcuts } from "../keyboard/threadKeyboardShortcuts" ;
5959import { usePendingThreadOrder } from "../../state/thread-order" ;
6060import { threadListEnvironmentsAtom } from "../../state/presentation" ;
61+ import { useTeamViewers } from "../../state/team" ;
6162import type { PendingNewTask } from "../../state/use-pending-new-tasks" ;
6263import { useQueuedThreadKeys } from "../../state/use-thread-outbox" ;
6364import {
@@ -66,6 +67,7 @@ import {
6667 ThreadListV2SettledShelfHeader ,
6768 ThreadListV2ShowMoreRow ,
6869 ThreadListV2SnoozedShelfHeader ,
70+ ThreadListV2TeamShelfHeader ,
6971 ThreadListV2WorkingShelfHeader ,
7072} from "../threads/thread-list-v2-items" ;
7173import { useThreadRowProviderInstanceResolver } from "../threads/thread-provider-instance" ;
@@ -433,12 +435,15 @@ export function HomeScreen(props: HomeScreenProps) {
433435 loaded : shelfPreferencesLoaded ,
434436 settledShelfExpanded,
435437 snoozedShelfExpanded,
438+ teamShelfExpanded,
436439 workingShelfEnabled,
437440 workingShelfExpanded,
438441 toggleSettledShelf,
439442 toggleSnoozedShelf,
443+ toggleTeamShelf,
440444 toggleWorkingShelf,
441445 } = useThreadListV2ShelfPreferences ( ) ;
446+ const teamViewers = useTeamViewers ( ) ;
442447 const now = useThreadListNow ( props . threads ) ;
443448 const listEnvironments = useAtomValue ( threadListEnvironmentsAtom ) ;
444449 const {
@@ -478,8 +483,10 @@ export function HomeScreen(props: HomeScreenProps) {
478483 shelfPreferencesLoaded,
479484 workingShelfEnabled,
480485 workingShelfExpanded,
486+ teamShelfExpanded,
481487 snoozedShelfExpanded,
482488 settledShelfExpanded,
489+ teamViewers,
483490 selectedThreadKey,
484491 } ) ;
485492 // Called as `props.onSelectThread(...)`, the compiler would cache this handler on the whole
@@ -550,6 +557,16 @@ export function HomeScreen(props: HomeScreenProps) {
550557 />
551558 ) ;
552559 }
560+ if ( item . type === "v2-team-shelf" ) {
561+ return (
562+ < ThreadListV2TeamShelfHeader
563+ count = { item . count }
564+ disabled = { item . disabled }
565+ expanded = { item . expanded }
566+ onToggle = { toggleTeamShelf }
567+ />
568+ ) ;
569+ }
553570 if ( item . type === "v2-snoozed-shelf" ) {
554571 return (
555572 < ThreadListV2SnoozedShelfHeader
@@ -583,6 +600,8 @@ export function HomeScreen(props: HomeScreenProps) {
583600 snoozed = { item . item . snoozed }
584601 pinned = { item . item . pinned }
585602 wokeAt = { item . item . wokeAt }
603+ owner = { item . item . owner }
604+ team = { item . item . team }
586605 snoozePresetMinute = { item . snoozePresetMinute ?? "" }
587606 snoozeWakeLabelText = { item . snoozeWakeLabelText }
588607 timeLabel = { item . timeLabel }
0 commit comments