add activity log with order timeline and global feed
All checks were successful
deploy / deploy (push) Successful in 4m22s
All checks were successful
deploy / deploy (push) Successful in 4m22s
Single activity_log table powering two views: chronological timeline on each order detail page (replacing the old fulfilment card) and a global feed at /admin/activity with tabs, category filters, search, and pagination. Real-time via PubSub — new entries appear instantly, nav badge updates across all admin pages. Instrumented across all event points: Stripe webhooks, order notifier, submission worker, fulfilment status worker, product sync worker, and Oban exhausted-job telemetry. Contextual action buttons (retry submission, retry sync, dismiss) with Oban unique constraints to prevent double-enqueue. 90-day pruning via cron. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -2527,4 +2527,113 @@
|
||||
}
|
||||
}
|
||||
|
||||
/* -- Timeline -- */
|
||||
|
||||
.admin-timeline {
|
||||
list-style: none;
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.admin-timeline::before {
|
||||
content: "";
|
||||
position: absolute;
|
||||
left: 0.4375rem;
|
||||
top: 0.75rem;
|
||||
bottom: 0.75rem;
|
||||
width: 1px;
|
||||
background: var(--t-border-default);
|
||||
}
|
||||
|
||||
.admin-timeline-item {
|
||||
display: flex;
|
||||
gap: 0.75rem;
|
||||
padding: 0.375rem 0;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.admin-timeline-dot {
|
||||
width: 0.875rem;
|
||||
height: 0.875rem;
|
||||
border-radius: 9999px;
|
||||
flex-shrink: 0;
|
||||
margin-top: 0.125rem;
|
||||
border: 2px solid var(--t-surface-base);
|
||||
position: relative;
|
||||
z-index: 1;
|
||||
}
|
||||
|
||||
.admin-timeline-dot-info {
|
||||
background: var(--t-status-success, #22c55e);
|
||||
}
|
||||
|
||||
.admin-timeline-dot-warning {
|
||||
background: var(--t-status-warning, #f59e0b);
|
||||
}
|
||||
|
||||
.admin-timeline-dot-error {
|
||||
background: var(--t-status-error, #ef4444);
|
||||
}
|
||||
|
||||
.admin-timeline-content {
|
||||
flex: 1;
|
||||
min-width: 0;
|
||||
}
|
||||
|
||||
.admin-timeline-message {
|
||||
font-size: 0.875rem;
|
||||
line-height: 1.4;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.admin-timeline-time {
|
||||
font-size: 0.75rem;
|
||||
color: color-mix(in oklch, var(--t-text-primary) 50%, transparent);
|
||||
}
|
||||
|
||||
/* -- Activity feed -- */
|
||||
|
||||
.admin-activity-row {
|
||||
display: flex;
|
||||
align-items: flex-start;
|
||||
gap: 0.75rem;
|
||||
padding: 0.625rem 0;
|
||||
border-bottom: 1px solid color-mix(in oklch, var(--t-border-default) 50%, transparent);
|
||||
}
|
||||
|
||||
.admin-activity-row:last-child {
|
||||
border-bottom: none;
|
||||
}
|
||||
|
||||
.admin-activity-icon {
|
||||
flex-shrink: 0;
|
||||
margin-top: 0.125rem;
|
||||
}
|
||||
|
||||
.admin-activity-body {
|
||||
flex: 1;
|
||||
min-width: 0;
|
||||
font-size: 0.875rem;
|
||||
line-height: 1.4;
|
||||
}
|
||||
|
||||
.admin-activity-type {
|
||||
font-weight: 500;
|
||||
margin-right: 0.25rem;
|
||||
}
|
||||
|
||||
.admin-activity-meta {
|
||||
flex-shrink: 0;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 0.5rem;
|
||||
}
|
||||
|
||||
.admin-activity-time {
|
||||
font-size: 0.75rem;
|
||||
color: color-mix(in oklch, var(--t-text-primary) 50%, transparent);
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
} /* @layer admin */
|
||||
|
||||
Reference in New Issue
Block a user