11import type { FC , PropsWithChildren , ReactNode } from 'react' ;
22import { COLORS , TransitionGraph } from '~usecases/lib/components/graph/TransitionGraph' ;
33
4- import { C , F , O , X } from '~usecases/lib/components/todo/CodeTags' ;
4+ import { F , O , X } from '~usecases/lib/components/todo/CodeTags' ;
55
66export type UsecaseDescription = {
77 subtitle : string ;
88 howItWorks : ReactNode [ ] ;
99} ;
1010
1111const tryIt : ReactNode [ ] = [
12- < > Add an epic, project task, or activity entry — appears instantly as < O > optimistic</ O > .</ > ,
13- < > Toggle offline, then add or edit items — they < F > fail</ F > with a jiggle.</ > ,
14- < > Toggle back online — < F > failed</ F > items auto-retry.</ > ,
15- < > Click "Sync API" — observe < X > conflict</ X > detection when server state diverges.</ > ,
12+ < >
13+ Add an epic, project task, or activity entry — appears instantly as < O > optimistic</ O > .
14+ </ > ,
15+ < >
16+ Toggle offline, then add or edit items — they < F > fail</ F > with a jiggle.
17+ </ > ,
18+ < >
19+ Toggle back online — < F > failed</ F > items auto-retry.
20+ </ > ,
21+ < >
22+ Click "Sync API" — observe < X > conflict</ X > detection when server state diverges.
23+ </ > ,
1624] ;
1725
1826type Props = {
@@ -24,9 +32,7 @@ export const Layout: FC<PropsWithChildren<Props>> = ({ children, title, descript
2432 < div className = "relative h-full" >
2533 < div className = "flex absolute inset-0 bottom-36 overflow-hidden" >
2634 { /* App panel */ }
27- < div className = "w-1/2 h-full overflow-y-auto bg-surface-0" >
28- { children }
29- </ div >
35+ < div className = "w-1/2 h-full overflow-y-auto bg-surface-0" > { children } </ div >
3036
3137 < div className = "grad-v self-stretch" />
3238
@@ -36,7 +42,9 @@ export const Layout: FC<PropsWithChildren<Props>> = ({ children, title, descript
3642 < p className = "text-[11px] text-gray-500 mb-4" > { description . subtitle } </ p >
3743
3844 < section className = "mb-3" >
39- < h3 className = "text-[9px] font-semibold uppercase tracking-widest text-gray-600 mb-1.5" > How it works</ h3 >
45+ < h3 className = "text-[9px] font-semibold uppercase tracking-widest text-gray-600 mb-1.5" >
46+ How it works
47+ </ h3 >
4048 < ul className = "text-xs text-gray-400 leading-relaxed space-y-0.5" >
4149 { description . howItWorks . map ( ( item , i ) => (
4250 < li key = { i } className = "flex gap-1.5" >
@@ -61,22 +69,42 @@ export const Layout: FC<PropsWithChildren<Props>> = ({ children, title, descript
6169
6270 < div className = "flex gap-6" >
6371 < section >
64- < h3 className = "text-[9px] font-semibold uppercase tracking-widest text-gray-600 mb-1" > State handlers</ h3 >
72+ < h3 className = "text-[9px] font-semibold uppercase tracking-widest text-gray-600 mb-1" >
73+ State handlers
74+ </ h3 >
6575 < ul className = "text-[9px] font-mono text-gray-600 space-y-px" >
66- < li className = "flex items-center gap-1" > < code className = "text-fuchsia-400" > singularState</ code > profile</ li >
67- < li className = "flex items-center gap-1" > < code className = "text-cyan-400" > recordState</ code > epics</ li >
68- < li className = "flex items-center gap-1" > < code className = "text-amber-400" > nestedRecordState</ code > projects</ li >
69- < li className = "flex items-center gap-1" > < code className = "text-green-400" > listState</ code > activity</ li >
76+ < li className = "flex items-center gap-1" >
77+ < code className = "text-fuchsia-400" > singularState</ code > profile
78+ </ li >
79+ < li className = "flex items-center gap-1" >
80+ < code className = "text-cyan-400" > recordState</ code > epics
81+ </ li >
82+ < li className = "flex items-center gap-1" >
83+ < code className = "text-amber-400" > nestedRecordState</ code > projects
84+ </ li >
85+ < li className = "flex items-center gap-1" >
86+ < code className = "text-green-400" > listState</ code > activity
87+ </ li >
7088 </ ul >
7189 </ section >
7290
7391 < section >
74- < h3 className = "text-[9px] font-semibold uppercase tracking-widest text-gray-600 mb-1" > Legend</ h3 >
92+ < h3 className = "text-[9px] font-semibold uppercase tracking-widest text-gray-600 mb-1" >
93+ Legend
94+ </ h3 >
7595 < ul className = "text-[9px] font-mono text-gray-600 space-y-px" >
76- < li className = "flex items-center gap-1" > < code className = "text-oc-commit/80" > optimistic</ code > pending</ li >
77- < li className = "flex items-center gap-1" > < code className = "text-oc-fail/80" > fail</ code > error</ li >
78- < li className = "flex items-center gap-1" > < code className = "text-oc-stash/80" > stash</ code > reverted</ li >
79- < li className = "flex items-center gap-1" > < code className = "text-oc-conflict/80" > conflict</ code > diverged</ li >
96+ < li className = "flex items-center gap-1" >
97+ < code className = "text-oc-commit/80" > optimistic</ code > pending
98+ </ li >
99+ < li className = "flex items-center gap-1" >
100+ < code className = "text-oc-fail/80" > fail</ code > error
101+ </ li >
102+ < li className = "flex items-center gap-1" >
103+ < code className = "text-oc-stash/80" > stash</ code > reverted
104+ </ li >
105+ < li className = "flex items-center gap-1" >
106+ < code className = "text-oc-conflict/80" > conflict</ code > diverged
107+ </ li >
80108 </ ul >
81109 </ section >
82110 </ div >
0 commit comments