Skip to content

feat(intelligence): add Duplicate Entity Detection#2953

Open
aashir-athar wants to merge 2 commits into
tinyhumansai:mainfrom
aashir-athar:feat/entity-duplicates
Open

feat(intelligence): add Duplicate Entity Detection#2953
aashir-athar wants to merge 2 commits into
tinyhumansai:mainfrom
aashir-athar:feat/entity-duplicates

Conversation

@aashir-athar
Copy link
Copy Markdown
Contributor

@aashir-athar aashir-athar commented May 29, 2026

Summary

Adds a new read-only "Duplicates" tab that surfaces entities recorded under different spellings — "Alice" / "alice" / " Alice ", "New York" / "New York" — as likely duplicates worth reconciling. It's the natural companion to the merged Knowledge Graph Centrality lens, which deliberately keeps spelling variants distinct; this tab makes that fragmentation visible.

Design

  • Pure & deterministic (lib/memory/entityDuplicates.ts): groups every entity by a normalized key (trim → collapse internal whitespace → lowercase) and keeps only clusters with ≥ 2 distinct raw spellings. Each variant carries its distinct-neighbour degree so the most-connected (likely-canonical) spelling stands out. No clock, no RNG; variant ordering is degree-desc/id-asc and cluster ordering is variant-count-desc / totalDegree-desc / key-asc — all stable and relation-order-invariant. Never mutates the stored names (normalization is display-only).
  • Zero new core surface: reuses the already-shipped memoryGraphQuery and memoryListNamespaces wrappers. Read-only — recomputed from the live graph on mount.
  • Container/presentational split; the container guards the load with a monotonic request token; namespace selector; summary tiles (entities / duplicate sets / affected) + a cluster list of variant chips with degree, a distinct positive "no duplicates" state, and a truncation note past 50 clusters. i18n across all 13 locales.

Adversarially reviewed (correctness / a11y / integration lenses) before opening; the three confirmed findings — an inaccurate degree doc comment and two missing test cases (self-loop-only entities; cluster tie-break ordering) — are all fixed.

Test plan

  • vitest — 23 tests (engine: normalization/grouping/degree-ordering/cluster-tie-breaks/self-loops/order-invariance/malformed; api facade; panel states incl. all-clean; container load + selector + error)
  • tsc --noEmit — clean
  • eslint — 0 errors
  • prettier --check — clean
  • i18n coverage gate — EXIT 0, no unused entityDuplicates.* keys

🤖 Generated with Claude Code

Summary by CodeRabbit

  • New Features

    • Added a "Duplicate Entities" intelligence view to detect and group likely duplicate knowledge-graph entities, showing clusters, variant chips, and per-variant connection metrics.
    • Namespace filtering, retry on error, loading/empty states, and truncation notices for large results.
  • Localization

    • UI strings for the duplicates view added across many languages.
  • Tests

    • End-to-end unit tests covering UI states, clustering logic, and API interactions.

Review Change Stack

@aashir-athar aashir-athar requested a review from a team May 29, 2026 16:03
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented May 29, 2026

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review
📝 Walkthrough

Walkthrough

Adds deterministic duplicate-entity clustering, RPC loaders, a presentational panel and container tab, Intelligence page wiring for a new "Duplicates" tab, tests, and i18n strings across locales.

Changes

Duplicate Entity Detection in Knowledge Graphs

