diff --git a/prototypes/project-cube-orbit/app/buzz-project-prototype.tsx b/prototypes/project-cube-orbit/app/buzz-project-prototype.tsx index fdef2250dd..20613d83aa 100644 --- a/prototypes/project-cube-orbit/app/buzz-project-prototype.tsx +++ b/prototypes/project-cube-orbit/app/buzz-project-prototype.tsx @@ -1,19 +1,28 @@ "use client"; import { useEffect, useId, useRef, useState } from "react"; -import type { CSSProperties, MutableRefObject, PointerEvent as ReactPointerEvent } from "react"; +import type { CSSProperties, MutableRefObject, PointerEvent as ReactPointerEvent, ReactNode } from "react"; import { ArrowUp, AtSign, + Check, ChevronDown, + ChevronLeft, + ChevronRight, + ClipboardList, + GitBranch, + FileText, Hash, Headphones, LockKeyhole, + MessageSquareText, + MoreHorizontal, MoreVertical, Paperclip, PanelRightOpen, Plus, Search, + SlidersHorizontal, SmilePlus, SquareDashed, Users, @@ -25,6 +34,47 @@ import type { ProjectArtifactState, } from "./berd-project-cube/types"; +type SegmentedNavigationItem = { + value: T; + label: string; + badge?: number; +}; + +function SegmentedNavigation({ + activeValue, + ariaLabel, + items, + itemWidth = 88, + onChange, + trailing, +}: { + activeValue: T; + ariaLabel: string; + items: SegmentedNavigationItem[]; + itemWidth?: number; + onChange: (value: T) => void; + trailing?: ReactNode; +}) { + const activeIndex = Math.max(0, items.findIndex((item) => item.value === activeValue)); + const style = { + "--segmented-item-width": `${itemWidth}px`, + "--segmented-active-offset": `${activeIndex * (itemWidth + 2)}px`, + } as CSSProperties; + + return ( + + ); +} + const PRIMARY_PROJECT_STATE: ProjectArtifactState = { seed: 381, name: "Buzz navigation", @@ -165,6 +215,24 @@ type ProjectDefinition = { tasks: readonly TaskNoodle[]; }; +type ProjectWorkspaceTab = "overview" | "tasks" | "activity"; +type ProjectUtility = "remote" | "repository" | "terminal" | "files" | "contributors"; + +const PROJECT_WORKSPACE_DETAILS: Record = { + berd: { description: "A composable workspace for projects, messages, agents, and the work between them.", milestone: "Berd Strategy v2", channel: "#buzz-interface-squad", progress: 68, blockers: 2 }, + goose: { description: "A focused environment for creating, coordinating, and evaluating a new generation of workspace agents.", milestone: "Agent workspace beta", channel: "#agent-experience", progress: 54, blockers: 3 }, + buzz: { description: "Explorations for making project work spatial, expressive, and easier to move through at a glance.", milestone: "Prototype review", channel: "#blue-sky", progress: 81, blockers: 1 }, + relay: { description: "Reliable handoffs between people and agents with clear ownership, history, and recovery paths.", milestone: "Handoff pilot", channel: "#relay", progress: 46, blockers: 4 }, + atlas: { description: "A living map of research evidence, decisions, open questions, and the assumptions behind them.", milestone: "Research digest", channel: "#atlas-research", progress: 72, blockers: 1 }, + lantern: { description: "A shared launch room that keeps owners, dependencies, narrative, and readiness in one place.", milestone: "Launch readiness", channel: "#lantern-launch", progress: 62, blockers: 2 }, +}; + const PROJECTS: readonly ProjectDefinition[] = [ { key: "berd", name: "Berd", state: PRIMARY_PROJECT_STATE, imageUrls: PRIMARY_IMAGE_URLS, tasks: PRIMARY_TASKS }, { key: "goose", name: "Goose", state: SECONDARY_PROJECT_STATE, imageUrls: SECONDARY_IMAGE_URLS, tasks: GOOSE_PROJECT_TASKS }, @@ -563,7 +631,7 @@ function WrappedTaskLabels({ ) => { const drag = dragRef.current; if (!drag || drag.index !== taskIndex) return; - if (event.currentTarget.hasPointerCapture(event.pointerId)) { + if (event.currentTarget instanceof Element && event.currentTarget.hasPointerCapture(event.pointerId)) { event.currentTarget.releasePointerCapture(event.pointerId); } dragRef.current = null; @@ -711,10 +779,169 @@ function ProjectOrbit({ ); } -function ProjectsView() { +function ProjectWorkspace({ + project, + activeTab, + connectedTaskId, + selectedTaskId, + taskPanelClosing, + utility, + onBack, + onSelectTab, + onSelectTask, + onSelectUtility, +}: { + project: ProjectDefinition; + activeTab: ProjectWorkspaceTab; + connectedTaskId: string | null; + selectedTaskId: string | null; + taskPanelClosing: boolean; + utility: ProjectUtility; + onBack: () => void; + onSelectTab: (tab: ProjectWorkspaceTab) => void; + onSelectTask: (taskId: string | null) => void; + onSelectUtility: (utility: ProjectUtility) => void; +}) { + const detail = PROJECT_WORKSPACE_DETAILS[project.key] ?? PROJECT_WORKSPACE_DETAILS.berd; + const selectedTask = project.tasks.find((task) => task.id === selectedTaskId) ?? null; + const contextIdFor = (taskId: string) => `project:${project.key}:${taskId}`; + const connectedClassFor = (taskId: string) => connectedTaskId === taskId ? " is-bestie-connected" : ""; + const completedTasks = Math.max(3, Math.round((project.tasks.length + 42) * (detail.progress / 100))); + const utilityItems: Array<{ id: ProjectUtility; label: string }> = [ + { id: "remote", label: "Remote" }, + { id: "repository", label: "Main" }, + { id: "terminal", label: "Terminal" }, + { id: "files", label: "Files" }, + { id: "contributors", label: "Contributors" }, + ]; + const forYou = [ + { text: `Arj merged a PR to update ${project.name} agent avatars`, time: "30min" }, + { text: `Tulsi requested review on ${project.tasks[0]?.label ?? "the lead task"}`, time: "3h" }, + { text: `Morgan, Taylor, and Jude are discussing ${detail.milestone}`, time: "Yesterday" }, + { text: `Kenny merged a fix mentioned in ${detail.channel}`, time: "Aug 28, 2026" }, + ]; + const activity = [ + { text: "PR #482 merged into main", time: "12m", ref: "cynthiac/project-workspace-motion", actor: "Cynthia Chen · 7 commits" }, + { text: "Requested review on PR #479", time: "1h", ref: "tulsi/task-panel-polish", actor: "Tulsi · 3 reviewers" }, + { text: `Pushed 3 commits to ${detail.milestone}`, time: "3h", ref: "feature/glassy-project-panels", actor: "Morgan Martin" }, + { text: `Opened PR #475 to update ${project.name} agent avatars`, time: "Yesterday", ref: "arj/agent-avatar-shapes", actor: "Arj · ready for review" }, + { text: "Branch created from main", time: "Aug 28", ref: "kenny/fix-project-overflow", actor: "Kenny Lopez" }, + { text: `Project context refreshed from ${detail.channel}`, time: "Aug 27", ref: "main", actor: "Bestie" }, + ]; + + return ( +
+
+
+
+
+ + / + {detail.milestone} +
+ +
+ +
+ {activeTab === "overview" ? ( +
+
+

{detail.description}

+
+ Team +
{["C", "M", "T", "A", "J", "K"].map((person) => {person})}
+
+
+ +
+
Progress{completedTasks} of {project.tasks.length + 42} tasks complete
+
Milestone{detail.milestone}
+
Open blockers{detail.blockers} items need attention
+
+ +
+

For you

+ {forYou.map((item, index) => { + const task = project.tasks[index % project.tasks.length]; + return ; + })} +
+
+ ) : null} + + {activeTab === "tasks" ? ( +
+

All tasks

Work across {project.name}, grouped in one place.

+
+ {project.tasks.map((task) => ( +
+ +
+ ))} +
+
+ ) : null} + + {activeTab === "activity" ? ( +
+

Project activity

Decisions, handoffs, builds, and task changes.

+
+ {activity.map((item) => ( +