Repository navigation
feat(ui): duplicate review with locally stored pending decisions - #1983
Merged
Merged
Conversation
Contributor
Author
|
I'll fix CI failures and address comments from users with write access. I'll skip comments containing "(aside)".
|
Contributor
Coverage Results 📊✅ Patch coverage is 100.00% (4 of 4 changed executable lines covered; target 80%). Changed files with executable lines (1)
Coverage diff@@ Coverage Diff @@
## main #1983 +/-##
==========================================
+ Coverage 85.75% 85.76% +0.01%
==========================================
Files 331 332 +1
Tracked lines 51485 51489 +4
Branches 42477 42481 +4
==========================================
+ Hits 44151 44159 +8
+ Misses 7334 7330 -4
Partials 4447 4447 —Generated by Coverage Action |
Contributor
Author
This was referenced Oct 4, 2026
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
devin-ai-integration
Bot
force-pushed
the
devin/1791146816-mem-01-dedup-review
branch
from
October 5, 2026 08:24
e5eb451 to
986fd25
Compare
BYK
approved these changes
Oct 5, 2026
Contributor
|
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.
Summary
MEM-01: a read-only, project-scoped duplicate review screen at
/ui/projects/:projectId/duplicates. Review decisions are stored only in this browser. Closes #1803. Part of the P2 gate of #1824.The typed dry-run preview (
POST /api/v1/projects/:id/dedup, which returnsgroups[]plus the legacyproject/globalDedupResults) and the explicit apply route already landed with #1826/#1828. This PR adds the UI on top of them, plus additive candidate fields. Nothing in this PR writes to the server.API (additive only): every
groups[].candidates[]entry gains these fields; existing fields and the legacy payload are unchanged:UI:
GET /knowledge/:id/versionsv{revision}, match score and reasons, confidence, category, scopej/kmove between groups,aaccept,sskip,uclear,1–9choose the keeper. Shortcuts only fire inside the review screen and never while typing. Every action is also a button.Local decisions (IndexedDB
lore-uiv3 → v4): a newreviewDecisionsstore holdsDedupReviewMark { projectId, groupId, decision, keepId, mergeIds, expectedRevisions, markedAt }, keyed by logical id. This is local working state; it is never merged into the entity stores.markStatus()treats a mark as stale unless the fresh group has the same members and every revision matches the one recorded at marking time. Stale marks never count as accepted.Scope vocabulary: the UI never shows "global". A
group.scope: "global"group (the existing global run over entries withproject_id IS NULL) is labelled Shared (no project).Open questions
group.scopestays"project" | "global"on the wire because feat(api): typed dedup preview and explicit dedup apply route #1828 already merged it. Should it be renamed to"shared"? That would break existing callers, so I left it.cross_project = 1are in neither dedup run, so they can never be offered as duplicates. Filed as dedup: project-owned entries promoted to cross_project are excluded from both dedup runs #1980 instead of widening this PR.Tests
Run on
e5eb4512:pnpm install,pnpm run typecheck,pnpm run lint(warnings only, exit 0),pnpm run format:check: passpnpm test: the only failures are the known sandbox cases (.lore.mdmtime, git URL rewrite). Both fail the same way on cleanorigin/main(fde28620).pnpm run build,pnpm --filter @loreai/core build,pnpm --filter @loreai/ui build,pnpm --filter @loreai/gateway run bundle: passpnpm --filter @loreai/ui test: 47 files, 760 tests passednode scripts/ui-deep-link-smoke.mjs: passpnpm --filter @loreai/ui test:e2e: 189 passed, 11 skipped (the skips are the existing viewport-specific ones)New or extended tests:
test/api.test.ts(additive candidate fields on the real project and shared paths);test/ui-contracts.test.ts, which writes thededup-preview.jsonfixturetest/duplicate-review.test.tsx,test/dedup-review.test.ts,test/db.test.ts(v3 → v4 upgrade),test/api-client.test.ts,test/contracts.test.ts,test/href.test.ts,test/shell.test.tsxe2e/dedup-review.spec.ts.e2e/db-migration.spec.ts,all-knowledge.spec.tsandnav-projects.spec.tswere updated only because the seed data changed: one new store, two shared rows, one new project.Definition of done
dedup-preview.jsonfixture plus the ArkType contract).e2e/dedup-review.spec.ts).Screenshots
Link to Devin session: https://app.devin.ai/sessions/36dfe06b1fff4f36932bc410ca42a2cc
Open in Devin Desktop: https://app.devin.ai/desktop/session/36dfe06b1fff4f36932bc410ca42a2cc?variant=devin
Requested by: @BYK