Layer / File(s) Summary
Duplicate detection algorithm & types
app/src/lib/memory/entityDuplicates.ts
Exports DuplicateVariant, DuplicateCluster, DuplicateReport; implements normalizeEntity and computeEntityDuplicates with neighbor-degree grouping, deterministic sorting, and EMPTY_REPORT for no-entities.
Algorithm tests
app/src/lib/memory/entityDuplicates.test.ts
Tests normalization, empty-input behavior, variant clustering, exclusion of distinct normalized forms, variant ordering by degree, cluster ranking/tie-breaking, self-loop handling, input-order invariance, and malformed-relation dropping.
RPC facade
app/src/services/api/entityDuplicatesApi.ts, app/src/services/api/entityDuplicatesApi.test.ts
loadEntityDuplicates(namespace?) queries memoryGraphQuery, returns computeEntityDuplicates(triples), and logs debug info; loadNamespaces() delegates to memoryListNamespaces. Tests cover namespace passthrough, transformation, error propagation, and listing.
Panel component
app/src/components/intelligence/EntityDuplicatesPanel.tsx, app/src/components/intelligence/EntityDuplicatesPanel.test.tsx
Presentational UI for loading skeleton, error with optional retry button, empty state, and populated state (metric tiles, truncated cluster list, variant chips with degree labels and id fallback). Tests assert all render states and variant/normalization display.
Tab container
app/src/components/intelligence/EntityDuplicatesTab.tsx, app/src/components/intelligence/EntityDuplicatesTab.test.tsx
Container loads namespaces and duplicate reports, ignores stale responses via monotonic requestId, renders namespace selector when available, delegates to EntityDuplicatesPanel, and wires onRetry to reload current namespace. Tests validate mount load, namespace-driven reloads, and error handling.
Page integration
app/src/pages/Intelligence.tsx
Imports EntityDuplicatesTab, extends IntelligenceTab union with 'duplicates', registers tab label, and conditionally renders the new tab content.
Translations
app/src/lib/i18n/*
Adds memory.tab.duplicates and entityDuplicates.* translation keys across locales (including en.ts) for titles, loading/error/retry copy, metrics, empty/truncated notices, and variant labels.

Sequence Diagram(s)

sequenceDiagram
  participant UI as EntityDuplicatesTab
  participant Panel as EntityDuplicatesPanel
  participant API as entityDuplicatesApi
  participant RPC as memoryGraphQuery/memoryListNamespaces

  UI->>API: loadNamespaces()
  API->>RPC: memoryListNamespaces()
  RPC-->>API: namespaces[]
  API-->>UI: namespaces[]

  UI->>API: loadEntityDuplicates(namespace)
  API->>RPC: memoryGraphQuery(namespace)
  RPC-->>API: triples[]
  API->>API: computeEntityDuplicates(triples)
  API-->>UI: DuplicateReport
  UI->>Panel: render(report, loading, error)
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Possibly related PRs

Suggested reviewers

  • graycyrus
  • sanil-23

Poem

🐰 I nibbled through names, trimmed and lowercased bright,
I clustered the twins in the moonlit night,
A tab and a panel now show what I found,
Small hops of code make duplicates unbound!

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 40.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'feat(intelligence): add Duplicate Entity Detection' directly and accurately summarizes the main addition: a new Duplicate Entity Detection feature in the Intelligence module.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
⚔️ Resolve merge conflicts
  • Resolve merge conflict in branch feat/entity-duplicates

Warning

There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure.

🔧 ESLint

If the error stems from missing dependencies, add them to the package.json file. For unrecoverable errors (e.g., due to private dependencies), disable the tool in the CodeRabbit configuration.

ESLint skipped: no ESLint configuration detected in root package.json. To enable, add eslint to devDependencies.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@coderabbitai coderabbitai Bot added feature Net-new user-facing capability or product behavior. memory Memory store, memory tree, recall, summarization, and embeddings in src/openhuman/memory/. working A PR that is being worked on by the team. labels May 29, 2026
Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@app/src/components/intelligence/EntityDuplicatesPanel.tsx`:
- Around line 95-167: The component EntityDuplicatesPanel.tsx uses i18n keys
entityDuplicates.namespaceAll and entityDuplicates.namespaceLabel that are
missing; add these two keys with appropriate English strings into the English
i18n source (app/src/lib/i18n/en.ts) and then add the same keys to every locale
chunk file under app/src/lib/i18n/chunks (the en-*.ts chunk files and
corresponding other locales) so all locales include
entityDuplicates.namespaceAll and entityDuplicates.namespaceLabel; ensure the
keys match exactly the strings used in EntityDuplicatesPanel.tsx and follow the
existing translation object structure.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: ba3323b2-9b8d-4407-96c6-98cd5a258a9c

📥 Commits

Reviewing files that changed from the base of the PR and between aac6515 and a43e393.

📒 Files selected for processing (23)
  • app/src/components/intelligence/EntityDuplicatesPanel.test.tsx
  • app/src/components/intelligence/EntityDuplicatesPanel.tsx
  • app/src/components/intelligence/EntityDuplicatesTab.test.tsx
  • app/src/components/intelligence/EntityDuplicatesTab.tsx
  • app/src/lib/i18n/chunks/ar-1.ts
  • app/src/lib/i18n/chunks/bn-1.ts
  • app/src/lib/i18n/chunks/de-1.ts
  • app/src/lib/i18n/chunks/en-1.ts
  • app/src/lib/i18n/chunks/es-1.ts
  • app/src/lib/i18n/chunks/fr-1.ts
  • app/src/lib/i18n/chunks/hi-1.ts
  • app/src/lib/i18n/chunks/id-1.ts
  • app/src/lib/i18n/chunks/it-1.ts
  • app/src/lib/i18n/chunks/ko-1.ts
  • app/src/lib/i18n/chunks/pt-1.ts
  • app/src/lib/i18n/chunks/ru-1.ts
  • app/src/lib/i18n/chunks/zh-CN-1.ts
  • app/src/lib/i18n/en.ts
  • app/src/lib/memory/entityDuplicates.test.ts
  • app/src/lib/memory/entityDuplicates.ts
  • app/src/pages/Intelligence.tsx
  • app/src/services/api/entityDuplicatesApi.test.ts
  • app/src/services/api/entityDuplicatesApi.ts

Comment thread app/src/components/intelligence/EntityDuplicatesPanel.tsx
@aashir-athar
Copy link
Copy Markdown
Contributor Author

Good catch @coderabbitai — fixed. Added entityDuplicates.namespaceLabel and entityDuplicates.namespaceAll to en.ts and mirrored across all locale chunks (i18n coverage gate EXIT 0). The namespace selector only renders when namespaces exist, which is why the empty-namespace unit tests didn't surface it. (The Rust Core Coverage lane is a TS-only-PR infra flake — re-triggered.)

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented May 29, 2026

Tip

For best results, initiate chat on the files or code changes.

@aashir-athar: Thanks for the thorough follow-through — adding both namespaceLabel and namespaceAll and propagating them across all 13 locales with the gate passing is exactly right. The conditional-render explanation also makes sense; since the selector is gated on namespaces.length > 0, the empty-namespace path never reaches that branch in tests, so no coverage gap there. Good luck with the infra re-trigger!

🐇 ✨

@sanil-23 sanil-23 self-assigned this May 29, 2026
@aashir-athar aashir-athar force-pushed the feat/entity-duplicates branch from 480e43e to 4df2724 Compare May 29, 2026 19:09
coderabbitai[bot]
coderabbitai Bot previously approved these changes May 29, 2026
@aashir-athar aashir-athar force-pushed the feat/entity-duplicates branch 2 times, most recently from db22c57 to 4ac1ea4 Compare May 30, 2026 02:07
A new read-only "Duplicates" tab that surfaces entities recorded under
different spellings (case / whitespace / punctuation) as likely duplicates —
the natural companion to the centrality lens, which deliberately keeps variants
distinct. Helps the user spot fragmentation in their knowledge graph.

- Pure deterministic engine (lib/memory/entityDuplicates.ts): groups entities
  by a normalized key (trim, collapse whitespace, lowercase) and keeps clusters
  with >= 2 distinct raw spellings; each variant carries its distinct-neighbour
  degree so the most-connected (likely-canonical) spelling is visible. No clock,
  no RNG; deterministic variant + cluster ordering. Never mutates stored names.
- Zero new core surface: reuses memoryGraphQuery + memoryListNamespaces.
  Read-only, recomputed from the live graph.
- Container guards the load with a request token; namespace selector; summary
  tiles + cluster list of variant chips (with degree), a distinct "all clean"
  state when no duplicates, and a truncation note. i18n across all 13 locales.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
@aashir-athar aashir-athar force-pushed the feat/entity-duplicates branch from 4ac1ea4 to c81c627 Compare May 30, 2026 13:00
coderabbitai[bot]
coderabbitai Bot previously approved these changes May 30, 2026
Address CodeRabbit: EntityDuplicatesTab references entityDuplicates.namespaceLabel
/ namespaceAll but they were never defined. Add both to en.ts + the locale chunks.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 6

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@app/src/lib/i18n/bn.ts`:
- Around line 4138-4155: Replace the English strings for the new i18n keys in
bn.ts with correct Bengali translations: update each key
entityDuplicates.allClean, blankEntity, empty, emptyHint, errorPrefix, heading,
intro, loading, metricAffected, metricClusters, metricEntities, namespaceAll,
namespaceLabel, retry, title, truncated, variantTitle and memory.tab.duplicates
with accurate Bengali text (not English), preserving placeholders like {shown},
{total}, and {degree}; keep punctuation/formatting consistent and ensure the
translations read naturally in Bengali for the entity duplicates UI.

In `@app/src/lib/i18n/es.ts`:
- Around line 4215-4232: The Spanish locale file contains English literals for
the new keys; replace each `entityDuplicates.*` and `memory.tab.duplicates`
value with proper Spanish translations, preserving placeholders and punctuation
(e.g., keep "{shown}", "{total}", "{degree}") and key names:
entityDuplicates.allClean, entityDuplicates.blankEntity, entityDuplicates.empty,
entityDuplicates.emptyHint, entityDuplicates.errorPrefix,
entityDuplicates.heading, entityDuplicates.intro, entityDuplicates.loading,
entityDuplicates.metricAffected, entityDuplicates.metricClusters,
entityDuplicates.metricEntities, entityDuplicates.namespaceAll,
entityDuplicates.namespaceLabel, entityDuplicates.retry, entityDuplicates.title,
entityDuplicates.truncated, entityDuplicates.variantTitle, and
memory.tab.duplicates — update the strings to fluent Spanish equivalents
matching the English intent.

In `@app/src/lib/i18n/fr.ts`:
- Around line 4232-4249: Replace the English literals for the i18n keys
introduced: all keys under entityDuplicates (entityDuplicates.allClean,
blankEntity, empty, emptyHint, errorPrefix, heading, intro, loading,
metricAffected, metricClusters, metricEntities, namespaceAll, namespaceLabel,
retry, title, truncated, variantTitle) and memory.tab.duplicates with proper
French translations in fr.ts; keep interpolation placeholders exactly as-is
(e.g., {shown}, {total}, {degree}) and preserve punctuation/ellipsis/ellipsis
characters used in strings (e.g., "…") while matching the style of surrounding
translations.

In `@app/src/lib/i18n/it.ts`:
- Around line 4210-4227: The Italian locale contains English placeholders for
the entityDuplicates.* keys and memory.tab.duplicates; replace each value for
'entityDuplicates.allClean', 'entityDuplicates.blankEntity',
'entityDuplicates.empty', 'entityDuplicates.emptyHint',
'entityDuplicates.errorPrefix', 'entityDuplicates.heading',
'entityDuplicates.intro', 'entityDuplicates.loading',
'entityDuplicates.metricAffected', 'entityDuplicates.metricClusters',
'entityDuplicates.metricEntities', 'entityDuplicates.namespaceAll',
'entityDuplicates.namespaceLabel', 'entityDuplicates.retry',
'entityDuplicates.title', 'entityDuplicates.truncated',
'entityDuplicates.variantTitle', and 'memory.tab.duplicates' with correct
Italian translations (natural phrasing, preserve interpolation tokens like
{shown}, {total}, {degree}), ensuring punctuation and capitalization match the
UI style.

In `@app/src/lib/i18n/ru.ts`:
- Around line 4179-4196: The i18n entries for Russian are still in English;
replace each English string with a correct Russian translation for the keys
'entityDuplicates.allClean', 'entityDuplicates.blankEntity',
'entityDuplicates.empty', 'entityDuplicates.emptyHint',
'entityDuplicates.errorPrefix', 'entityDuplicates.heading',
'entityDuplicates.intro', 'entityDuplicates.loading',
'entityDuplicates.metricAffected', 'entityDuplicates.metricClusters',
'entityDuplicates.metricEntities', 'entityDuplicates.namespaceAll',
'entityDuplicates.namespaceLabel', 'entityDuplicates.retry',
'entityDuplicates.title', 'entityDuplicates.truncated',
'entityDuplicates.variantTitle', and 'memory.tab.duplicates'—keeping
placeholders like {shown}, {total}, and {degree} intact and grammar-appropriate
in Russian. Ensure translations are natural, match existing locale style, and
follow pluralization/placeholders exactly before committing.

In `@app/src/lib/i18n/zh-CN.ts`:
- Around line 3941-3958: The listed i18n keys (entityDuplicates.allClean,
entityDuplicates.blankEntity, entityDuplicates.empty,
entityDuplicates.emptyHint, entityDuplicates.errorPrefix,
entityDuplicates.heading, entityDuplicates.intro, entityDuplicates.loading,
entityDuplicates.metricAffected, entityDuplicates.metricClusters,
entityDuplicates.metricEntities, entityDuplicates.namespaceAll,
entityDuplicates.namespaceLabel, entityDuplicates.retry, entityDuplicates.title,
entityDuplicates.truncated, entityDuplicates.variantTitle, and
memory.tab.duplicates) are still in English in zh-CN.ts—replace each value with
a correct Simplified Chinese translation while preserving placeholders like
{shown}, {total}, and {degree} and keeping punctuation/ellipsis semantics
exactly; ensure translations are natural, concise, and match the tone of the
other zh-CN entries.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: a87d7ead-8751-49e1-971e-8f26c2c317d0

📥 Commits

Reviewing files that changed from the base of the PR and between c81c627 and d200ed8.

📒 Files selected for processing (15)
  • app/src/lib/i18n/ar.ts
  • app/src/lib/i18n/bn.ts
  • app/src/lib/i18n/de.ts
  • app/src/lib/i18n/en.ts
  • app/src/lib/i18n/es.ts
  • app/src/lib/i18n/fr.ts
  • app/src/lib/i18n/hi.ts
  • app/src/lib/i18n/id.ts
  • app/src/lib/i18n/it.ts
  • app/src/lib/i18n/ko.ts
  • app/src/lib/i18n/pl.ts
  • app/src/lib/i18n/pt.ts
  • app/src/lib/i18n/ru.ts
  • app/src/lib/i18n/zh-CN.ts
  • app/src/pages/Intelligence.tsx
✅ Files skipped from review due to trivial changes (7)
  • app/src/lib/i18n/ko.ts
  • app/src/lib/i18n/pl.ts
  • app/src/lib/i18n/id.ts
  • app/src/lib/i18n/de.ts
  • app/src/lib/i18n/ar.ts
  • app/src/lib/i18n/hi.ts
  • app/src/lib/i18n/pt.ts
🚧 Files skipped from review as they are similar to previous changes (2)
  • app/src/pages/Intelligence.tsx
  • app/src/lib/i18n/en.ts

Comment thread app/src/lib/i18n/bn.ts
Comment on lines +4138 to +4155
'entityDuplicates.allClean': 'No duplicate spellings detected — your entities look clean.',
'entityDuplicates.blankEntity': '(blank)',
'entityDuplicates.empty': 'No knowledge graph yet.',
'entityDuplicates.emptyHint': 'As the assistant records entities, any duplicate spellings will surface here.',
'entityDuplicates.errorPrefix': 'Could not load the graph:',
'entityDuplicates.heading': 'Likely duplicate entities',
'entityDuplicates.intro': 'The graph stores names verbatim, so the same thing can fragment across spellings (case, spacing). These entities normalize to the same name — likely duplicates worth reconciling.',
'entityDuplicates.loading': 'Scanning for duplicates…',
'entityDuplicates.metricAffected': 'Affected',
'entityDuplicates.metricClusters': 'Duplicate sets',
'entityDuplicates.metricEntities': 'Entities',
'entityDuplicates.namespaceAll': 'All namespaces',
'entityDuplicates.namespaceLabel': 'Namespace',
'entityDuplicates.retry': 'Retry',
'entityDuplicates.title': 'Duplicate Entities',
'entityDuplicates.truncated': 'Showing {shown} of {total} duplicate sets.',
'entityDuplicates.variantTitle': '{degree} connections',
'memory.tab.duplicates': 'Duplicates',
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major | ⚡ Quick win

Translate new entityDuplicates.* and memory.tab.duplicates values to Bengali.

These newly added bn.ts strings are English, so Bengali users will see untranslated copy in the new tab/panel. Please replace them with real Bengali translations for all added keys in this range.

As per coding guidelines: “When adding or changing i18n keys in app/src/lib/i18n/en.ts, add the same key with a real, correct translation (not English) to every non-English locale file.”

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@app/src/lib/i18n/bn.ts` around lines 4138 - 4155, Replace the English strings
for the new i18n keys in bn.ts with correct Bengali translations: update each
key entityDuplicates.allClean, blankEntity, empty, emptyHint, errorPrefix,
heading, intro, loading, metricAffected, metricClusters, metricEntities,
namespaceAll, namespaceLabel, retry, title, truncated, variantTitle and
memory.tab.duplicates with accurate Bengali text (not English), preserving
placeholders like {shown}, {total}, and {degree}; keep punctuation/formatting
consistent and ensure the translations read naturally in Bengali for the entity
duplicates UI.

Comment thread app/src/lib/i18n/es.ts
Comment on lines +4215 to +4232
'entityDuplicates.allClean': 'No duplicate spellings detected — your entities look clean.',
'entityDuplicates.blankEntity': '(blank)',
'entityDuplicates.empty': 'No knowledge graph yet.',
'entityDuplicates.emptyHint': 'As the assistant records entities, any duplicate spellings will surface here.',
'entityDuplicates.errorPrefix': 'Could not load the graph:',
'entityDuplicates.heading': 'Likely duplicate entities',
'entityDuplicates.intro': 'The graph stores names verbatim, so the same thing can fragment across spellings (case, spacing). These entities normalize to the same name — likely duplicates worth reconciling.',
'entityDuplicates.loading': 'Scanning for duplicates…',
'entityDuplicates.metricAffected': 'Affected',
'entityDuplicates.metricClusters': 'Duplicate sets',
'entityDuplicates.metricEntities': 'Entities',
'entityDuplicates.namespaceAll': 'All namespaces',
'entityDuplicates.namespaceLabel': 'Namespace',
'entityDuplicates.retry': 'Retry',
'entityDuplicates.title': 'Duplicate Entities',
'entityDuplicates.truncated': 'Showing {shown} of {total} duplicate sets.',
'entityDuplicates.variantTitle': '{degree} connections',
'memory.tab.duplicates': 'Duplicates',
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major | ⚡ Quick win

Translate new entityDuplicates.* and memory.tab.duplicates strings to Spanish.

These newly added values are English literals in es.ts, so Spanish users will see mixed-language UI in this panel/tab. Please replace all of them with proper Spanish translations in this file.

As per coding guidelines: “When adding or changing i18n keys in app/src/lib/i18n/en.ts, add the same key with a real, correct translation (not English) to every non-English locale file.”

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@app/src/lib/i18n/es.ts` around lines 4215 - 4232, The Spanish locale file
contains English literals for the new keys; replace each `entityDuplicates.*`
and `memory.tab.duplicates` value with proper Spanish translations, preserving
placeholders and punctuation (e.g., keep "{shown}", "{total}", "{degree}") and
key names: entityDuplicates.allClean, entityDuplicates.blankEntity,
entityDuplicates.empty, entityDuplicates.emptyHint,
entityDuplicates.errorPrefix, entityDuplicates.heading, entityDuplicates.intro,
entityDuplicates.loading, entityDuplicates.metricAffected,
entityDuplicates.metricClusters, entityDuplicates.metricEntities,
entityDuplicates.namespaceAll, entityDuplicates.namespaceLabel,
entityDuplicates.retry, entityDuplicates.title, entityDuplicates.truncated,
entityDuplicates.variantTitle, and memory.tab.duplicates — update the strings to
fluent Spanish equivalents matching the English intent.

Comment thread app/src/lib/i18n/fr.ts
Comment on lines +4232 to +4249
'entityDuplicates.allClean': 'No duplicate spellings detected — your entities look clean.',
'entityDuplicates.blankEntity': '(blank)',
'entityDuplicates.empty': 'No knowledge graph yet.',
'entityDuplicates.emptyHint': 'As the assistant records entities, any duplicate spellings will surface here.',
'entityDuplicates.errorPrefix': 'Could not load the graph:',
'entityDuplicates.heading': 'Likely duplicate entities',
'entityDuplicates.intro': 'The graph stores names verbatim, so the same thing can fragment across spellings (case, spacing). These entities normalize to the same name — likely duplicates worth reconciling.',
'entityDuplicates.loading': 'Scanning for duplicates…',
'entityDuplicates.metricAffected': 'Affected',
'entityDuplicates.metricClusters': 'Duplicate sets',
'entityDuplicates.metricEntities': 'Entities',
'entityDuplicates.namespaceAll': 'All namespaces',
'entityDuplicates.namespaceLabel': 'Namespace',
'entityDuplicates.retry': 'Retry',
'entityDuplicates.title': 'Duplicate Entities',
'entityDuplicates.truncated': 'Showing {shown} of {total} duplicate sets.',
'entityDuplicates.variantTitle': '{degree} connections',
'memory.tab.duplicates': 'Duplicates',
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major | ⚡ Quick win

French locale entries are still in English

All newly added entityDuplicates.* and memory.tab.duplicates values are English literals, so French users will see untranslated UI for this feature. Please replace these with proper French translations in this file.

As per coding guidelines: “When adding or changing i18n keys in app/src/lib/i18n/en.ts, add the same key with a real, correct translation (not English) to every non-English locale file.”

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@app/src/lib/i18n/fr.ts` around lines 4232 - 4249, Replace the English
literals for the i18n keys introduced: all keys under entityDuplicates
(entityDuplicates.allClean, blankEntity, empty, emptyHint, errorPrefix, heading,
intro, loading, metricAffected, metricClusters, metricEntities, namespaceAll,
namespaceLabel, retry, title, truncated, variantTitle) and memory.tab.duplicates
with proper French translations in fr.ts; keep interpolation placeholders
exactly as-is (e.g., {shown}, {total}, {degree}) and preserve
punctuation/ellipsis/ellipsis characters used in strings (e.g., "…") while
matching the style of surrounding translations.

Comment thread app/src/lib/i18n/it.ts
Comment on lines +4210 to +4227
'entityDuplicates.allClean': 'No duplicate spellings detected — your entities look clean.',
'entityDuplicates.blankEntity': '(blank)',
'entityDuplicates.empty': 'No knowledge graph yet.',
'entityDuplicates.emptyHint': 'As the assistant records entities, any duplicate spellings will surface here.',
'entityDuplicates.errorPrefix': 'Could not load the graph:',
'entityDuplicates.heading': 'Likely duplicate entities',
'entityDuplicates.intro': 'The graph stores names verbatim, so the same thing can fragment across spellings (case, spacing). These entities normalize to the same name — likely duplicates worth reconciling.',
'entityDuplicates.loading': 'Scanning for duplicates…',
'entityDuplicates.metricAffected': 'Affected',
'entityDuplicates.metricClusters': 'Duplicate sets',
'entityDuplicates.metricEntities': 'Entities',
'entityDuplicates.namespaceAll': 'All namespaces',
'entityDuplicates.namespaceLabel': 'Namespace',
'entityDuplicates.retry': 'Retry',
'entityDuplicates.title': 'Duplicate Entities',
'entityDuplicates.truncated': 'Showing {shown} of {total} duplicate sets.',
'entityDuplicates.variantTitle': '{degree} connections',
'memory.tab.duplicates': 'Duplicates',
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major | ⚡ Quick win

Replace English placeholders with real Italian translations

These newly added Italian-locale values are still English, so Italian users will see untranslated UI copy (Line 4210 through Line 4227). Please replace all entityDuplicates.* and memory.tab.duplicates values with proper Italian translations.

Suggested translation patch
-  'entityDuplicates.allClean': 'No duplicate spellings detected — your entities look clean.',
+  'entityDuplicates.allClean': 'Nessuna variante duplicata rilevata: le tue entità sembrano pulite.',
-  'entityDuplicates.blankEntity': '(blank)',
+  'entityDuplicates.blankEntity': '(vuoto)',
-  'entityDuplicates.empty': 'No knowledge graph yet.',
+  'entityDuplicates.empty': 'Nessun grafo della conoscenza disponibile.',
-  'entityDuplicates.emptyHint': 'As the assistant records entities, any duplicate spellings will surface here.',
+  'entityDuplicates.emptyHint': 'Man mano che l’assistente registra entità, eventuali varianti duplicate appariranno qui.',
-  'entityDuplicates.errorPrefix': 'Could not load the graph:',
+  'entityDuplicates.errorPrefix': 'Impossibile caricare il grafo:',
-  'entityDuplicates.heading': 'Likely duplicate entities',
+  'entityDuplicates.heading': 'Entità probabilmente duplicate',
-  'entityDuplicates.intro': 'The graph stores names verbatim, so the same thing can fragment across spellings (case, spacing). These entities normalize to the same name — likely duplicates worth reconciling.',
+  'entityDuplicates.intro': 'Il grafo memorizza i nomi alla lettera, quindi la stessa entità può frammentarsi in varianti di scrittura (maiuscole/minuscole, spazi). Queste entità si normalizzano nello stesso nome: probabili duplicati da riconciliare.',
-  'entityDuplicates.loading': 'Scanning for duplicates…',
+  'entityDuplicates.loading': 'Ricerca dei duplicati…',
-  'entityDuplicates.metricAffected': 'Affected',
+  'entityDuplicates.metricAffected': 'Coinvolte',
-  'entityDuplicates.metricClusters': 'Duplicate sets',
+  'entityDuplicates.metricClusters': 'Gruppi duplicati',
-  'entityDuplicates.metricEntities': 'Entities',
+  'entityDuplicates.metricEntities': 'Entità',
-  'entityDuplicates.namespaceAll': 'All namespaces',
+  'entityDuplicates.namespaceAll': 'Tutti i namespace',
-  'entityDuplicates.namespaceLabel': 'Namespace',
+  'entityDuplicates.namespaceLabel': 'Namespace',
-  'entityDuplicates.retry': 'Retry',
+  'entityDuplicates.retry': 'Riprova',
-  'entityDuplicates.title': 'Duplicate Entities',
+  'entityDuplicates.title': 'Entità duplicate',
-  'entityDuplicates.truncated': 'Showing {shown} of {total} duplicate sets.',
+  'entityDuplicates.truncated': 'Mostrando {shown} di {total} gruppi duplicati.',
-  'entityDuplicates.variantTitle': '{degree} connections',
+  'entityDuplicates.variantTitle': '{degree} connessioni',
-  'memory.tab.duplicates': 'Duplicates',
+  'memory.tab.duplicates': 'Duplicati',

As per coding guidelines: “When adding or changing i18n keys in app/src/lib/i18n/en.ts, add the same key with a real, correct translation (not English) to every non-English locale file: ... it.ts”.

📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
'entityDuplicates.allClean': 'No duplicate spellings detected — your entities look clean.',
'entityDuplicates.blankEntity': '(blank)',
'entityDuplicates.empty': 'No knowledge graph yet.',
'entityDuplicates.emptyHint': 'As the assistant records entities, any duplicate spellings will surface here.',
'entityDuplicates.errorPrefix': 'Could not load the graph:',
'entityDuplicates.heading': 'Likely duplicate entities',
'entityDuplicates.intro': 'The graph stores names verbatim, so the same thing can fragment across spellings (case, spacing). These entities normalize to the same name — likely duplicates worth reconciling.',
'entityDuplicates.loading': 'Scanning for duplicates…',
'entityDuplicates.metricAffected': 'Affected',
'entityDuplicates.metricClusters': 'Duplicate sets',
'entityDuplicates.metricEntities': 'Entities',
'entityDuplicates.namespaceAll': 'All namespaces',
'entityDuplicates.namespaceLabel': 'Namespace',
'entityDuplicates.retry': 'Retry',
'entityDuplicates.title': 'Duplicate Entities',
'entityDuplicates.truncated': 'Showing {shown} of {total} duplicate sets.',
'entityDuplicates.variantTitle': '{degree} connections',
'memory.tab.duplicates': 'Duplicates',
'entityDuplicates.allClean': 'Nessuna variante duplicata rilevata: le tue entità sembrano pulite.',
'entityDuplicates.blankEntity': '(vuoto)',
'entityDuplicates.empty': 'Nessun grafo della conoscenza disponibile.',
'entityDuplicates.emptyHint': 'Man mano che l'assistente registra entità, eventuali varianti duplicate appariranno qui.',
'entityDuplicates.errorPrefix': 'Impossibile caricare il grafo:',
'entityDuplicates.heading': 'Entità probabilmente duplicate',
'entityDuplicates.intro': 'Il grafo memorizza i nomi alla lettera, quindi la stessa entità può frammentarsi in varianti di scrittura (maiuscole/minuscole, spazi). Queste entità si normalizzano nello stesso nome: probabili duplicati da riconciliare.',
'entityDuplicates.loading': 'Ricerca dei duplicati…',
'entityDuplicates.metricAffected': 'Coinvolte',
'entityDuplicates.metricClusters': 'Gruppi duplicati',
'entityDuplicates.metricEntities': 'Entità',
'entityDuplicates.namespaceAll': 'Tutti i namespace',
'entityDuplicates.namespaceLabel': 'Namespace',
'entityDuplicates.retry': 'Riprova',
'entityDuplicates.title': 'Entità duplicate',
'entityDuplicates.truncated': 'Mostrando {shown} di {total} gruppi duplicati.',
'entityDuplicates.variantTitle': '{degree} connessioni',
'memory.tab.duplicates': 'Duplicati',
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@app/src/lib/i18n/it.ts` around lines 4210 - 4227, The Italian locale contains
English placeholders for the entityDuplicates.* keys and memory.tab.duplicates;
replace each value for 'entityDuplicates.allClean',
'entityDuplicates.blankEntity', 'entityDuplicates.empty',
'entityDuplicates.emptyHint', 'entityDuplicates.errorPrefix',
'entityDuplicates.heading', 'entityDuplicates.intro',
'entityDuplicates.loading', 'entityDuplicates.metricAffected',
'entityDuplicates.metricClusters', 'entityDuplicates.metricEntities',
'entityDuplicates.namespaceAll', 'entityDuplicates.namespaceLabel',
'entityDuplicates.retry', 'entityDuplicates.title',
'entityDuplicates.truncated', 'entityDuplicates.variantTitle', and
'memory.tab.duplicates' with correct Italian translations (natural phrasing,
preserve interpolation tokens like {shown}, {total}, {degree}), ensuring
punctuation and capitalization match the UI style.

Comment thread app/src/lib/i18n/ru.ts
Comment on lines +4179 to +4196
'entityDuplicates.allClean': 'No duplicate spellings detected — your entities look clean.',
'entityDuplicates.blankEntity': '(blank)',
'entityDuplicates.empty': 'No knowledge graph yet.',
'entityDuplicates.emptyHint': 'As the assistant records entities, any duplicate spellings will surface here.',
'entityDuplicates.errorPrefix': 'Could not load the graph:',
'entityDuplicates.heading': 'Likely duplicate entities',
'entityDuplicates.intro': 'The graph stores names verbatim, so the same thing can fragment across spellings (case, spacing). These entities normalize to the same name — likely duplicates worth reconciling.',
'entityDuplicates.loading': 'Scanning for duplicates…',
'entityDuplicates.metricAffected': 'Affected',
'entityDuplicates.metricClusters': 'Duplicate sets',
'entityDuplicates.metricEntities': 'Entities',
'entityDuplicates.namespaceAll': 'All namespaces',
'entityDuplicates.namespaceLabel': 'Namespace',
'entityDuplicates.retry': 'Retry',
'entityDuplicates.title': 'Duplicate Entities',
'entityDuplicates.truncated': 'Showing {shown} of {total} duplicate sets.',
'entityDuplicates.variantTitle': '{degree} connections',
'memory.tab.duplicates': 'Duplicates',
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major | ⚡ Quick win

Replace English placeholders with real Russian translations.

Lines 4179-4196 add user-visible strings in English inside ru.ts; these should be proper Russian translations before merge.

Proposed translation patch
-  'entityDuplicates.allClean': 'No duplicate spellings detected — your entities look clean.',
-  'entityDuplicates.blankEntity': '(blank)',
-  'entityDuplicates.empty': 'No knowledge graph yet.',
-  'entityDuplicates.emptyHint': 'As the assistant records entities, any duplicate spellings will surface here.',
-  'entityDuplicates.errorPrefix': 'Could not load the graph:',
-  'entityDuplicates.heading': 'Likely duplicate entities',
-  'entityDuplicates.intro': 'The graph stores names verbatim, so the same thing can fragment across spellings (case, spacing). These entities normalize to the same name — likely duplicates worth reconciling.',
-  'entityDuplicates.loading': 'Scanning for duplicates…',
-  'entityDuplicates.metricAffected': 'Affected',
-  'entityDuplicates.metricClusters': 'Duplicate sets',
-  'entityDuplicates.metricEntities': 'Entities',
-  'entityDuplicates.namespaceAll': 'All namespaces',
-  'entityDuplicates.namespaceLabel': 'Namespace',
-  'entityDuplicates.retry': 'Retry',
-  'entityDuplicates.title': 'Duplicate Entities',
-  'entityDuplicates.truncated': 'Showing {shown} of {total} duplicate sets.',
-  'entityDuplicates.variantTitle': '{degree} connections',
-  'memory.tab.duplicates': 'Duplicates',
+  'entityDuplicates.allClean':
+    'Дублирующихся вариантов написания не обнаружено — сущности выглядят чистыми.',
+  'entityDuplicates.blankEntity': '(пусто)',
+  'entityDuplicates.empty': 'Графа знаний пока нет.',
+  'entityDuplicates.emptyHint':
+    'По мере того как ассистент записывает сущности, здесь будут появляться дубли написаний.',
+  'entityDuplicates.errorPrefix': 'Не удалось загрузить граф:',
+  'entityDuplicates.heading': 'Вероятные дубликаты сущностей',
+  'entityDuplicates.intro':
+    'Граф хранит названия как есть, поэтому одна и та же сущность может распасться на варианты написания (регистр, пробелы). Эти варианты нормализуются к одному имени — вероятные дубликаты для объединения.',
+  'entityDuplicates.loading': 'Поиск дубликатов…',
+  'entityDuplicates.metricAffected': 'Затронуто',
+  'entityDuplicates.metricClusters': 'Наборы дубликатов',
+  'entityDuplicates.metricEntities': 'Сущности',
+  'entityDuplicates.namespaceAll': 'Все пространства имён',
+  'entityDuplicates.namespaceLabel': 'Пространство имён',
+  'entityDuplicates.retry': 'Повторить',
+  'entityDuplicates.title': 'Дубликаты сущностей',
+  'entityDuplicates.truncated': 'Показано {shown} из {total} наборов дубликатов.',
+  'entityDuplicates.variantTitle': '{degree} связей',
+  'memory.tab.duplicates': 'Дубликаты',

As per coding guidelines: “When adding or changing i18n keys in app/src/lib/i18n/en.ts, add the same key with a real, correct translation (not English) to every non-English locale file.”

📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
'entityDuplicates.allClean': 'No duplicate spellings detected — your entities look clean.',
'entityDuplicates.blankEntity': '(blank)',
'entityDuplicates.empty': 'No knowledge graph yet.',
'entityDuplicates.emptyHint': 'As the assistant records entities, any duplicate spellings will surface here.',
'entityDuplicates.errorPrefix': 'Could not load the graph:',
'entityDuplicates.heading': 'Likely duplicate entities',
'entityDuplicates.intro': 'The graph stores names verbatim, so the same thing can fragment across spellings (case, spacing). These entities normalize to the same name — likely duplicates worth reconciling.',
'entityDuplicates.loading': 'Scanning for duplicates…',
'entityDuplicates.metricAffected': 'Affected',
'entityDuplicates.metricClusters': 'Duplicate sets',
'entityDuplicates.metricEntities': 'Entities',
'entityDuplicates.namespaceAll': 'All namespaces',
'entityDuplicates.namespaceLabel': 'Namespace',
'entityDuplicates.retry': 'Retry',
'entityDuplicates.title': 'Duplicate Entities',
'entityDuplicates.truncated': 'Showing {shown} of {total} duplicate sets.',
'entityDuplicates.variantTitle': '{degree} connections',
'memory.tab.duplicates': 'Duplicates',
'entityDuplicates.allClean':
'Дублирующихся вариантов написания не обнаружено — сущности выглядят чистыми.',
'entityDuplicates.blankEntity': '(пусто)',
'entityDuplicates.empty': 'Графа знаний пока нет.',
'entityDuplicates.emptyHint':
'По мере того как ассистент записывает сущности, здесь будут появляться дубли написаний.',
'entityDuplicates.errorPrefix': 'Не удалось загрузить граф:',
'entityDuplicates.heading': 'Вероятные дубликаты сущностей',
'entityDuplicates.intro':
'Граф хранит названия как есть, поэтому одна и та же сущность может распасться на варианты написания (регистр, пробелы). Эти варианты нормализуются к одному имени — вероятные дубликаты для объединения.',
'entityDuplicates.loading': 'Поиск дубликатов…',
'entityDuplicates.metricAffected': 'Затронуто',
'entityDuplicates.metricClusters': 'Наборы дубликатов',
'entityDuplicates.metricEntities': 'Сущности',
'entityDuplicates.namespaceAll': 'Все пространства имён',
'entityDuplicates.namespaceLabel': 'Пространство имён',
'entityDuplicates.retry': 'Повторить',
'entityDuplicates.title': 'Дубликаты сущностей',
'entityDuplicates.truncated': 'Показано {shown} из {total} наборов дубликатов.',
'entityDuplicates.variantTitle': '{degree} связей',
'memory.tab.duplicates': 'Дубликаты',
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@app/src/lib/i18n/ru.ts` around lines 4179 - 4196, The i18n entries for
Russian are still in English; replace each English string with a correct Russian
translation for the keys 'entityDuplicates.allClean',
'entityDuplicates.blankEntity', 'entityDuplicates.empty',
'entityDuplicates.emptyHint', 'entityDuplicates.errorPrefix',
'entityDuplicates.heading', 'entityDuplicates.intro',
'entityDuplicates.loading', 'entityDuplicates.metricAffected',
'entityDuplicates.metricClusters', 'entityDuplicates.metricEntities',
'entityDuplicates.namespaceAll', 'entityDuplicates.namespaceLabel',
'entityDuplicates.retry', 'entityDuplicates.title',
'entityDuplicates.truncated', 'entityDuplicates.variantTitle', and
'memory.tab.duplicates'—keeping placeholders like {shown}, {total}, and {degree}
intact and grammar-appropriate in Russian. Ensure translations are natural,
match existing locale style, and follow pluralization/placeholders exactly
before committing.

Comment thread app/src/lib/i18n/zh-CN.ts
Comment on lines +3941 to +3958
'entityDuplicates.allClean': 'No duplicate spellings detected — your entities look clean.',
'entityDuplicates.blankEntity': '(blank)',
'entityDuplicates.empty': 'No knowledge graph yet.',
'entityDuplicates.emptyHint': 'As the assistant records entities, any duplicate spellings will surface here.',
'entityDuplicates.errorPrefix': 'Could not load the graph:',
'entityDuplicates.heading': 'Likely duplicate entities',
'entityDuplicates.intro': 'The graph stores names verbatim, so the same thing can fragment across spellings (case, spacing). These entities normalize to the same name — likely duplicates worth reconciling.',
'entityDuplicates.loading': 'Scanning for duplicates…',
'entityDuplicates.metricAffected': 'Affected',
'entityDuplicates.metricClusters': 'Duplicate sets',
'entityDuplicates.metricEntities': 'Entities',
'entityDuplicates.namespaceAll': 'All namespaces',
'entityDuplicates.namespaceLabel': 'Namespace',
'entityDuplicates.retry': 'Retry',
'entityDuplicates.title': 'Duplicate Entities',
'entityDuplicates.truncated': 'Showing {shown} of {total} duplicate sets.',
'entityDuplicates.variantTitle': '{degree} connections',
'memory.tab.duplicates': 'Duplicates',
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major | ⚡ Quick win

Replace English placeholders with real Simplified Chinese translations.

These new entityDuplicates.* and memory.tab.duplicates strings are still in English in zh-CN, so Chinese users will see untranslated UI copy.

🌐 Suggested zh-CN translations
-  'entityDuplicates.allClean': 'No duplicate spellings detected — your entities look clean.',
+  'entityDuplicates.allClean': '未检测到重复拼写——你的实体看起来很干净。',
-  'entityDuplicates.blankEntity': '(blank)',
+  'entityDuplicates.blankEntity': '(空白)',
-  'entityDuplicates.empty': 'No knowledge graph yet.',
+  'entityDuplicates.empty': '暂无知识图谱。',
-  'entityDuplicates.emptyHint': 'As the assistant records entities, any duplicate spellings will surface here.',
+  'entityDuplicates.emptyHint': '随着助手记录实体,任何重复拼写都会显示在这里。',
-  'entityDuplicates.errorPrefix': 'Could not load the graph:',
+  'entityDuplicates.errorPrefix': '无法加载图谱:',
-  'entityDuplicates.heading': 'Likely duplicate entities',
+  'entityDuplicates.heading': '可能重复的实体',
-  'entityDuplicates.intro': 'The graph stores names verbatim, so the same thing can fragment across spellings (case, spacing). These entities normalize to the same name — likely duplicates worth reconciling.',
+  'entityDuplicates.intro': '图谱按原样存储名称,因此同一对象可能因拼写(大小写、空格)而分散。以下实体归一化后名称相同——很可能是值得合并的重复项。',
-  'entityDuplicates.loading': 'Scanning for duplicates…',
+  'entityDuplicates.loading': '正在扫描重复项…',
-  'entityDuplicates.metricAffected': 'Affected',
+  'entityDuplicates.metricAffected': '受影响',
-  'entityDuplicates.metricClusters': 'Duplicate sets',
+  'entityDuplicates.metricClusters': '重复组',
-  'entityDuplicates.metricEntities': 'Entities',
+  'entityDuplicates.metricEntities': '实体',
-  'entityDuplicates.namespaceAll': 'All namespaces',
+  'entityDuplicates.namespaceAll': '所有命名空间',
-  'entityDuplicates.namespaceLabel': 'Namespace',
+  'entityDuplicates.namespaceLabel': '命名空间',
-  'entityDuplicates.retry': 'Retry',
+  'entityDuplicates.retry': '重试',
-  'entityDuplicates.title': 'Duplicate Entities',
+  'entityDuplicates.title': '重复实体',
-  'entityDuplicates.truncated': 'Showing {shown} of {total} duplicate sets.',
+  'entityDuplicates.truncated': '显示 {total} 个重复组中的 {shown} 个。',
-  'entityDuplicates.variantTitle': '{degree} connections',
+  'entityDuplicates.variantTitle': '{degree} 个连接',
-  'memory.tab.duplicates': 'Duplicates',
+  'memory.tab.duplicates': '重复项',

As per coding guidelines: “When adding or changing i18n keys in app/src/lib/i18n/en.ts, add the same key with a real, correct translation (not English) to every non-English locale file.”

📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
'entityDuplicates.allClean': 'No duplicate spellings detected — your entities look clean.',
'entityDuplicates.blankEntity': '(blank)',
'entityDuplicates.empty': 'No knowledge graph yet.',
'entityDuplicates.emptyHint': 'As the assistant records entities, any duplicate spellings will surface here.',
'entityDuplicates.errorPrefix': 'Could not load the graph:',
'entityDuplicates.heading': 'Likely duplicate entities',
'entityDuplicates.intro': 'The graph stores names verbatim, so the same thing can fragment across spellings (case, spacing). These entities normalize to the same name — likely duplicates worth reconciling.',
'entityDuplicates.loading': 'Scanning for duplicates…',
'entityDuplicates.metricAffected': 'Affected',
'entityDuplicates.metricClusters': 'Duplicate sets',
'entityDuplicates.metricEntities': 'Entities',
'entityDuplicates.namespaceAll': 'All namespaces',
'entityDuplicates.namespaceLabel': 'Namespace',
'entityDuplicates.retry': 'Retry',
'entityDuplicates.title': 'Duplicate Entities',
'entityDuplicates.truncated': 'Showing {shown} of {total} duplicate sets.',
'entityDuplicates.variantTitle': '{degree} connections',
'memory.tab.duplicates': 'Duplicates',
'entityDuplicates.allClean': '未检测到重复拼写——你的实体看起来很干净。',
'entityDuplicates.blankEntity': '(空白)',
'entityDuplicates.empty': '暂无知识图谱。',
'entityDuplicates.emptyHint': '随着助手记录实体,任何重复拼写都会显示在这里。',
'entityDuplicates.errorPrefix': '无法加载图谱:',
'entityDuplicates.heading': '可能重复的实体',
'entityDuplicates.intro': '图谱按原样存储名称,因此同一对象可能因拼写(大小写、空格)而分散。以下实体归一化后名称相同——很可能是值得合并的重复项。',
'entityDuplicates.loading': '正在扫描重复项…',
'entityDuplicates.metricAffected': '受影响',
'entityDuplicates.metricClusters': '重复组',
'entityDuplicates.metricEntities': '实体',
'entityDuplicates.namespaceAll': '所有命名空间',
'entityDuplicates.namespaceLabel': '命名空间',
'entityDuplicates.retry': '重试',
'entityDuplicates.title': '重复实体',
'entityDuplicates.truncated': '显示 {total} 个重复组中的 {shown} 个。',
'entityDuplicates.variantTitle': '{degree} 个连接',
'memory.tab.duplicates': '重复项',
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@app/src/lib/i18n/zh-CN.ts` around lines 3941 - 3958, The listed i18n keys
(entityDuplicates.allClean, entityDuplicates.blankEntity,
entityDuplicates.empty, entityDuplicates.emptyHint,
entityDuplicates.errorPrefix, entityDuplicates.heading, entityDuplicates.intro,
entityDuplicates.loading, entityDuplicates.metricAffected,
entityDuplicates.metricClusters, entityDuplicates.metricEntities,
entityDuplicates.namespaceAll, entityDuplicates.namespaceLabel,
entityDuplicates.retry, entityDuplicates.title, entityDuplicates.truncated,
entityDuplicates.variantTitle, and memory.tab.duplicates) are still in English
in zh-CN.ts—replace each value with a correct Simplified Chinese translation
while preserving placeholders like {shown}, {total}, and {degree} and keeping
punctuation/ellipsis semantics exactly; ensure translations are natural,
concise, and match the tone of the other zh-CN entries.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

feature Net-new user-facing capability or product behavior. memory Memory store, memory tree, recall, summarization, and embeddings in src/openhuman/memory/. working A PR that is being worked on by the team.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants