Skip to content

Commit 6a2561b

Browse files
authored
Merge pull request #639 from Chris0Jeky/fix/615-capture-triage-error-messages
Show meaningful error messages for failed capture triage
2 parents 4d28d93 + 8294c5d commit 6a2561b

File tree

4 files changed

+54
-0
lines changed

4 files changed

+54
-0
lines changed

backend/src/Taskdeck.Application/DTOs/CaptureDtos.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ public record CaptureItemDto(
2020
DateTimeOffset CreatedAt,
2121
DateTimeOffset? ProcessedAt,
2222
int RetryCount,
23+
string? ErrorMessage = null,
2324
CaptureProvenanceV1? Provenance = null);
2425

2526
public record CaptureItemSummaryDto(

backend/src/Taskdeck.Application/Services/CaptureService.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -492,6 +492,7 @@ private static CaptureItemDto MapToDetailDto(LlmRequest item, CapturePayloadV1 p
492492
item.CreatedAt,
493493
item.ProcessedAt,
494494
item.RetryCount,
495+
item.ErrorMessage,
495496
payload.Provenance);
496497
}
497498

frontend/taskdeck-web/src/types/capture.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@ export interface CaptureProvenance {
5858
export interface CaptureItem extends CaptureItemSummary {
5959
rawText: string
6060
retryCount: number
61+
errorMessage?: string | null
6162
provenance?: CaptureProvenance | null
6263
}
6364

frontend/taskdeck-web/src/views/InboxView.vue

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -499,6 +499,10 @@ function triageButtonLabel(status: CaptureStatusValue | undefined): string {
499499
return 'Converted'
500500
}
501501
502+
if (label === 'Failed') {
503+
return 'Retry Triage'
504+
}
505+
502506
return 'Start Triage'
503507
}
504508
@@ -851,6 +855,19 @@ onUnmounted(() => {
851855
</template>
852856
</div>
853857

858+
<div
859+
v-if="selectedItem.status === 6 || selectedItem.status === 'Failed'"
860+
class="td-inbox-detail__error-banner"
861+
data-testid="capture-error-banner"
862+
role="alert"
863+
>
864+
<p class="td-inbox-detail__error-title">Triage failed</p>
865+
<p v-if="selectedItem.errorMessage" class="td-inbox-detail__error-message">{{ selectedItem.errorMessage }}</p>
866+
<p class="td-inbox-detail__error-hint">
867+
You can edit the text and retry, or ignore this capture if it is no longer needed.
868+
</p>
869+
</div>
870+
854871
<div v-if="selectedItem.provenance?.proposalId" class="td-inbox-detail__proposal-link">
855872
<span>A proposed board update is ready for approval.</span>
856873
<button
@@ -1256,6 +1273,40 @@ onUnmounted(() => {
12561273
justify-content: flex-end;
12571274
}
12581275
1276+
/* ─── Error banner (Failed captures) ─── */
1277+
1278+
.td-inbox-detail__error-banner {
1279+
background: rgba(255, 77, 77, 0.08);
1280+
border: 0.5px solid rgba(255, 77, 77, 0.25);
1281+
border-radius: var(--td-radius-md);
1282+
padding: var(--td-space-3) var(--td-space-4);
1283+
}
1284+
1285+
.td-inbox-detail__error-title {
1286+
font-family: 'Space Grotesk', system-ui, sans-serif;
1287+
font-size: 10px;
1288+
text-transform: uppercase;
1289+
letter-spacing: 0.2em;
1290+
color: var(--td-color-ember, #ff4d4d);
1291+
margin: 0 0 var(--td-space-2) 0;
1292+
font-weight: 600;
1293+
}
1294+
1295+
.td-inbox-detail__error-message {
1296+
color: var(--td-text-primary);
1297+
font-size: var(--td-font-sm);
1298+
line-height: 1.5;
1299+
margin: 0 0 var(--td-space-2) 0;
1300+
word-break: break-word;
1301+
}
1302+
1303+
.td-inbox-detail__error-hint {
1304+
color: var(--td-text-tertiary);
1305+
font-size: var(--td-font-xs);
1306+
line-height: 1.5;
1307+
margin: 0;
1308+
}
1309+
12591310
.td-inbox-detail__proposal-link {
12601311
display: inline-flex;
12611312
align-items: center;

0 commit comments

Comments
 (0)