Repository navigation
feat(frontend): search and paginate saved documents - #50
Merged
Merged
Conversation
Co-authored-by: OpenAI Codex <noreply@openai.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The Documents tab now searches saved titles and full content through the existing literal-search API, with 20-result pages and a clear action that returns to the first page. Search and pagination clear selected details, failed requests can be retried, and cancelled requests cannot overwrite newer results.
Part of #5. Closes #49.
Verification
UV_PYTHON=3.13 mise run installpassed for backend, frontend and runtime. The first attempt selected Python 3.14, which lacks a wheel for pinned onnxruntime; selecting the repo's Python 3.13 resolved it. Dependency lock files are unchanged.mise run test-backendpassed, 196 tests, 731 warnings. The command usedUV_PYTHON=3.13, fixture Slack credentials, blank provider keys andDATABASE_URL=sqlite:///.tmp-tests.db.mise run test-frontendpassed, 22 tests including 7 new document tests. The new tests exercise form submission, literal query encoding, source-filter compatibility, paging with the applied query, clearing, loading, empty states, retries, rendering saved markup as text, stale list/detail responses and tab cleanup.mise run test-runtimepassed, 7 offline tests.mise exec -- bun ./node_modules/typescript/bin/tsc --noEmitfromfrontend/passed.mise run dev-backendreachedApplication startup completeand served the transcript below, then was stopped. It used Python 3.13, a disposable local SQLite database and asitecustomize.pyhook that mocked Slack authentication and blocked Slack API calls and Socket Mode startup. No live token or real.envwas read or changed.mise run dev-frontendstarted, served the changed dashboard and was stopped after Playwright capture. The dashboard used the real local API with 23 fixture documents, including 21 VPN matches. No Slack, embedding or model request was needed.git diff --checkpassed. The UI detector returned no findings. Desktop and 390-pixel mobile screenshots were inspected.Proof
Capture method (b) succeeded with screenshots and the complete frontend test output below. Method (a) also succeeded with backend tests and a curl transcript against the local backend. No capture path remains blocked. This is a dashboard slice; retrieval scoring and RAG behaviour are unchanged, so a before/after retrieval transcript does not apply.
Desktop screenshot and mobile screenshot show the applied VPN search, the last result on page two, a disabled Next button and the selected document's full content. Both files are committed under
.tmp/proof/so the evidence survives this worktree.Mobile document search
Frontend test output including the new test names
Backend search regression tests and suite result
Local API transcript with fixture records
The submitted whitespace is trimmed, matching documents are counted before pagination, and a missing search returns an empty page.
Review notes
The existing API contract and database schema are unchanged. Search is applied on form submission; editing the input does not send requests or change the query used by pagination and retry. Leaving the Documents tab cancels pending requests and reopening starts with the unfiltered first page.
All checks and screenshots used fixtures or mocks. No live Slack connection is required to verify this slice, and none was made. PostgreSQL-specific collation and large-dataset performance were not measured. The parent remains open for the remaining management dashboard work; #49 stays open until this PR merges.