prjct-cli 0.18.2 → 0.20.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +82 -0
- package/CLAUDE.md +74 -211
- package/core/agentic/prompt-builder.ts +3 -7
- package/core/command-registry/optional-commands.ts +0 -20
- package/core/infrastructure/command-installer/command-installer.ts +8 -1
- package/core/infrastructure/command-installer/global-config.ts +31 -1
- package/core/infrastructure/command-installer/index.ts +1 -1
- package/core/infrastructure/setup.ts +3 -0
- package/package.json +3 -17
- package/templates/agentic/agents/uxui.md +210 -0
- package/templates/commands/bug.md +219 -41
- package/templates/commands/done.md +57 -258
- package/templates/commands/feature.md +368 -80
- package/templates/commands/now.md +72 -277
- package/templates/commands/ship.md +167 -246
- package/templates/commands/sync.md +62 -3
- package/templates/commands/test.md +160 -20
- package/templates/global/CLAUDE.md +40 -205
- package/templates/global/docs/agents.md +88 -0
- package/templates/global/docs/architecture.md +103 -0
- package/templates/global/docs/commands.md +98 -0
- package/templates/global/docs/validation.md +95 -0
- package/bin/dev.js +0 -216
- package/bin/serve.js +0 -361
- package/packages/web/README.md +0 -36
- package/packages/web/app/api/claude/sessions/route.ts +0 -44
- package/packages/web/app/api/claude/status/route.ts +0 -34
- package/packages/web/app/api/projects/[id]/icon/route.ts +0 -33
- package/packages/web/app/api/projects/[id]/momentum/route.ts +0 -257
- package/packages/web/app/api/projects/[id]/route.ts +0 -29
- package/packages/web/app/api/projects/[id]/stats/route.ts +0 -41
- package/packages/web/app/api/projects/[id]/status/route.ts +0 -21
- package/packages/web/app/api/projects/route.ts +0 -16
- package/packages/web/app/api/sessions/current/route.ts +0 -132
- package/packages/web/app/api/sessions/history/route.ts +0 -204
- package/packages/web/app/error.tsx +0 -34
- package/packages/web/app/favicon.ico +0 -0
- package/packages/web/app/globals.css +0 -198
- package/packages/web/app/layout.tsx +0 -53
- package/packages/web/app/loading.tsx +0 -7
- package/packages/web/app/not-found.tsx +0 -25
- package/packages/web/app/page.tsx +0 -12
- package/packages/web/app/project/[id]/code/layout.tsx +0 -18
- package/packages/web/app/project/[id]/code/page.tsx +0 -408
- package/packages/web/app/project/[id]/error.tsx +0 -41
- package/packages/web/app/project/[id]/loading.tsx +0 -9
- package/packages/web/app/project/[id]/not-found.tsx +0 -27
- package/packages/web/app/project/[id]/page.tsx +0 -384
- package/packages/web/app/project/[id]/reports/page.tsx +0 -59
- package/packages/web/app/project/[id]/reports/print/page.tsx +0 -58
- package/packages/web/app/sessions/page.tsx +0 -165
- package/packages/web/app/settings/page.tsx +0 -151
- package/packages/web/components/ActivityTimeline/ActivityTimeline.constants.ts +0 -2
- package/packages/web/components/ActivityTimeline/ActivityTimeline.tsx +0 -49
- package/packages/web/components/ActivityTimeline/ActivityTimeline.types.ts +0 -8
- package/packages/web/components/ActivityTimeline/hooks/index.ts +0 -2
- package/packages/web/components/ActivityTimeline/hooks/useExpandable.ts +0 -9
- package/packages/web/components/ActivityTimeline/hooks/useGroupedEvents.ts +0 -23
- package/packages/web/components/ActivityTimeline/index.ts +0 -2
- package/packages/web/components/AgentsCard/AgentsCard.tsx +0 -93
- package/packages/web/components/AgentsCard/AgentsCard.types.ts +0 -14
- package/packages/web/components/AgentsCard/index.ts +0 -2
- package/packages/web/components/AppSidebar/AppSidebar.tsx +0 -316
- package/packages/web/components/AppSidebar/index.ts +0 -1
- package/packages/web/components/BackLink/BackLink.tsx +0 -18
- package/packages/web/components/BackLink/BackLink.types.ts +0 -5
- package/packages/web/components/BackLink/index.ts +0 -2
- package/packages/web/components/BentoCard/BentoCard.constants.ts +0 -16
- package/packages/web/components/BentoCard/BentoCard.tsx +0 -48
- package/packages/web/components/BentoCard/BentoCard.types.ts +0 -15
- package/packages/web/components/BentoCard/index.ts +0 -2
- package/packages/web/components/BentoCardSkeleton/BentoCardSkeleton.constants.ts +0 -9
- package/packages/web/components/BentoCardSkeleton/BentoCardSkeleton.tsx +0 -18
- package/packages/web/components/BentoCardSkeleton/BentoCardSkeleton.types.ts +0 -5
- package/packages/web/components/BentoCardSkeleton/index.ts +0 -2
- package/packages/web/components/BentoGrid/BentoGrid.tsx +0 -18
- package/packages/web/components/BentoGrid/BentoGrid.types.ts +0 -4
- package/packages/web/components/BentoGrid/index.ts +0 -2
- package/packages/web/components/BlockersCard/BlockersCard.tsx +0 -75
- package/packages/web/components/BlockersCard/BlockersCard.types.ts +0 -12
- package/packages/web/components/BlockersCard/index.ts +0 -2
- package/packages/web/components/CommandBar/CommandBar.tsx +0 -67
- package/packages/web/components/CommandBar/index.ts +0 -1
- package/packages/web/components/CommandButton/CommandButton.tsx +0 -46
- package/packages/web/components/CommandButton/index.ts +0 -1
- package/packages/web/components/ConnectionStatus/ConnectionStatus.tsx +0 -29
- package/packages/web/components/ConnectionStatus/index.ts +0 -1
- package/packages/web/components/DashboardContent/DashboardContent.tsx +0 -284
- package/packages/web/components/DashboardContent/index.ts +0 -1
- package/packages/web/components/DateGroup/DateGroup.tsx +0 -18
- package/packages/web/components/DateGroup/DateGroup.types.ts +0 -6
- package/packages/web/components/DateGroup/DateGroup.utils.ts +0 -11
- package/packages/web/components/DateGroup/index.ts +0 -2
- package/packages/web/components/EmptyState/EmptyState.tsx +0 -76
- package/packages/web/components/EmptyState/EmptyState.types.ts +0 -11
- package/packages/web/components/EmptyState/index.ts +0 -2
- package/packages/web/components/EventRow/EventRow.constants.ts +0 -10
- package/packages/web/components/EventRow/EventRow.tsx +0 -49
- package/packages/web/components/EventRow/EventRow.types.ts +0 -7
- package/packages/web/components/EventRow/EventRow.utils.ts +0 -49
- package/packages/web/components/EventRow/index.ts +0 -2
- package/packages/web/components/ExpandButton/ExpandButton.tsx +0 -18
- package/packages/web/components/ExpandButton/ExpandButton.types.ts +0 -6
- package/packages/web/components/ExpandButton/index.ts +0 -2
- package/packages/web/components/HealthGradientBackground/HealthGradientBackground.tsx +0 -14
- package/packages/web/components/HealthGradientBackground/HealthGradientBackground.types.ts +0 -5
- package/packages/web/components/HealthGradientBackground/HealthGradientBackground.utils.ts +0 -13
- package/packages/web/components/HealthGradientBackground/index.ts +0 -2
- package/packages/web/components/HeroSection/HeroSection.tsx +0 -92
- package/packages/web/components/HeroSection/HeroSection.types.ts +0 -14
- package/packages/web/components/HeroSection/HeroSection.utils.ts +0 -11
- package/packages/web/components/HeroSection/hooks/index.ts +0 -2
- package/packages/web/components/HeroSection/hooks/useCountUp.ts +0 -45
- package/packages/web/components/HeroSection/hooks/useWeeklyActivity.ts +0 -18
- package/packages/web/components/HeroSection/index.ts +0 -2
- package/packages/web/components/IdeasCard/IdeasCard.tsx +0 -115
- package/packages/web/components/IdeasCard/IdeasCard.types.ts +0 -10
- package/packages/web/components/IdeasCard/index.ts +0 -2
- package/packages/web/components/InsightMessage/InsightMessage.tsx +0 -9
- package/packages/web/components/InsightMessage/InsightMessage.types.ts +0 -3
- package/packages/web/components/InsightMessage/index.ts +0 -2
- package/packages/web/components/Logo/Logo.tsx +0 -65
- package/packages/web/components/Logo/index.ts +0 -1
- package/packages/web/components/MarkdownContent/MarkdownContent.tsx +0 -123
- package/packages/web/components/MarkdownContent/index.ts +0 -1
- package/packages/web/components/MasonryGrid/MasonryGrid.tsx +0 -18
- package/packages/web/components/MasonryGrid/index.ts +0 -1
- package/packages/web/components/MomentumWidget/MomentumWidget.tsx +0 -119
- package/packages/web/components/MomentumWidget/MomentumWidget.types.ts +0 -16
- package/packages/web/components/MomentumWidget/index.ts +0 -2
- package/packages/web/components/NowCard/NowCard.tsx +0 -118
- package/packages/web/components/NowCard/NowCard.types.ts +0 -16
- package/packages/web/components/NowCard/index.ts +0 -2
- package/packages/web/components/PageHeader/PageHeader.tsx +0 -24
- package/packages/web/components/PageHeader/index.ts +0 -1
- package/packages/web/components/ProgressRing/ProgressRing.constants.ts +0 -20
- package/packages/web/components/ProgressRing/ProgressRing.tsx +0 -51
- package/packages/web/components/ProgressRing/ProgressRing.types.ts +0 -11
- package/packages/web/components/ProgressRing/index.ts +0 -2
- package/packages/web/components/ProjectAvatar/ProjectAvatar.tsx +0 -54
- package/packages/web/components/ProjectAvatar/index.ts +0 -1
- package/packages/web/components/ProjectColorDot/ProjectColorDot.tsx +0 -37
- package/packages/web/components/ProjectColorDot/index.ts +0 -1
- package/packages/web/components/ProjectSelectorModal/ProjectSelectorModal.tsx +0 -104
- package/packages/web/components/ProjectSelectorModal/index.ts +0 -1
- package/packages/web/components/Providers/Providers.tsx +0 -48
- package/packages/web/components/Providers/index.ts +0 -1
- package/packages/web/components/QueueCard/QueueCard.tsx +0 -125
- package/packages/web/components/QueueCard/QueueCard.types.ts +0 -12
- package/packages/web/components/QueueCard/QueueCard.utils.ts +0 -12
- package/packages/web/components/QueueCard/index.ts +0 -2
- package/packages/web/components/RecoverCard/RecoverCard.tsx +0 -72
- package/packages/web/components/RecoverCard/RecoverCard.types.ts +0 -16
- package/packages/web/components/RecoverCard/index.ts +0 -2
- package/packages/web/components/RoadmapCard/RoadmapCard.tsx +0 -145
- package/packages/web/components/RoadmapCard/RoadmapCard.types.ts +0 -16
- package/packages/web/components/RoadmapCard/index.ts +0 -2
- package/packages/web/components/ShipsCard/ShipsCard.tsx +0 -95
- package/packages/web/components/ShipsCard/ShipsCard.types.ts +0 -14
- package/packages/web/components/ShipsCard/ShipsCard.utils.ts +0 -4
- package/packages/web/components/ShipsCard/index.ts +0 -2
- package/packages/web/components/SparklineChart/SparklineChart.tsx +0 -40
- package/packages/web/components/SparklineChart/SparklineChart.types.ts +0 -6
- package/packages/web/components/SparklineChart/index.ts +0 -2
- package/packages/web/components/StatsMasonry/StatsMasonry.tsx +0 -95
- package/packages/web/components/StatsMasonry/index.ts +0 -1
- package/packages/web/components/StreakCard/StreakCard.constants.ts +0 -2
- package/packages/web/components/StreakCard/StreakCard.tsx +0 -55
- package/packages/web/components/StreakCard/StreakCard.types.ts +0 -4
- package/packages/web/components/StreakCard/index.ts +0 -2
- package/packages/web/components/TasksCounter/TasksCounter.tsx +0 -14
- package/packages/web/components/TasksCounter/TasksCounter.types.ts +0 -3
- package/packages/web/components/TasksCounter/index.ts +0 -2
- package/packages/web/components/TechStackBadges/TechStackBadges.tsx +0 -28
- package/packages/web/components/TechStackBadges/index.ts +0 -1
- package/packages/web/components/TerminalDock/DockToggleTab.tsx +0 -29
- package/packages/web/components/TerminalDock/TerminalDock.tsx +0 -386
- package/packages/web/components/TerminalDock/TerminalDockTab.tsx +0 -130
- package/packages/web/components/TerminalDock/TerminalTabBar.tsx +0 -142
- package/packages/web/components/TerminalDock/index.ts +0 -2
- package/packages/web/components/TerminalTabs/TerminalTab.tsx +0 -95
- package/packages/web/components/TerminalTabs/TerminalTabs.tsx +0 -211
- package/packages/web/components/TerminalTabs/index.ts +0 -1
- package/packages/web/components/VelocityBadge/VelocityBadge.tsx +0 -32
- package/packages/web/components/VelocityBadge/VelocityBadge.types.ts +0 -3
- package/packages/web/components/VelocityBadge/index.ts +0 -2
- package/packages/web/components/VelocityCard/VelocityCard.tsx +0 -73
- package/packages/web/components/VelocityCard/VelocityCard.types.ts +0 -7
- package/packages/web/components/VelocityCard/index.ts +0 -2
- package/packages/web/components/WeeklyReports/PrintableReport.tsx +0 -259
- package/packages/web/components/WeeklyReports/ReportPreviewCard.tsx +0 -187
- package/packages/web/components/WeeklyReports/WeekCalendar.tsx +0 -288
- package/packages/web/components/WeeklyReports/WeeklyReports.tsx +0 -149
- package/packages/web/components/WeeklyReports/index.ts +0 -4
- package/packages/web/components/WeeklySparkline/WeeklySparkline.tsx +0 -25
- package/packages/web/components/WeeklySparkline/WeeklySparkline.types.ts +0 -4
- package/packages/web/components/WeeklySparkline/index.ts +0 -2
- package/packages/web/components/charts/SessionsChart.tsx +0 -175
- package/packages/web/components/ui/alert-dialog.tsx +0 -157
- package/packages/web/components/ui/badge.tsx +0 -46
- package/packages/web/components/ui/button.tsx +0 -60
- package/packages/web/components/ui/card.tsx +0 -92
- package/packages/web/components/ui/chart.tsx +0 -385
- package/packages/web/components/ui/dialog.tsx +0 -143
- package/packages/web/components/ui/drawer.tsx +0 -135
- package/packages/web/components/ui/dropdown-menu.tsx +0 -257
- package/packages/web/components/ui/input.tsx +0 -21
- package/packages/web/components/ui/scroll-area.tsx +0 -58
- package/packages/web/components/ui/select.tsx +0 -187
- package/packages/web/components/ui/sheet.tsx +0 -139
- package/packages/web/components/ui/tabs.tsx +0 -66
- package/packages/web/components/ui/tooltip.tsx +0 -61
- package/packages/web/components.json +0 -22
- package/packages/web/context/GlobalTerminalContext.tsx +0 -538
- package/packages/web/context/TerminalContext.tsx +0 -45
- package/packages/web/context/TerminalTabsContext.tsx +0 -181
- package/packages/web/eslint.config.mjs +0 -18
- package/packages/web/hooks/useClaudeTerminal.ts +0 -425
- package/packages/web/hooks/useProjectStats.ts +0 -93
- package/packages/web/hooks/useProjects.ts +0 -73
- package/packages/web/lib/actions/projects.ts +0 -15
- package/packages/web/lib/commands.ts +0 -81
- package/packages/web/lib/format.ts +0 -23
- package/packages/web/lib/generate-week-report.ts +0 -285
- package/packages/web/lib/parse-prjct-files.ts +0 -1123
- package/packages/web/lib/project-colors.ts +0 -58
- package/packages/web/lib/projects.ts +0 -506
- package/packages/web/lib/pty.ts +0 -101
- package/packages/web/lib/query-config.ts +0 -44
- package/packages/web/lib/services/index.ts +0 -9
- package/packages/web/lib/services/projects.server.ts +0 -66
- package/packages/web/lib/services/stats.server.ts +0 -562
- package/packages/web/lib/unified-loader.ts +0 -396
- package/packages/web/lib/utils.ts +0 -6
- package/packages/web/next-env.d.ts +0 -6
- package/packages/web/next.config.ts +0 -7
- package/packages/web/package.json +0 -57
- package/packages/web/postcss.config.mjs +0 -7
- package/packages/web/public/file.svg +0 -1
- package/packages/web/public/globe.svg +0 -1
- package/packages/web/public/next.svg +0 -1
- package/packages/web/public/vercel.svg +0 -1
- package/packages/web/public/window.svg +0 -1
- package/packages/web/server.ts +0 -312
- package/packages/web/tsconfig.json +0 -34
- package/templates/commands/serve.md +0 -121
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { AppSidebar, MobileHeaderSpacer } from './AppSidebar'
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import Link from 'next/link'
|
|
2
|
-
import { ArrowLeft } from 'lucide-react'
|
|
3
|
-
import { cn } from '@/lib/utils'
|
|
4
|
-
import type { BackLinkProps } from './BackLink.types'
|
|
5
|
-
|
|
6
|
-
export function BackLink({ projectId, projectName, className }: BackLinkProps) {
|
|
7
|
-
return (
|
|
8
|
-
<div className={cn('relative flex', className)}>
|
|
9
|
-
<Link
|
|
10
|
-
href={`/project/${projectId}`}
|
|
11
|
-
className="flex items-center gap-2 text-sm text-muted-foreground hover:text-foreground transition-colors min-h-[44px]"
|
|
12
|
-
>
|
|
13
|
-
<ArrowLeft className="w-4 h-4" />
|
|
14
|
-
{projectName}
|
|
15
|
-
</Link>
|
|
16
|
-
</div>
|
|
17
|
-
)
|
|
18
|
-
}
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import type { AccentColor, BentoSize } from './BentoCard.types'
|
|
2
|
-
|
|
3
|
-
export const BENTO_SIZE_CLASSES: Record<BentoSize, string> = {
|
|
4
|
-
'1x1': 'col-span-1 row-span-1',
|
|
5
|
-
'1x2': 'col-span-1 row-span-2',
|
|
6
|
-
'2x1': 'col-span-1 sm:col-span-2 row-span-1',
|
|
7
|
-
'2x2': 'col-span-1 sm:col-span-2 row-span-2',
|
|
8
|
-
'full': 'col-span-1 sm:col-span-2 lg:col-span-full',
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
export const ACCENT_STYLES: Record<AccentColor, string> = {
|
|
12
|
-
default: '',
|
|
13
|
-
success: 'border-muted-foreground/20',
|
|
14
|
-
warning: 'border-muted-foreground/20',
|
|
15
|
-
destructive: 'border-muted-foreground/20',
|
|
16
|
-
}
|
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
import { cn } from '@/lib/utils'
|
|
2
|
-
import { BENTO_SIZE_CLASSES, ACCENT_STYLES } from './BentoCard.constants'
|
|
3
|
-
import type { BentoCardProps } from './BentoCard.types'
|
|
4
|
-
|
|
5
|
-
export function BentoCard({
|
|
6
|
-
size = '1x1',
|
|
7
|
-
title,
|
|
8
|
-
count,
|
|
9
|
-
icon: Icon,
|
|
10
|
-
accentColor = 'default',
|
|
11
|
-
className,
|
|
12
|
-
headerClassName,
|
|
13
|
-
children,
|
|
14
|
-
}: BentoCardProps) {
|
|
15
|
-
return (
|
|
16
|
-
<div
|
|
17
|
-
className={cn(
|
|
18
|
-
'relative overflow-hidden rounded-xl border bg-card transition-all duration-200',
|
|
19
|
-
'p-3 sm:p-4',
|
|
20
|
-
'hover:shadow-md hover:border-foreground/20',
|
|
21
|
-
'active:scale-[0.99]',
|
|
22
|
-
'min-w-0 max-w-full',
|
|
23
|
-
BENTO_SIZE_CLASSES[size],
|
|
24
|
-
ACCENT_STYLES[accentColor],
|
|
25
|
-
className
|
|
26
|
-
)}
|
|
27
|
-
>
|
|
28
|
-
{(title || count !== undefined || Icon) && (
|
|
29
|
-
<div className={cn('flex items-center justify-between mb-2 sm:mb-3', headerClassName)}>
|
|
30
|
-
<div className="flex items-center gap-2">
|
|
31
|
-
{Icon && <Icon className="h-4 w-4 sm:h-3.5 sm:w-3.5 text-muted-foreground" />}
|
|
32
|
-
{title && (
|
|
33
|
-
<span className="text-xs font-bold uppercase tracking-wider text-muted-foreground">
|
|
34
|
-
{title}
|
|
35
|
-
</span>
|
|
36
|
-
)}
|
|
37
|
-
</div>
|
|
38
|
-
{count !== undefined && (
|
|
39
|
-
<span className="text-sm sm:text-xs font-medium text-muted-foreground tabular-nums">
|
|
40
|
-
{count}
|
|
41
|
-
</span>
|
|
42
|
-
)}
|
|
43
|
-
</div>
|
|
44
|
-
)}
|
|
45
|
-
{children}
|
|
46
|
-
</div>
|
|
47
|
-
)
|
|
48
|
-
}
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import type { LucideIcon } from 'lucide-react'
|
|
2
|
-
|
|
3
|
-
export type BentoSize = '1x1' | '1x2' | '2x1' | '2x2' | 'full'
|
|
4
|
-
export type AccentColor = 'default' | 'success' | 'warning' | 'destructive'
|
|
5
|
-
|
|
6
|
-
export interface BentoCardProps {
|
|
7
|
-
size?: BentoSize
|
|
8
|
-
title?: string
|
|
9
|
-
count?: number | string
|
|
10
|
-
icon?: LucideIcon
|
|
11
|
-
accentColor?: AccentColor
|
|
12
|
-
className?: string
|
|
13
|
-
headerClassName?: string
|
|
14
|
-
children: React.ReactNode
|
|
15
|
-
}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import type { BentoSize } from './BentoCardSkeleton.types'
|
|
2
|
-
|
|
3
|
-
export const BENTO_SIZE_CLASSES: Record<BentoSize, string> = {
|
|
4
|
-
'1x1': 'col-span-1 row-span-1',
|
|
5
|
-
'1x2': 'col-span-1 row-span-2',
|
|
6
|
-
'2x1': 'col-span-1 sm:col-span-2 row-span-1',
|
|
7
|
-
'2x2': 'col-span-1 sm:col-span-2 row-span-2',
|
|
8
|
-
'full': 'col-span-1 sm:col-span-2 lg:col-span-full',
|
|
9
|
-
}
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { cn } from '@/lib/utils'
|
|
2
|
-
import { BENTO_SIZE_CLASSES } from './BentoCardSkeleton.constants'
|
|
3
|
-
import type { BentoCardSkeletonProps } from './BentoCardSkeleton.types'
|
|
4
|
-
|
|
5
|
-
export function BentoCardSkeleton({ size = '1x1' }: BentoCardSkeletonProps) {
|
|
6
|
-
return (
|
|
7
|
-
<div
|
|
8
|
-
className={cn(
|
|
9
|
-
'rounded-xl border bg-card p-4 animate-pulse',
|
|
10
|
-
BENTO_SIZE_CLASSES[size]
|
|
11
|
-
)}
|
|
12
|
-
>
|
|
13
|
-
<div className="h-3 w-16 bg-muted rounded mb-3" />
|
|
14
|
-
<div className="h-6 w-24 bg-muted rounded mb-2" />
|
|
15
|
-
<div className="h-3 w-full bg-muted rounded" />
|
|
16
|
-
</div>
|
|
17
|
-
)
|
|
18
|
-
}
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { cn } from '@/lib/utils'
|
|
2
|
-
import type { BentoGridProps } from './BentoGrid.types'
|
|
3
|
-
|
|
4
|
-
export function BentoGrid({ className, children }: BentoGridProps) {
|
|
5
|
-
return (
|
|
6
|
-
<div
|
|
7
|
-
className={cn(
|
|
8
|
-
'grid',
|
|
9
|
-
'gap-3 sm:gap-4',
|
|
10
|
-
'grid-cols-1 sm:grid-cols-2 lg:grid-cols-3',
|
|
11
|
-
'auto-rows-[minmax(160px,auto)] sm:auto-rows-[minmax(180px,auto)]',
|
|
12
|
-
className
|
|
13
|
-
)}
|
|
14
|
-
>
|
|
15
|
-
{children}
|
|
16
|
-
</div>
|
|
17
|
-
)
|
|
18
|
-
}
|
|
@@ -1,75 +0,0 @@
|
|
|
1
|
-
'use client'
|
|
2
|
-
|
|
3
|
-
import { useState } from 'react'
|
|
4
|
-
import { AlertTriangle, Clock, CheckCircle2 } from 'lucide-react'
|
|
5
|
-
import { ExpandButton } from '@/components/ExpandButton'
|
|
6
|
-
import { cn } from '@/lib/utils'
|
|
7
|
-
import type { BlockersCardProps } from './BlockersCard.types'
|
|
8
|
-
|
|
9
|
-
const COLLAPSED_LIMIT = 5
|
|
10
|
-
|
|
11
|
-
export function BlockersCard({ blockers, codeHref, className }: BlockersCardProps) {
|
|
12
|
-
const [expanded, setExpanded] = useState(false)
|
|
13
|
-
const hasBlockers = blockers.length > 0
|
|
14
|
-
const displayBlockers = expanded ? blockers : blockers.slice(0, COLLAPSED_LIMIT)
|
|
15
|
-
const hasMore = blockers.length > COLLAPSED_LIMIT
|
|
16
|
-
|
|
17
|
-
return (
|
|
18
|
-
<div className={cn(
|
|
19
|
-
'relative overflow-hidden rounded-xl border bg-card p-4',
|
|
20
|
-
className
|
|
21
|
-
)}>
|
|
22
|
-
<div className="flex items-center justify-between mb-3">
|
|
23
|
-
<div className="flex items-center gap-2">
|
|
24
|
-
<AlertTriangle className="h-4 w-4 text-muted-foreground" />
|
|
25
|
-
<span className="text-xs font-bold uppercase tracking-[0.15em] text-muted-foreground">
|
|
26
|
-
Blockers
|
|
27
|
-
</span>
|
|
28
|
-
</div>
|
|
29
|
-
{hasBlockers && (
|
|
30
|
-
<span className="text-xs font-bold text-muted-foreground tabular-nums">
|
|
31
|
-
{blockers.length}
|
|
32
|
-
</span>
|
|
33
|
-
)}
|
|
34
|
-
</div>
|
|
35
|
-
|
|
36
|
-
{!hasBlockers ? (
|
|
37
|
-
<div className="flex items-center gap-3 py-2">
|
|
38
|
-
<CheckCircle2 className="h-5 w-5 text-muted-foreground" />
|
|
39
|
-
<div>
|
|
40
|
-
<p className="text-sm font-medium">No blockers</p>
|
|
41
|
-
<p className="text-xs text-muted-foreground">Keep the momentum</p>
|
|
42
|
-
</div>
|
|
43
|
-
</div>
|
|
44
|
-
) : (
|
|
45
|
-
<div className="space-y-2">
|
|
46
|
-
{displayBlockers.map((blocker, i) => (
|
|
47
|
-
<div
|
|
48
|
-
key={i}
|
|
49
|
-
className="p-2.5 rounded-lg bg-muted/50 border"
|
|
50
|
-
>
|
|
51
|
-
<p className="text-sm font-medium">{blocker.task}</p>
|
|
52
|
-
<p className="text-xs text-muted-foreground mt-0.5">
|
|
53
|
-
{blocker.reason}
|
|
54
|
-
</p>
|
|
55
|
-
<div className="flex items-center gap-1 mt-1.5">
|
|
56
|
-
<Clock className="h-3 w-3 text-muted-foreground" />
|
|
57
|
-
<span className="text-xs font-medium text-muted-foreground">
|
|
58
|
-
{blocker.daysBlocked} day{blocker.daysBlocked !== 1 ? 's' : ''} blocked
|
|
59
|
-
</span>
|
|
60
|
-
</div>
|
|
61
|
-
</div>
|
|
62
|
-
))}
|
|
63
|
-
{hasMore && (
|
|
64
|
-
<ExpandButton
|
|
65
|
-
expanded={expanded}
|
|
66
|
-
totalCount={blockers.length}
|
|
67
|
-
collapsedLimit={COLLAPSED_LIMIT}
|
|
68
|
-
onToggle={() => setExpanded(!expanded)}
|
|
69
|
-
/>
|
|
70
|
-
)}
|
|
71
|
-
</div>
|
|
72
|
-
)}
|
|
73
|
-
</div>
|
|
74
|
-
)
|
|
75
|
-
}
|
|
@@ -1,67 +0,0 @@
|
|
|
1
|
-
'use client'
|
|
2
|
-
|
|
3
|
-
import { cn } from '@/lib/utils'
|
|
4
|
-
import {
|
|
5
|
-
WORKFLOW_COMMANDS,
|
|
6
|
-
COMMAND_GROUPS,
|
|
7
|
-
SYNC_COMMAND,
|
|
8
|
-
} from '@/lib/commands'
|
|
9
|
-
import { Tooltip, TooltipContent, TooltipTrigger } from '@/components/ui/tooltip'
|
|
10
|
-
|
|
11
|
-
interface CommandBarProps {
|
|
12
|
-
isConnected: boolean
|
|
13
|
-
onCommand: (cmd: string) => void
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
export function CommandBar({ isConnected, onCommand }: CommandBarProps) {
|
|
17
|
-
return (
|
|
18
|
-
<div className="flex items-center gap-0.5 px-2 py-1">
|
|
19
|
-
<Tooltip>
|
|
20
|
-
<TooltipTrigger asChild>
|
|
21
|
-
<button
|
|
22
|
-
onClick={() => onCommand(SYNC_COMMAND.cmd)}
|
|
23
|
-
disabled={!isConnected}
|
|
24
|
-
className={cn(
|
|
25
|
-
'p-1.5 rounded transition-colors',
|
|
26
|
-
isConnected
|
|
27
|
-
? 'text-orange-500 hover:bg-orange-500/10'
|
|
28
|
-
: 'text-muted-foreground/50 cursor-not-allowed'
|
|
29
|
-
)}
|
|
30
|
-
>
|
|
31
|
-
<SYNC_COMMAND.icon className="w-4 h-4" />
|
|
32
|
-
</button>
|
|
33
|
-
</TooltipTrigger>
|
|
34
|
-
<TooltipContent>{SYNC_COMMAND.tip}</TooltipContent>
|
|
35
|
-
</Tooltip>
|
|
36
|
-
|
|
37
|
-
<div className="w-px h-4 bg-border mx-1" />
|
|
38
|
-
|
|
39
|
-
{COMMAND_GROUPS.map((group, groupIdx) => (
|
|
40
|
-
<div key={group} className="flex items-center">
|
|
41
|
-
{WORKFLOW_COMMANDS.filter(c => c.group === group).map(({ cmd, icon: Icon, tip }) => (
|
|
42
|
-
<Tooltip key={cmd}>
|
|
43
|
-
<TooltipTrigger asChild>
|
|
44
|
-
<button
|
|
45
|
-
onClick={() => onCommand(cmd)}
|
|
46
|
-
disabled={!isConnected}
|
|
47
|
-
className={cn(
|
|
48
|
-
'p-1.5 rounded transition-colors',
|
|
49
|
-
isConnected
|
|
50
|
-
? 'text-muted-foreground hover:bg-accent hover:text-accent-foreground'
|
|
51
|
-
: 'text-muted-foreground/50 cursor-not-allowed'
|
|
52
|
-
)}
|
|
53
|
-
>
|
|
54
|
-
<Icon className="w-3.5 h-3.5" />
|
|
55
|
-
</button>
|
|
56
|
-
</TooltipTrigger>
|
|
57
|
-
<TooltipContent>{tip}</TooltipContent>
|
|
58
|
-
</Tooltip>
|
|
59
|
-
))}
|
|
60
|
-
{groupIdx < COMMAND_GROUPS.length - 1 && (
|
|
61
|
-
<div className="w-px h-4 bg-border mx-0.5" />
|
|
62
|
-
)}
|
|
63
|
-
</div>
|
|
64
|
-
))}
|
|
65
|
-
</div>
|
|
66
|
-
)
|
|
67
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { CommandBar } from './CommandBar'
|
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
'use client'
|
|
2
|
-
|
|
3
|
-
import { LucideIcon } from 'lucide-react'
|
|
4
|
-
import { Button } from '@/components/ui/button'
|
|
5
|
-
import {
|
|
6
|
-
Tooltip,
|
|
7
|
-
TooltipContent,
|
|
8
|
-
TooltipTrigger,
|
|
9
|
-
} from '@/components/ui/tooltip'
|
|
10
|
-
import { cn } from '@/lib/utils'
|
|
11
|
-
|
|
12
|
-
interface CommandButtonProps {
|
|
13
|
-
cmd: string
|
|
14
|
-
icon: LucideIcon
|
|
15
|
-
tip: string
|
|
16
|
-
disabled?: boolean
|
|
17
|
-
onClick: () => void
|
|
18
|
-
variant?: 'default' | 'primary'
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
export function CommandButton({ cmd, icon: Icon, tip, disabled, onClick, variant = 'default' }: CommandButtonProps) {
|
|
22
|
-
const isPrimary = variant === 'primary'
|
|
23
|
-
|
|
24
|
-
return (
|
|
25
|
-
<Tooltip>
|
|
26
|
-
<TooltipTrigger asChild>
|
|
27
|
-
<Button
|
|
28
|
-
variant={isPrimary ? 'default' : 'ghost'}
|
|
29
|
-
size="icon"
|
|
30
|
-
onClick={onClick}
|
|
31
|
-
disabled={disabled}
|
|
32
|
-
className={cn(
|
|
33
|
-
"h-11 w-11",
|
|
34
|
-
isPrimary && "bg-primary text-primary-foreground hover:bg-primary/90"
|
|
35
|
-
)}
|
|
36
|
-
>
|
|
37
|
-
<Icon className="w-5 h-5" />
|
|
38
|
-
</Button>
|
|
39
|
-
</TooltipTrigger>
|
|
40
|
-
<TooltipContent side="right">
|
|
41
|
-
<p className="font-semibold">{tip}</p>
|
|
42
|
-
<p className="font-mono text-xs text-muted-foreground">{cmd}</p>
|
|
43
|
-
</TooltipContent>
|
|
44
|
-
</Tooltip>
|
|
45
|
-
)
|
|
46
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { CommandButton } from './CommandButton'
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
import { Badge } from '@/components/ui/badge'
|
|
2
|
-
import { RefreshCw } from 'lucide-react'
|
|
3
|
-
|
|
4
|
-
interface ConnectionStatusProps {
|
|
5
|
-
isConnected: boolean
|
|
6
|
-
isReconnecting?: boolean
|
|
7
|
-
reconnectInfo?: { attempt: number; max: number } | null
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
export function ConnectionStatus({ isConnected, isReconnecting, reconnectInfo }: ConnectionStatusProps) {
|
|
11
|
-
if (isReconnecting && reconnectInfo) {
|
|
12
|
-
return (
|
|
13
|
-
<Badge variant="outline" className="text-yellow-500 border-yellow-500/50 animate-pulse">
|
|
14
|
-
<RefreshCw className="w-3 h-3 mr-1 animate-spin" />
|
|
15
|
-
Reconnecting ({reconnectInfo.attempt}/{reconnectInfo.max})
|
|
16
|
-
</Badge>
|
|
17
|
-
)
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
if (isConnected) {
|
|
21
|
-
return (
|
|
22
|
-
<Badge variant="outline" className="text-green-500 border-green-500/50">
|
|
23
|
-
Connected
|
|
24
|
-
</Badge>
|
|
25
|
-
)
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
return null
|
|
29
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { ConnectionStatus } from './ConnectionStatus'
|