MCPcopy Create free account
hub / github.com/TraderAlice/OpenAlice / QueueRow

Function QueueRow

ui/src/components/PushApprovalPanel.tsx:498–535  ·  view source on GitHub ↗
({ item, active, onClick }: { item: ReviewItem; active: boolean; onClick: () => void })

Source from the content-addressed store, hash-verified

496}
497
498function QueueRow({ item, active, onClick }: { item: ReviewItem; active: boolean; onClick: () => void }) {
499 const ops = itemOperations(item)
500 const timestamp = itemTimestamp(item)
501 const icon =
502 item.kind === 'pending' ? <GitPullRequest size={14} aria-hidden />
503 : item.kind === 'staged' ? <Clock3 size={14} aria-hidden />
504 : <History size={14} aria-hidden />
505 const badge =
506 item.kind === 'pending' ? 'review'
507 : item.kind === 'staged' ? 'staged'
508 : shortHash(item.commit.hash)
509
510 return (
511 <button
512 type="button"
513 onClick={onClick}
514 className={`w-full rounded-md border px-3 py-2 text-left transition-colors ${
515 active
516 ? 'border-accent/50 bg-accent-dim text-text'
517 : 'border-transparent text-text-muted hover:border-border/70 hover:bg-overlay hover:text-text'
518 }`}
519 >
520 <div className="flex items-center gap-2">
521 <span className={active ? 'text-accent' : 'text-text-muted/70'}>{icon}</span>
522 <span className="min-w-0 flex-1 truncate text-[12px] font-medium">{itemTitle(item)}</span>
523 </div>
524 <div className="mt-1 flex min-w-0 items-center gap-2 text-[10px] text-text-muted/65">
525 <span className="truncate">{itemAccountLabel(item)}</span>
526 <span className="text-text-muted/35">/</span>
527 <span>{ops.length} op{ops.length === 1 ? '' : 's'}</span>
528 <span className="ml-auto rounded border border-border/60 px-1.5 py-0.5 font-mono text-[9px] text-text-muted/60">{badge}</span>
529 </div>
530 {timestamp && (
531 <div className="mt-1 text-[10px] text-text-muted/45">{formatRelativeTime(timestamp)}</div>
532 )}
533 </button>
534 )
535}
536
537function CleanQueue() {
538 return (

Callers

nothing calls this directly

Calls 6

formatRelativeTimeFunction · 0.90
itemOperationsFunction · 0.85
itemTimestampFunction · 0.85
shortHashFunction · 0.85
itemTitleFunction · 0.85
itemAccountLabelFunction · 0.85

Tested by

no test coverage detected