Skip to content

feat(web): catalogs panel + async ingest dialog#57

Merged
erichare merged 1 commit intomainfrom
feat/web-ingest-ui
Apr 24, 2026
Merged

feat(web): catalogs panel + async ingest dialog#57
erichare merged 1 commit intomainfrom
feat/web-ingest-ui

Conversation

@erichare
Copy link
Copy Markdown
Collaborator

Summary

Closes the end-to-end loop from the browser: create a catalog → ingest a document → watch it reach `ready` → see it listed.

New UI

  • CatalogsPanel on `/workspaces/:uid` — lists catalogs with a `bound` / `unbound` chip, an expandable document list, and per-row Ingest / Delete. Delete requires typing the name to confirm.
  • CreateCatalogDialog — name + description + optional vector-store picker. Surfaces the workspace's vector stores so binding happens in one click.
  • IngestDialog — textarea + optional source filename, async submit (202), live progress bar from the job's `processed/total`. Stays open through terminal states so users see success/failure in-place. `Ingest` is disabled on unbound catalogs with a tooltip.

Lib additions

  • Schemas: `CatalogRecord`, `DocumentRecord`, `JobRecord`, `AsyncIngestResponse`, `IngestRequest` (mirror the runtime's).
  • `api.listCatalogs` / `createCatalog` / `deleteCatalog` / `listDocuments` / `ingestAsync` / `getJob`.
  • Hooks: `useCatalogs`, `useCreateCatalog`, `useDeleteCatalog`, `useDocuments` (only fires on row expansion), `useAsyncIngest`, `useJobPoller` (React Query `refetchInterval` returning `false` on terminal states).
  • New `Textarea` UI primitive.

Not in scope (follow-ups)

File upload, SSE streaming, in-place catalog editing, lexical/rerank UI toggles on the search surface.

Test plan

  • `npm run typecheck` — clean
  • `npm run build` — clean
  • `npm run lint` — clean
  • Full flow validated end to end against a seeded mock workspace: catalog created via the UI-target endpoints → async ingest of a 100-char doc with `maxChars: 30` → job reached `succeeded` with `4/4` chunks → document row flipped to `status: ready` → visible in the expanded catalog row
  • Browser sanity check: workspace page renders with the new Catalogs panel in place; only console error is MetaMask extension noise (unrelated)

Fourth of four PRs in this Phase 2b tail batch. After this, the loop from "paste text" to "search it back" is fully browser-driven.

Surface catalogs and the ingest flow in the workspace detail page.
Closes the end-to-end loop from the browser: create a catalog →
ingest a document → watch it reach `ready` → see it listed.

## New UI

- `CatalogsPanel` on the workspace detail page. Lists catalogs with
  a `bound` / `unbound` status chip, an expandable document list,
  and per-row actions (Ingest, Delete). Delete requires typing the
  name to confirm (mirrors the vector-store delete pattern).
- `CreateCatalogDialog` — name + description + optional vector-store
  picker. The picker reads the workspace's vector stores so the
  common case (bind at create) is a single click.
- `IngestDialog` — textarea for content, optional source filename,
  submit → 202 → live progress bar that reflects the job's
  processed/total. Stays open through the terminal state so the user
  sees success/failure before closing. `Ingest` is disabled on
  unbound catalogs with a tooltip explaining why.

## Lib additions

- Schemas for Catalog, Document, Job, AsyncIngestResponse,
  IngestRequest — mirror the runtime shapes.
- `api.listCatalogs` / `createCatalog` / `deleteCatalog` /
  `listDocuments` / `ingestAsync` / `getJob`.
- Hooks: `useCatalogs`, `useCreateCatalog`, `useDeleteCatalog`,
  `useDocuments` (gated on expansion so the per-catalog query only
  fires when needed), `useAsyncIngest`, `useJobPoller`.
- `useJobPoller` uses React Query's `refetchInterval` (500ms
  default), returning `false` once the job hits a terminal state
  so polling stops cleanly.
- New `Textarea` UI primitive.

## Not in scope

File upload, SSE streaming (polling works for the MVP), catalog
editing in-place, lexical/rerank toggles on the search UI. Those
land in follow-ups as the need arises.

Fourth of four PRs in this Phase 2b tail batch. Full flow tested
against a seeded mock workspace end to end: catalog created, 4
chunks ingested, job reached `succeeded`, document `status: ready`
surfaced in the expanded row.
@erichare erichare merged commit 531768e into main Apr 24, 2026
10 checks passed
@erichare erichare deleted the feat/web-ingest-ui branch April 24, 2026 19:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant