PR-C (N-002/N-003): source upload and status list#5
Merged
suguanYang merged 3 commits intoMay 7, 2026
Conversation
Contributor
Author
|
PR-C staging upload verification update:
Checks passed after the change:
Commit: |
Merged
suguanYang
added a commit
that referenced
this pull request
May 8, 2026
### Chunk list scrolling The @base-ui/react ScrollArea Root didn't enforce `overflow-hidden` or `min-h-0`, so when the ChunksPanel's ScrollArea received `flex-1`, the flex layout could not constrain its height. The viewport then grew to fit all children and the parent page scrolled instead of the panel. Fix: add `overflow-hidden` and `min-h-0` to the ScrollArea Root so flex-1 creates a scroll containment context. Both ChunksPanel and ChatPanel use the same component so this is a single-point fix. ### Optimistic chat message rendering Previously `handleChatSend` waited for the `/api/chat` roundtrip before appending any message, so the UI felt frozen while the assistant responded. Fix per @suguan's UX report: 1. Append a `{ id: "pending-{ts}", role: "user", content: text }` message to the local state immediately on send. 2. The composer shows `isSending` while the request is in flight. 3. When the server succeeds, filter the response to assistant-role only, remove the optimistic id, and append the real assistant message. No duplicate user message. 4. On failure, keep the optimistic user message visible alongside the error toast (the user's question is not lost). Acceptance criteria from @pi's NB-MOB-002: - User message appears immediately before the assistant response - Composer indicates sending and prevents duplicate submit - Assistant message is appended without duplicating the user turn - Error state keeps the submitted question visible ### Verified pnpm build: clean pnpm test: 69 pass, 12 skip Signed-off-by: suguanyang <wangbinqi77@gmail.com>
5 tasks
suguanYang
added a commit
that referenced
this pull request
May 8, 2026
…stic-chat Fix chunk scrolling and optimistic chat message rendering (task #5)
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.
Implements requirements cards N-002 Source intake and upload handoff and N-003 Source list and parse status against the MVP integration branch.
Summary
/api/sourcespolling endpoint that reconciles parsing jobs through Knowherejobs.getand returns source sidebar view data.documents.listChunks(... pageSize: 1); count is view data only, not persisted.Verification
pnpm lintpnpm test— 33 passed, 10 integration skipped without envTEST_DATABASE_URL=postgres://postgres:postgres@127.0.0.1:55432/knowhere_notebook_e2e pnpm test:integration— 10 passedDATABASE_DRIVER=pg DATABASE_URL=postgres://postgres:postgres@localhost:55432/knowhere_notebook_e2e pnpm db:push— no schema changesDATABASE_DRIVER=pg DATABASE_URL=postgres://postgres:postgres@localhost:55432/knowhere_notebook_e2e DASHBOARD_SESSION_URL=http://dashboard.127.0.0.1.nip.io:3000/api/orpc/users/getCurrentUser DASHBOARD_LOGIN_URL=http://dashboard.127.0.0.1.nip.io:3000/login NOTEBOOK_PUBLIC_URL=http://notebook.127.0.0.1.nip.io:3001 pnpm buildNotes
parsing;/api/sourcespolling reconciles toreadyorfailed.