Skip to content

feat(frontend): re-index saved documents from the dashboard - #54

Merged
johnnyhuy merged 1 commit into
mainfrom
agent/issue-53-dashboard-document-reindex
Nov 16, 2026
Merged

johnnyhuy merged 1 commit into
mainfrom
agent/issue-53-dashboard-document-reindex

Conversation

@johnnyhuy

Copy link
Copy Markdown
Contributor

The Documents detail view now lets an operator re-index saved content without creating another document. It keeps the content visible, prevents repeated submission while pending, reports success or a safe retryable error, and ignores late results after leaving the selected document.

Part of #5. Closes #53.

Verification

All commands used a cleared inherited environment with env -i HOME="$HOME" PATH="$PATH". This worktree has no root or backend .env; no real token was read or changed.

  • UV_PYTHON=3.13 MISE_YES=1 mise run install passed for backend, frontend and runtime. Generated lock-file changes were discarded; dependencies are unchanged.
  • UV_PYTHON=3.13 UV_FROZEN=1 MISE_YES=1 SLACK_BOT_TOKEN=xoxb-fixture-only SLACK_SIGNING_SECRET=fixture-only DATABASE_URL=sqlite:///.tmp-tests.db mise run test-backend passed, 209 tests with 928 existing-library and fixture warnings.
  • MISE_YES=1 mise run test-frontend passed, 35 tests and 261 assertions, including 13 new cases covering explicit submission, duplicate clicks, HTTP 404/422/503 and network failures, retry, and late success/failure after selection, search, page and tab changes.
  • MISE_YES=1 mise run test-runtime passed, 7 offline tests.
  • MISE_YES=1 mise exec -- bun frontend/node_modules/typescript/bin/tsc --noEmit -p frontend/tsconfig.json passed using the installed TypeScript 5.9.3 compiler.
  • UV_PYTHON=3.13 UV_FROZEN=1 MISE_YES=1 PYTHONPATH="$PWD/.tmp/offline:$PWD/backend" SLACK_BOT_TOKEN=xoxb-fixture-only SLACK_SIGNING_SECRET=fixture-only DATABASE_URL="sqlite:///$PWD/.tmp/offline/proof.db" mise run dev-backend -- --host 127.0.0.1 --port 18053 reached Application startup complete, served the browser and curl requests, then reached Application shutdown complete after Ctrl-C.
  • MISE_YES=1 NEXT_PUBLIC_API_URL=http://127.0.0.1:18053 mise run dev-frontend -- --hostname 127.0.0.1 --port 3053 served the changed dashboard for browser capture and was stopped afterwards.
  • git diff --check passed. No migration is needed.

Proof

Capture methods (a), (b) and (c) succeeded. No capture method was blocked.

The browser used the actual local API with temporary SQLite and local Chroma. The proof hook, copied to .tmp/offline/sitecustomize.py, mocks Slack authentication, blocks Slack API calls and Socket Mode startup, and supplies fixed embeddings through the existing vector-store singleton. A fail-embedding marker injected the first failure and was removed before the browser retry.

Review notes

This adds a UI for the existing indexing endpoint. It does not persist indexing status; the document list represents saved records. Leaving the view cancels the browser wait, but backend work already started can still finish. The UI explains this and the possible embedding cost. Provider and database details from errors are not displayed.

The existing management API access controls and indexing limitations still apply, including possible historical chunks without document ownership. No Slack message, live workspace connection, real token, remote database, model request or paid embedding request was used. Production embedding-provider behaviour remains unverified. A live Slack workspace is not needed for this slice. Parent #5 stays open; child #53 closes only when this PR merges.

Add an explicit document indexing action with pending and retry feedback. Ignore late results after leaving the selected document, and capture offline browser and retrieval proof.

Co-authored-by: OpenAI Codex <noreply@openai.com>
@johnnyhuy
johnnyhuy merged commit 4a2ce4b into main Nov 16, 2026
10 checks passed
@johnnyhuy
johnnyhuy deleted the agent/issue-53-dashboard-document-reindex branch November 16, 2026 06:49
@github-actions github-actions Bot mentioned this pull request Nov 16, 2026
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.

Re-index a saved document from its dashboard detail

1 participant