Make the upload dialog fire-and-forget #12

Merged
cheapnud merged 1 commit from d/upload-fire-forget into master 2026-08-17 12:53:10 +00:00
Owner

The dialog now only performs the uploads themselves: files are posted, a snackbar summarizes, and the dialog closes itself on a clean run � consumption tracking belonged to the webhook pipeline all along. Failures keep the dialog open with the per-file reason, and the whole flow is wrapped so an upload mishap can no longer take the circuit down.

The dialog now only performs the uploads themselves: files are posted, a snackbar summarizes, and the dialog closes itself on a clean run � consumption tracking belonged to the webhook pipeline all along. Failures keep the dialog open with the per-file reason, and the whole flow is wrapped so an upload mishap can no longer take the circuit down.
Make the upload dialog fire-and-forget
All checks were successful
Claude PR Review / AI Code Review (pull_request) Successful in 16s
Build & Test / Build and Test (pull_request) Successful in 2m23s
b548cc9ecd

🤖 Claude AI Code Review

  1. Summary
    Simplifies the upload dialog to a fire-and-forget POST flow, removing consumption tracking and adding snackbar summaries with a circuit-safe catch-all.

  2. Code Quality
    Clean removal of dead state machinery; the fail-open catch and per-file status handling are well thought out.

  3. Issues

🟡 UploadDialog.razor — failed count includes non-terminal states. failed = pendingRows.Count - queued treats any row that isn't Queued as failed. But UploadRowAsync's catch (IOException) (and any other status assignment) may leave rows in states like Uploading if an exception propagates before status is set, and the outer catch aborts the loop mid-way — leaving remaining pending rows counted as "failed" and shown with an incorrect summary. Confirm every processed row reaches a terminal status (Queued/Rejected/Failed).

🟢 UploadDialog.razor — outer catch (Exception) swallows the error and leaves the dialog open, but the loop stops at the first unexpected exception, so subsequent pending rows are never attempted and their status stays Pending (rendered as "failed" in the summary count). Consider whether partial progress should be reflected accurately.

  1. Verdict: APPROVE

The failed arithmetic is slightly fragile but only affects a summary count in edge cases; not a blocker. Worth a quick check that all rows reach a terminal state.


📊 Tokens: 4548 input + 524 output | 💰 Cost: ~$0.0358
Generated by Claude Opus 4.8 via Gitea Actions

## 🤖 Claude AI Code Review 1. **Summary** Simplifies the upload dialog to a fire-and-forget POST flow, removing consumption tracking and adding snackbar summaries with a circuit-safe catch-all. 2. **Code Quality** ⭐⭐⭐⭐☆ Clean removal of dead state machinery; the fail-open catch and per-file status handling are well thought out. 3. **Issues** 🟡 UploadDialog.razor — `failed` count includes non-terminal states. `failed = pendingRows.Count - queued` treats any row that isn't `Queued` as failed. But `UploadRowAsync`'s `catch (IOException)` (and any other status assignment) may leave rows in states like `Uploading` if an exception propagates before status is set, and the outer `catch` aborts the loop mid-way — leaving remaining pending rows counted as "failed" and shown with an incorrect summary. Confirm every processed row reaches a terminal status (`Queued`/`Rejected`/`Failed`). 🟢 UploadDialog.razor — outer `catch (Exception)` swallows the error and leaves the dialog open, but the loop stops at the first unexpected exception, so subsequent pending rows are never attempted and their status stays `Pending` (rendered as "failed" in the summary count). Consider whether partial progress should be reflected accurately. 4. **Verdict**: **APPROVE** The `failed` arithmetic is slightly fragile but only affects a summary count in edge cases; not a blocker. Worth a quick check that all rows reach a terminal state. --- 📊 **Tokens**: 4548 input + 524 output | 💰 **Cost**: ~$0.0358 *Generated by Claude Opus 4.8 via Gitea Actions*
cheapnud merged commit b1866c75ab into master 2026-08-17 12:53:10 +00:00
cheapnud deleted branch d/upload-fire-forget 2026-08-17 12:53:10 +00:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
cheapnud/CheapClerk!12
No description provided.