mirror of
https://github.com/xCyanGrizzly/DragonsStash.git
synced 2026-06-13 12:41:16 +00:00
feat(app): show attempt count column on the Skipped Packages tab
attemptCount goes through SkippedPackageItem and SkippedRow into a new column on the data table. Badge color cues: - outline (1) first failure, will auto-retry next cycle - secondary (2-4) has retried but still below cap - destructive (>=5) hit the cap; will not auto-retry until reset The "Skipped" column is renamed to "Last Skipped" since the timestamp now reflects the most recent attempt, not the first. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -20,6 +20,7 @@ export interface SkippedRow {
|
|||||||
sourceChannel: { id: string; title: string };
|
sourceChannel: { id: string; title: string };
|
||||||
isMultipart: boolean;
|
isMultipart: boolean;
|
||||||
partCount: number;
|
partCount: number;
|
||||||
|
attemptCount: number;
|
||||||
createdAt: string;
|
createdAt: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -107,9 +108,22 @@ export function getSkippedColumns({
|
|||||||
),
|
),
|
||||||
accessorFn: (row) => row.sourceChannel.title,
|
accessorFn: (row) => row.sourceChannel.title,
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
accessorKey: "attemptCount",
|
||||||
|
header: ({ column }) => <DataTableColumnHeader column={column} title="Attempts" />,
|
||||||
|
cell: ({ row }) => {
|
||||||
|
const count = row.original.attemptCount;
|
||||||
|
const variant = count >= 5 ? "destructive" : count > 1 ? "secondary" : "outline";
|
||||||
|
return (
|
||||||
|
<Badge variant={variant} className="text-[10px]">
|
||||||
|
{count}
|
||||||
|
</Badge>
|
||||||
|
);
|
||||||
|
},
|
||||||
|
},
|
||||||
{
|
{
|
||||||
accessorKey: "createdAt",
|
accessorKey: "createdAt",
|
||||||
header: ({ column }) => <DataTableColumnHeader column={column} title="Skipped" />,
|
header: ({ column }) => <DataTableColumnHeader column={column} title="Last Skipped" />,
|
||||||
cell: ({ row }) => (
|
cell: ({ row }) => (
|
||||||
<span className="text-sm text-muted-foreground">
|
<span className="text-sm text-muted-foreground">
|
||||||
{new Date(row.original.createdAt).toLocaleDateString()}
|
{new Date(row.original.createdAt).toLocaleDateString()}
|
||||||
|
|||||||
@@ -589,6 +589,7 @@ export async function listSkippedPackages(options: {
|
|||||||
sourceMessageId: s.sourceMessageId.toString(),
|
sourceMessageId: s.sourceMessageId.toString(),
|
||||||
isMultipart: s.isMultipart,
|
isMultipart: s.isMultipart,
|
||||||
partCount: s.partCount,
|
partCount: s.partCount,
|
||||||
|
attemptCount: s.attemptCount,
|
||||||
createdAt: s.createdAt.toISOString(),
|
createdAt: s.createdAt.toISOString(),
|
||||||
}));
|
}));
|
||||||
|
|
||||||
|
|||||||
@@ -55,6 +55,8 @@ export interface SkippedPackageItem {
|
|||||||
sourceMessageId: string;
|
sourceMessageId: string;
|
||||||
isMultipart: boolean;
|
isMultipart: boolean;
|
||||||
partCount: number;
|
partCount: number;
|
||||||
|
/** How many times the worker has tried this source message across cycles. */
|
||||||
|
attemptCount: number;
|
||||||
createdAt: string;
|
createdAt: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user