Skip to content

Frontend: surface failed/empty graph builds + Rebuild, harden polling#51

Open
shivswami wants to merge 1 commit into
nikmcfly:mainfrom
shivswami:pr2-frontend-rebuild-resilience
Open

Frontend: surface failed/empty graph builds + Rebuild, harden polling#51
shivswami wants to merge 1 commit into
nikmcfly:mainfrom
shivswami:pr2-frontend-rebuild-resilience

Conversation

@shivswami

Copy link
Copy Markdown

What

Makes graph-build failures visible and recoverable, and stops polling from hanging forever.

Why

  • When NER returned 0 entities, the UI showed "Completed" with empty stats and no way forward.
  • Polling ran indefinitely if the backend restarted mid-build.
  • A page refresh lost the uploaded requirement.

Changes

  • Step1GraphBuild.vue / Process.vue — show a Failed badge + "Rebuild Graph" button when a build yields 0 entities; block advancing to environment setup.
  • MainView.vue — backend connection indicator (15s health poll), 30-min polling timeout, stop after repeated consecutive errors; rebuild handler.
  • pendingUpload.js — persist the requirement to sessionStorage so a refresh no longer discards it (File objects can't be restored — user is prompted to re-upload).

Includes a bugfix

Process.vue rebuild used buildGraph(projectId, { force }), but buildGraph(data) takes a single object — so force was dropped and a bare string was sent as the body, causing rebuild to always fail with "Please provide project_id". Now uses the correct signature.

Backend dependency

Uses the existing force rebuild (POST /api/graph/build with force: true) — already in main.

Tested

  • Production build passes (vite build, 675 modules).
  • [Runtime rebuild / timeout behavior confirmed locally.]

- Step1GraphBuild / Process: show Failed badge + Rebuild button when a
  build yields 0 entities; block advancing to environment setup
- MainView: backend connection indicator (15s poll), 30-min polling
  timeout, stop after repeated consecutive errors
- MainView/Process: rebuild via buildGraph({ project_id, force: true })
- pendingUpload: persist requirement to sessionStorage so a refresh no
  longer discards it (File objects aren't restorable — user re-uploads)

Includes fix: Process.vue rebuild used buildGraph(projectId, {force}) which
dropped force and sent a bare string as the body (always failed).
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