@@ -17,15 +17,14 @@ import {
1717 SlackIcon ,
1818 xAIIcon ,
1919} from '@/components/icons'
20- import { CsvIcon , JsonIcon , MarkdownIcon , PdfIcon } from '@/components/icons/document-icons'
2120import { cn } from '@/lib/core/utils/cn'
2221
2322interface FeaturesPreviewProps {
2423 activeTab : number
2524}
2625
2726export function FeaturesPreview ( { activeTab } : FeaturesPreviewProps ) {
28- const isWorkspaceTab = activeTab <= 4
27+ const isWorkspaceTab = activeTab <= 3
2928
3029 return (
3130 < div className = 'relative h-[350px] w-full md:h-[560px]' >
@@ -66,7 +65,7 @@ const CARD_GAP = 8
6665const GRID_STEP = CARD_SIZE + CARD_GAP
6766const GRID_PAD = 8
6867
69- type CardVariant = 'prompt' | 'table' | 'workflow' | 'knowledge' | ' logs' | 'file'
68+ type CardVariant = 'prompt' | 'table' | 'workflow' | 'logs' | 'file'
7069
7170interface CardDef {
7271 row : number
@@ -80,27 +79,27 @@ const MOTHERSHIP_CARDS: CardDef[] = [
8079 { row : 0 , col : 0 , variant : 'prompt' , label : 'prompt.md' } ,
8180 { row : 1 , col : 0 , variant : 'table' , label : 'Leads' } ,
8281 { row : 0 , col : 1 , variant : 'workflow' , label : 'Email Bot' , color : '#7C3AED' } ,
83- { row : 1 , col : 1 , variant : 'knowledge ' , label : 'Company KB ' } ,
82+ { row : 1 , col : 1 , variant : 'file ' , label : 'handbook.md ' } ,
8483 { row : 2 , col : 0 , variant : 'logs' , label : 'Run Logs' } ,
8584 { row : 0 , col : 2 , variant : 'file' , label : 'notes.md' } ,
8685 { row : 2 , col : 1 , variant : 'workflow' , label : 'Onboarding' , color : '#2563EB' } ,
8786 { row : 1 , col : 2 , variant : 'table' , label : 'Contacts' } ,
8887 { row : 2 , col : 2 , variant : 'file' , label : 'report.pdf' } ,
8988 { row : 3 , col : 0 , variant : 'table' , label : 'Tickets' } ,
90- { row : 0 , col : 3 , variant : 'knowledge ' , label : 'Product Wiki ' } ,
89+ { row : 0 , col : 3 , variant : 'file ' , label : 'wiki.md ' } ,
9190 { row : 3 , col : 1 , variant : 'logs' , label : 'Audit Trail' } ,
9291 { row : 1 , col : 3 , variant : 'workflow' , label : 'Support' , color : '#059669' } ,
9392 { row : 2 , col : 3 , variant : 'file' , label : 'data.csv' } ,
9493 { row : 3 , col : 2 , variant : 'table' , label : 'Users' } ,
95- { row : 3 , col : 3 , variant : 'knowledge ' , label : 'HR Docs ' } ,
94+ { row : 3 , col : 3 , variant : 'file ' , label : 'policies.pdf ' } ,
9695 { row : 0 , col : 4 , variant : 'workflow' , label : 'Pipeline' , color : '#DC2626' } ,
9796 { row : 1 , col : 4 , variant : 'logs' , label : 'API Logs' } ,
9897 { row : 2 , col : 4 , variant : 'table' , label : 'Orders' } ,
9998 { row : 3 , col : 4 , variant : 'file' , label : 'config.json' } ,
10099 { row : 0 , col : 5 , variant : 'logs' , label : 'Deploys' } ,
101100 { row : 1 , col : 5 , variant : 'table' , label : 'Campaigns' } ,
102101 { row : 2 , col : 5 , variant : 'workflow' , label : 'Intake' , color : '#D97706' } ,
103- { row : 3 , col : 5 , variant : 'knowledge ' , label : 'Research ' } ,
102+ { row : 3 , col : 5 , variant : 'file ' , label : 'research.pdf ' } ,
104103 { row : 4 , col : 0 , variant : 'file' , label : 'readme.md' } ,
105104 { row : 4 , col : 1 , variant : 'table' , label : 'Revenue' } ,
106105 { row : 4 , col : 2 , variant : 'workflow' , label : 'Sync' , color : '#0891B2' } ,
@@ -110,27 +109,25 @@ const MOTHERSHIP_CARDS: CardDef[] = [
110109 { row : 0 , col : 6 , variant : 'table' , label : 'Analytics' } ,
111110 { row : 1 , col : 6 , variant : 'workflow' , label : 'Digest' , color : '#6366F1' } ,
112111 { row : 0 , col : 7 , variant : 'file' , label : 'brief.md' } ,
113- { row : 2 , col : 6 , variant : 'knowledge ' , label : 'Playbooks ' } ,
112+ { row : 2 , col : 6 , variant : 'file ' , label : 'playbook.md ' } ,
114113 { row : 1 , col : 7 , variant : 'logs' , label : 'Webhooks' } ,
115114 { row : 3 , col : 6 , variant : 'file' , label : 'export.csv' } ,
116115 { row : 2 , col : 7 , variant : 'workflow' , label : 'Alerts' , color : '#E11D48' } ,
117116 { row : 4 , col : 6 , variant : 'logs' , label : 'Metrics' } ,
118117 { row : 3 , col : 7 , variant : 'table' , label : 'Feedback' } ,
119- { row : 4 , col : 7 , variant : 'knowledge ' , label : 'Runbooks ' } ,
118+ { row : 4 , col : 7 , variant : 'file ' , label : 'runbook.md ' } ,
120119]
121120
122121const EXPAND_TARGETS : Record < number , { row : number ; col : number } > = {
123122 1 : { row : 1 , col : 0 } ,
124123 2 : { row : 0 , col : 2 } ,
125- 3 : { row : 1 , col : 1 } ,
126- 4 : { row : 2 , col : 0 } ,
124+ 3 : { row : 2 , col : 0 } ,
127125}
128126
129127const EXPAND_ROW_COUNTS : Record < number , number > = {
130128 1 : 8 ,
131129 2 : 10 ,
132- 3 : 10 ,
133- 4 : 7 ,
130+ 3 : 7 ,
134131}
135132
136133function WorkspacePreview ( { activeTab, isActive } : { activeTab : number ; isActive : boolean } ) {
@@ -146,7 +143,7 @@ function WorkspacePreview({ activeTab, isActive }: { activeTab: number; isActive
146143 const [ revealedRows , setRevealedRows ] = useState ( 0 )
147144
148145 const isMothership = activeTab === 0 && isActive
149- const isExpandTab = activeTab >= 1 && activeTab <= 4 && isActive
146+ const isExpandTab = activeTab >= 1 && activeTab <= 3 && isActive
150147 const expandTarget = EXPAND_TARGETS [ activeTab ] ?? null
151148
152149 useEffect ( ( ) => {
@@ -292,8 +289,7 @@ function WorkspacePreview({ activeTab, isActive }: { activeTab: number; isActive
292289 >
293290 { expandedTab === 1 && < MockFullTable revealedRows = { revealedRows } /> }
294291 { expandedTab === 2 && < MockFullFiles /> }
295- { expandedTab === 3 && < MockFullKnowledgeBase revealedRows = { revealedRows } /> }
296- { expandedTab === 4 && < MockFullLogs revealedRows = { revealedRows } /> }
292+ { expandedTab === 3 && < MockFullLogs revealedRows = { revealedRows } /> }
297293 </ motion . div >
298294 ) }
299295 </ div >
@@ -393,8 +389,6 @@ function MiniCardIcon({ variant, color }: { variant: CardVariant; color?: string
393389 />
394390 )
395391 }
396- case 'knowledge' :
397- return < Database className = { cls } />
398392 case 'logs' :
399393 return < Library className = { cls } />
400394 }
@@ -410,8 +404,6 @@ function MiniCardBody({ variant, color }: { variant: CardVariant; color?: string
410404 return < TableCardBody />
411405 case 'workflow' :
412406 return < WorkflowCardBody color = { color ?? '#7C3AED' } />
413- case 'knowledge' :
414- return < KnowledgeCardBody />
415407 case 'logs' :
416408 return < LogsCardBody />
417409 }
@@ -498,21 +490,6 @@ function WorkflowCardBody({ color }: { color: string }) {
498490 )
499491}
500492
501- const KB_WIDTHS = [ 70 , 85 , 55 , 80 , 48 ] as const
502-
503- function KnowledgeCardBody ( ) {
504- return (
505- < div className = 'flex flex-col gap-[5px] px-2 py-1.5' >
506- { KB_WIDTHS . map ( ( w , i ) => (
507- < div key = { i } className = 'flex items-center gap-1' >
508- < div className = 'h-[3px] w-[3px] flex-shrink-0 rounded-full bg-[#D4D4D4]' />
509- < div className = 'h-[1.5px] rounded-full bg-[#E8E8E8]' style = { { width : `${ w } %` } } />
510- </ div >
511- ) ) }
512- </ div >
513- )
514- }
515-
516493const LOG_ENTRIES = [
517494 { color : '#22C55E' , width : 65 } ,
518495 { color : '#22C55E' , width : 78 } ,
@@ -579,33 +556,6 @@ The team agreed to prioritize the new onboarding flow. Key decisions:
579556
580557Follow up with engineering on the timeline for the API v2 migration. Draft the proposal for the board meeting next week.`
581558
582- const MOCK_KB_COLUMNS = [ 'Name' , 'Size' , 'Tokens' , 'Chunks' , 'Status' ] as const
583-
584- const KB_FILE_ICONS : Record < string , React . ComponentType < SVGProps < SVGSVGElement > > > = {
585- pdf : PdfIcon ,
586- md : MarkdownIcon ,
587- csv : CsvIcon ,
588- json : JsonIcon ,
589- }
590-
591- function getKBFileIcon ( filename : string ) {
592- const ext = filename . split ( '.' ) . pop ( ) ?. toLowerCase ( ) ?? ''
593- return KB_FILE_ICONS [ ext ] ?? File
594- }
595-
596- const MOCK_KB_DATA = [
597- [ 'product-specs.pdf' , '4.2 MB' , '12.4k' , '86' , 'enabled' ] ,
598- [ 'eng-handbook.md' , '1.8 MB' , '8.2k' , '54' , 'enabled' ] ,
599- [ 'api-reference.json' , '920 KB' , '4.1k' , '32' , 'enabled' ] ,
600- [ 'release-notes.md' , '340 KB' , '2.8k' , '18' , 'enabled' ] ,
601- [ 'onboarding-guide.pdf' , '2.1 MB' , '6.5k' , '42' , 'processing' ] ,
602- [ 'data-export.csv' , '560 KB' , '3.4k' , '24' , 'enabled' ] ,
603- [ 'runbook.md' , '280 KB' , '1.9k' , '14' , 'enabled' ] ,
604- [ 'compliance.pdf' , '180 KB' , '1.2k' , '8' , 'disabled' ] ,
605- [ 'style-guide.md' , '410 KB' , '2.6k' , '20' , 'enabled' ] ,
606- [ 'metrics.csv' , '1.4 MB' , '5.8k' , '38' , 'enabled' ] ,
607- ] as const
608-
609559const MD_COMPONENTS : Components = {
610560 h1 : ( { children } ) => (
611561 < p
@@ -677,106 +627,6 @@ function MockFullFiles() {
677627 )
678628}
679629
680- const KB_STATUS_STYLES : Record < string , { bg : string ; text : string ; label : string } > = {
681- enabled : { bg : '#DCFCE7' , text : '#166534' , label : 'Enabled' } ,
682- disabled : { bg : '#F3F4F6' , text : '#6B7280' , label : 'Disabled' } ,
683- processing : { bg : '#F3E8FF' , text : '#7C3AED' , label : 'Processing' } ,
684- }
685-
686- function MockFullKnowledgeBase ( { revealedRows } : { revealedRows : number } ) {
687- return (
688- < div className = 'flex h-full flex-col' >
689- < div className = 'flex h-[44px] shrink-0 items-center border-[#E5E5E5] border-b px-6' >
690- < div className = 'flex items-center gap-1.5' >
691- < Database className = 'h-[14px] w-[14px] text-[#999]' />
692- < span className = 'text-[#999] text-[13px]' > Knowledge Base</ span >
693- < span className = 'text-[#D4D4D4] text-[13px]' > /</ span >
694- < span className = 'font-medium text-[#1C1C1C] text-[13px]' > Company KB</ span >
695- </ div >
696- </ div >
697-
698- < div className = 'flex h-[36px] shrink-0 items-center border-[#E5E5E5] border-b px-6' >
699- < div className = 'flex items-center gap-1.5' >
700- < div className = 'flex h-[24px] items-center gap-1 rounded-[6px] border border-[#E5E5E5] px-2 text-[#999] text-[12px]' >
701- Sort
702- </ div >
703- < div className = 'flex h-[24px] items-center gap-1 rounded-[6px] border border-[#E5E5E5] px-2 text-[#999] text-[12px]' >
704- Filter
705- </ div >
706- </ div >
707- </ div >
708-
709- < div className = 'flex-1 overflow-hidden' >
710- < table className = 'w-full table-fixed border-separate border-spacing-0 text-[13px]' >
711- < colgroup >
712- < col style = { { width : 40 } } />
713- { MOCK_KB_COLUMNS . map ( ( col ) => (
714- < col key = { col } />
715- ) ) }
716- </ colgroup >
717- < thead >
718- < tr >
719- < th className = 'border-[#E5E5E5] border-r border-b bg-[#FAFAFA] px-1 py-[7px] text-center align-middle' >
720- < div className = 'flex items-center justify-center' >
721- < div className = 'h-[13px] w-[13px] rounded-[2px] border border-[#D4D4D4]' />
722- </ div >
723- </ th >
724- { MOCK_KB_COLUMNS . map ( ( col ) => (
725- < th
726- key = { col }
727- className = 'border-[#E5E5E5] border-r border-b bg-[#FAFAFA] px-2 py-[7px] text-left align-middle'
728- >
729- < span className = 'font-base text-[#999] text-[13px]' > { col } </ span >
730- </ th >
731- ) ) }
732- </ tr >
733- </ thead >
734- < tbody >
735- { MOCK_KB_DATA . slice ( 0 , revealedRows ) . map ( ( row , i ) => {
736- const status = KB_STATUS_STYLES [ row [ 4 ] ] ?? KB_STATUS_STYLES . enabled
737- const DocIcon = getKBFileIcon ( row [ 0 ] )
738- return (
739- < motion . tr
740- key = { i }
741- initial = { { opacity : 0 , y : 4 } }
742- animate = { { opacity : 1 , y : 0 } }
743- transition = { { duration : 0.2 , ease : 'easeOut' } }
744- >
745- < td className = 'border-[#E5E5E5] border-r border-b px-1 py-[7px] text-center align-middle' >
746- < span className = 'text-[#999] text-[11px] tabular-nums' > { i + 1 } </ span >
747- </ td >
748- < td className = 'border-[#E5E5E5] border-r border-b px-2 py-[7px] align-middle' >
749- < span className = 'flex items-center gap-2 text-[#1C1C1C] text-[13px]' >
750- < DocIcon className = 'h-[14px] w-[14px] shrink-0' />
751- < span className = 'truncate' > { row [ 0 ] } </ span >
752- </ span >
753- </ td >
754- { row . slice ( 1 , 4 ) . map ( ( cell , j ) => (
755- < td
756- key = { j }
757- className = 'border-[#E5E5E5] border-r border-b px-2 py-[7px] align-middle'
758- >
759- < span className = 'text-[#999] text-[13px]' > { cell } </ span >
760- </ td >
761- ) ) }
762- < td className = 'border-[#E5E5E5] border-r border-b px-2 py-[7px] align-middle' >
763- < span
764- className = 'inline-flex items-center rounded-full px-2 py-0.5 font-medium text-[11px]'
765- style = { { backgroundColor : status . bg , color : status . text } }
766- >
767- { status . label }
768- </ span >
769- </ td >
770- </ motion . tr >
771- )
772- } ) }
773- </ tbody >
774- </ table >
775- </ div >
776- </ div >
777- )
778- }
779-
780630const MOCK_LOG_COLORS = [
781631 '#7C3AED' ,
782632 '#2563EB' ,
0 commit comments