File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed
Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -4,7 +4,7 @@ import { Link, useNavigate } from 'react-router-dom'
44interface SessionItem {
55 id : string
66 type : string
7- status : 'pending' | 'completed'
7+ status : 'pending' | 'rewriting' | ' completed'
88 createdAt : number
99 subject ?: string
1010 to ?: string
@@ -87,7 +87,7 @@ export default function HomePage() {
8787 fetch ( '/api/sessions' )
8888 . then ( r => r . json ( ) )
8989 . then ( ( data : SessionItem [ ] ) => {
90- const nextPending = data . filter ( s => s . status === 'pending' )
90+ const nextPending = data . filter ( s => s . status === 'pending' || s . status === 'rewriting' )
9191 const nextIds = nextPending . map ( s => s . id ) . join ( ',' )
9292 // Only update state if pending list actually changed
9393 if ( initial || nextIds !== pendingIdsRef . current ) {
@@ -197,6 +197,9 @@ export default function HomePage() {
197197 </ div >
198198 </ div >
199199 < div className = "flex items-center gap-3 shrink-0 ml-4" >
200+ { s . status === 'rewriting' && (
201+ < span className = "text-xs px-2 py-0.5 rounded font-medium bg-amber-50 dark:bg-amber-950 text-amber-600 dark:text-amber-400" > Rewriting</ span >
202+ ) }
200203 { riskBadge ( risk ) }
201204 < span className = "text-xs text-zinc-400 dark:text-slate-500" > { formatTime ( s . createdAt ) } </ span >
202205 </ div >
You can’t perform that action at this time.
0 commit comments