1 Commits

Author SHA1 Message Date
9377460e79 refactor-for-llama-parse (#17)
# MR: LlamaParse pipeline support, fetch request deletion, and UX improvements

**Source branch:** `refactor-for-llama-parse`
**Target branch:** `main`

## Summary

This MR adds support for the `llama_parse` pipeline type across fetch requests, introduces delete functionality for fetch requests (from both the list and detail pages), and navigates to the detail page after a successful create.

## Changes

### Features

- **LlamaParse pipeline support** (`22e6603`)
  - Renamed pipeline type `llama_parser` → `llama_parse` in `fetch-requests.models.ts` to match the backend enum.
  - Updated pipeline progress computation in `PipelineStepper` for the new step naming.

- **Delete fetch requests** (`8694537`)
  - List page: added a delete icon button on each row with confirmation dialog; disabled while the request is processing.
  - Detail page: added a Delete action in the header section with confirmation; redirects back to the list on success.
  - Deletion warns that all associated expenses and ambiguities will be removed.
  - Success/error feedback via toast notifications using `formatApiError`.

- **Navigate after create** (`c6622d4`)
  - After successfully creating a fetch request, the user is now redirected to its detail page instead of staying on the form.

### Refactoring / Cleanup

- **Drop dead llama_extract SSE step** (`c585b62`)
  - Removed unused SSE handling for the obsolete `llama_extract` step.

### Chores

- Added `tsconfig.tsbuildinfo` to `.gitignore` (`1c5d8ed`).

## Files changed

| File | Change |
| --- | --- |
| `.gitignore` | Ignore `tsconfig.tsbuildinfo` |
| `src/FetchRequest/FetchRequestCreate.tsx` | Row-level delete in list; navigate to detail after create |
| `src/FetchRequest/FetchRequestDetail.tsx` | Delete action with confirm + redirect |
| `src/FetchRequest/components/PipelineStepper.tsx` | Progress calc adjustments |
| `src/features/fetch-requests/fetch-requests.models.ts` | `PipelineType`: `llama_parser` → `llama_parse` |

Reviewed-on: #17
Co-authored-by: Vishesh 'ironeagle' Bangotra <aetoskia@gmail.com>
Co-committed-by: Vishesh 'ironeagle' Bangotra <aetoskia@gmail.com>
2026-08-23 16:58:32 +00:00
2 changed files with 2 additions and 3 deletions

View File

@@ -31,8 +31,7 @@ function computeProgressPercent(
if ( if (
seenSteps.has("raw_lines") || seenSteps.has("raw_lines") ||
seenSteps.has("txn_blocks") || seenSteps.has("txn_blocks")
seenSteps.has("llama_extract")
) { ) {
pct += 10; pct += 10;
} }

View File

@@ -90,7 +90,7 @@ export interface ResolveAmbiguityPayload {
export type SSEEventStep = export type SSEEventStep =
| "load_content" | "raw_lines" | "txn_blocks" | "txn_dicts" | "load_content" | "raw_lines" | "txn_blocks" | "txn_dicts"
| "resume_extract" | "extract" | "paused" | "complete" | "enrich" | "resume_extract" | "extract" | "paused" | "complete" | "enrich"
| "save_expenses" | "pipeline" | "llama_extract"; | "save_expenses" | "pipeline";
export type SSEEventStatus = export type SSEEventStatus =
| "started" | "completed" | "skipped" | "paused" | "progress" | "failed"; | "started" | "completed" | "skipped" | "paused" | "progress" | "failed";