You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
P2: src/components/chat-message-list.tsx:291 deduplicates citations only by rendered label. Source titles are not unique in the sources schema, so two different documents with the same uploaded filename/title produce the same label and the second citation is dropped. The answer then hides a real source and cannot open it, even though its documentId is different. Please deduplicate by a stable source/citation identity, or disambiguate duplicate labels, instead of using display text alone.
Fixed in 48ddd58: citation display dedupe now keys on source identity plus label, so repeated citations from the same source still collapse but distinct documents with the same rendered label remain separately clickable. Added regression coverage for two different documents named report.pdf.
Verification:
pnpm test src/components/workspace-citation-focus.test.ts src/components/workspace-citation-state.test.ts src/components/chat-panel.test.ts src/components/chat-message-list.test.ts src/components/parsed-chunk-card.test.ts src/app/page.test.ts src/lib/effect-operation.test.ts
Follow-up pushed in 11a8735 adds Playwright coverage for duplicate citation source labels. The browser test renders a real workspace shell with two distinct sources that share the same visible title, verifies both citation buttons remain visible, and confirms the second button opens the second source's chunks.
Verification:
PLAYWRIGHT_EXTERNAL_WEB_SERVER=1 pnpm exec playwright test e2e/citation-dedupe.e2e.ts --project=chromium
pnpm test src/components/chat-panel.test.ts src/components/chat-message-list.test.ts
pnpm typecheck
pnpm lint
git diff --check && git diff --cached --check
GitHub CI, CodeQL, and Vercel checks are green on the latest head.
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
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.
No description provided.