Skip to content

feat(intelligence): add Graph Export#2967

Open
aashir-athar wants to merge 2 commits into
tinyhumansai:mainfrom
aashir-athar:feat/graph-export
Open

feat(intelligence): add Graph Export#2967
aashir-athar wants to merge 2 commits into
tinyhumansai:mainfrom
aashir-athar:feat/graph-export

Conversation

@aashir-athar
Copy link
Copy Markdown
Contributor

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

Summary

Adds a new read-only "Export" tab for data portability: download the entire memory knowledge graph as JSON or CSV. A different kind of feature from the analytics lenses — it's about giving the user ownership of their data ("your memory, yours to keep").

Design

  • Pure deterministic serializers (lib/memory/graphExport.ts): toJsonExport and toCsvExport over a stable {subject, predicate, object, namespace, evidenceCount, updatedAt} projection (malformed rows dropped). The CSV follows RFC 4180 — a field is quoted when it contains a comma, double-quote, CR, or LF; embedded double-quotes are doubled; rows are CRLF-terminated — so entity names with commas/quotes/newlines round-trip safely.
  • Zero new core surface: reuses only memoryGraphQuery. Read-only — the download itself (Blob + object URL + anchor) happens in the container's click handler, never during render, so the engine stays pure.
  • Container/presentational split; the container guards the load with a monotonic request token; the pure panel renders the export-ready count + a JSON/CSV format toggle + a download button. i18n across all 13 locales.

Test plan

  • vitest — 19 tests (engine: projection/malformed-drop/null-namespace/non-finite normalization, JSON round-trip, CSV RFC-4180 escaping for commas/quotes/newlines + CRLF + empty-graph header, format dispatch + MIME; api facade; panel states + format toggle/download callbacks; container load + Blob-download trigger + error)
  • tsc --noEmit — clean
  • eslint — 0 errors
  • prettier --check — clean
  • i18n coverage gate — EXIT 0, no unused graphExport.* keys

🤖 Generated with Claude Code

Summary by CodeRabbit

Release Notes

  • New Features
    • Added knowledge graph export functionality supporting JSON and CSV formats.
    • New export tab displays count of facts ready to export.
    • Download exported data as JSON or CSV files.
    • Error handling with retry option for failed exports.
    • Loading and empty state messaging included.

Review Change Stack

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

coderabbitai Bot commented May 29, 2026

Caution

Review failed

Failed to post review comments

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

This PR introduces a complete knowledge graph export feature enabling users to download facts as JSON or CSV. The change spans serialization utilities, an API loader, presentational and container React components, and internationalization strings across 14 locales.

Changes

Knowledge Graph Export Feature

Layer / File(s) Summary
Export data serialization and contracts
app/src/lib/memory/graphExport.ts, app/src/lib/memory/graphExport.test.ts
Exports ExportFormat, ExportRow types and pure functions: toExportRows filters malformed relations and normalizes fields, toJsonExport produces pretty-printed JSON, toCsvExport generates RFC 4180 CSV with CRLF terminators and proper quote escaping, serializeGraph dispatches between formats, and exportMimeType maps formats to MIME types. Tests validate row normalization, JSON parsing, CSV escaping (commas, quotes, newlines), header emission, and MIME mapping.
Graph export API facade
app/src/services/api/graphExportApi.ts, app/src/services/api/graphExportApi.test.ts
loadGraphRelations() fetches all graph relations via memoryGraphQuery, logs count, and returns the array. Tests verify successful no-arg fetch, error propagation, and API surface.
Export presentational component
app/src/components/intelligence/GraphExportPanel.tsx, app/src/components/intelligence/GraphExportPanel.test.tsx
Stateless GraphExportPanel renders loading skeleton, error alert with optional retry button, empty state, or populated UI with exportable count, JSON/CSV format radio selection, and download button. Callbacks wire format changes and download action. Tests assert all four UI states and interaction handlers.
Export container and download orchestration
app/src/components/intelligence/GraphExportTab.tsx, app/src/components/intelligence/GraphExportTab.test.tsx
GraphExportTab loads relations on mount via API, tracks loading/error state, uses monotonic request ID to ignore stale responses, computes exportable count, manages format selection, serializes and downloads via Blob with timestamped filename. Renders GraphExportPanel fully wired. Tests mock API and URL APIs, verify mount/download/error flows.
Internationalization across locales
app/src/lib/i18n/en.ts, app/src/lib/i18n/ar.ts, app/src/lib/i18n/bn.ts, app/src/lib/i18n/de.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
Adds memory.tab.export and complete graphExport.* translation keys (title, intro, loading/error/empty states, format labels, download button, retry text) for all 14 supported locales, surfacing export UI strings globally.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Suggested reviewers

  • graycyrus
  • sanil-23

🐰 A graph exported, in formats clean,
JSON, CSV, the finest seen,
Relations dance from source to screen,
Download now—the knowledge's cuisine! ✨📊

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 63.64% 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 PR title 'feat(intelligence): add Graph Export' accurately and concisely describes the main change: adding a Graph Export feature to 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.

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: 2

🤖 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/GraphExportTab.tsx`:
- Around line 47-54: The blob URL is revoked immediately after anchor.click(),
which can cancel the download; update the download flow in GraphExportTab to
defer revocation like the pattern used in McpInventoryExportTab: create the URL
(url), set anchor.href and download, append and call anchor.click(), then defer
URL.revokeObjectURL(url) (for example via setTimeout or a short delay/onfocus
handler) and remove the anchor afterwards so the browser has time to start the
download; reference variables/functions: url, anchor, nowSeconds(), format.
- Around line 58-59: Replace the raw relation count with the number of
exportable rows: import toExportRows from ../../lib/memory/graphExport, compute
exportableRows = relations ? toExportRows(relations).length : null, and pass
count={exportableRows} into the GraphExportPanel so the badge reflects the
actual rows serializeGraph() will produce (handle null/undefined relations as
before).
🪄 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: 162f7226-6bf1-48f1-aa87-be65e34b6559

📥 Commits

Reviewing files that changed from the base of the PR and between f895013 and 73ae7c0.

📒 Files selected for processing (23)
  • app/src/components/intelligence/GraphExportPanel.test.tsx
  • app/src/components/intelligence/GraphExportPanel.tsx
  • app/src/components/intelligence/GraphExportTab.test.tsx
  • app/src/components/intelligence/GraphExportTab.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/graphExport.test.ts
  • app/src/lib/memory/graphExport.ts
  • app/src/pages/Intelligence.tsx
  • app/src/services/api/graphExportApi.test.ts
  • app/src/services/api/graphExportApi.ts

Comment thread app/src/components/intelligence/GraphExportTab.tsx Outdated
Comment thread app/src/components/intelligence/GraphExportTab.tsx Outdated
@sanil-23 sanil-23 self-assigned this May 29, 2026
aashir-athar added a commit to aashir-athar/openhuman that referenced this pull request May 29, 2026
…count

Address CodeRabbit review on tinyhumansai#2967:
- Defer URL.revokeObjectURL to a macrotask so the browser has started reading
  the Blob before it is freed (synchronous revoke can cancel the download).
- Show the EXPORTABLE row count (toExportRows drops malformed relations), not
  the raw relations.length, so the "N facts ready to export" label is accurate.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
coderabbitai[bot]
coderabbitai Bot previously approved these changes May 29, 2026
aashir-athar added a commit to aashir-athar/openhuman that referenced this pull request May 30, 2026
…count

Address CodeRabbit review on tinyhumansai#2967:
- Defer URL.revokeObjectURL to a macrotask so the browser has started reading
  the Blob before it is freed (synchronous revoke can cancel the download).
- Show the EXPORTABLE row count (toExportRows drops malformed relations), not
  the raw relations.length, so the "N facts ready to export" label is accurate.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
aashir-athar added a commit to aashir-athar/openhuman that referenced this pull request May 30, 2026
…count

Address CodeRabbit review on tinyhumansai#2967:
- Defer URL.revokeObjectURL to a macrotask so the browser has started reading
  the Blob before it is freed (synchronous revoke can cancel the download).
- Show the EXPORTABLE row count (toExportRows drops malformed relations), not
  the raw relations.length, so the "N facts ready to export" label is accurate.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
coderabbitai[bot]
coderabbitai Bot previously approved these changes May 30, 2026
aashir-athar added a commit to aashir-athar/openhuman that referenced this pull request May 30, 2026
…count

Address CodeRabbit review on tinyhumansai#2967:
- Defer URL.revokeObjectURL to a macrotask so the browser has started reading
  the Blob before it is freed (synchronous revoke can cancel the download).
- Show the EXPORTABLE row count (toExportRows drops malformed relations), not
  the raw relations.length, so the "N facts ready to export" label is accurate.

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: 8

🤖 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-4150: The Bengali locale file bn.ts still contains English
text for the new graphExport keys; replace each English string for keys
'graphExport.countLabel', 'graphExport.downloadButton', 'graphExport.empty',
'graphExport.emptyHint', 'graphExport.errorPrefix', 'graphExport.formatCsv',
'graphExport.formatJson', 'graphExport.formatLabel', 'graphExport.intro',
'graphExport.loading', 'graphExport.retry', 'graphExport.title' (and
'memory.tab.export' if needed) with proper Bengali translations while preserving
placeholders like {count} and {format} exactly as-is and keeping
punctuation/ellipsis semantics consistent; update those string values in bn.ts
so the non-English locale contains real Bengali text for each listed key.

In `@app/src/lib/i18n/de.ts`:
- Around line 4249-4261: The German locale still contains English text for the
graph export keys; update each key in de.ts (e.g. 'graphExport.countLabel',
'graphExport.downloadButton', 'graphExport.empty', 'graphExport.emptyHint',
'graphExport.errorPrefix', 'graphExport.formatCsv', 'graphExport.formatJson',
'graphExport.formatLabel', 'graphExport.intro', 'graphExport.loading',
'graphExport.retry', 'graphExport.title' and 'memory.tab.export') with proper
German translations (not English) so the German UI is fully localized; replace
the string values for those keys with correct German wording consistent with
existing style and punctuation.

In `@app/src/lib/i18n/fr.ts`:
- Around line 4232-4243: The new i18n keys (graphExport.countLabel,
graphExport.downloadButton, graphExport.empty, graphExport.emptyHint,
graphExport.errorPrefix, graphExport.formatCsv, graphExport.formatJson,
graphExport.formatLabel, graphExport.intro, graphExport.loading,
graphExport.title, memory.tab.export) are still in English inside fr.ts; replace
each English string with a correct French translation while preserving
interpolation tokens ({count}, {format}) and punctuation/ellipsis, e.g. provide
a proper French plural-aware phrasing for graphExport.countLabel, translate
download/format labels (CSV/JSON) and the intro/loading/title/empty messages,
and ensure memory.tab.export is translated to the French equivalent.

In `@app/src/lib/i18n/hi.ts`:
- Around line 4145-4156: The listed graphExport.* entries are still English;
replace each English string with a proper Hindi translation for the keys
'graphExport.countLabel', 'graphExport.downloadButton', 'graphExport.empty',
'graphExport.emptyHint', 'graphExport.errorPrefix', 'graphExport.formatCsv',
'graphExport.formatJson', 'graphExport.formatLabel', 'graphExport.intro',
'graphExport.loading', 'graphExport.title' (and keep 'memory.tab.export' if
needed) preserving placeholders like {count} and {format} and
punctuation/ellipsis; update the values in the hi locale so users see real Hindi
text (e.g., provide accurate Hindi phrases for title, intro, labels, buttons,
loading and error messages).

In `@app/src/lib/i18n/ko.ts`:
- Around line 4108-4119: The graph export i18n keys are still in English; update
the listed keys in app/src/lib/i18n/ko.ts (graphExport.countLabel,
graphExport.downloadButton, graphExport.empty, graphExport.emptyHint,
graphExport.errorPrefix, graphExport.formatCsv, graphExport.formatJson,
graphExport.formatLabel, graphExport.intro, graphExport.loading,
graphExport.title, memory.tab.export) so they contain correct Korean
translations (replace the English placeholder text with proper Korean strings),
e.g. graphExport.countLabel -> "{count}개의 내보낼 사실이 준비되었습니다.",
graphExport.downloadButton -> "{format} 다운로드", graphExport.empty -> "내보낼 지식 그래프가
없습니다.", graphExport.emptyHint -> "어시스턴트가 귀하에 대한 사실을 기록하면 여기에서 내보낼 수 있습니다.",
graphExport.errorPrefix -> "그래프를 불러올 수 없습니다:", graphExport.formatCsv -> "CSV",
graphExport.formatJson -> "JSON", graphExport.formatLabel -> "형식",
graphExport.intro -> "지식 그래프를 가져가세요. 기록된 모든 사실을 JSON 또는 CSV로 다운로드할 수 있습니다 — 귀하의
데이터, 이동 가능하고 보관은 귀하의 권한입니다.", graphExport.loading -> "그래프 로딩 중…",
graphExport.title -> "그래프 내보내기", memory.tab.export -> "내보내기".

In `@app/src/lib/i18n/pl.ts`:
- Around line 4211-4221: The new i18n keys (graphExport.countLabel,
graphExport.downloadButton, graphExport.empty, graphExport.emptyHint,
graphExport.errorPrefix, graphExport.formatCsv, graphExport.formatJson,
graphExport.formatLabel, graphExport.intro, graphExport.loading and
memory.tab.export) were added in English inside app/src/lib/i18n/pl.ts; replace
those English strings with correct Polish translations preserving placeholders
like {count} and {format} and punctuation/ellipsis characters exactly where
needed (e.g., graphExport.countLabel should keep "{count}" and
graphExport.downloadButton should keep "{format}"); update the values in the
pl.ts file for the matching keys ensuring accurate Polish grammar, diacritics,
and natural phrasing.

In `@app/src/lib/i18n/ru.ts`:
- Around line 4179-4189: Replace the English fallback strings in ru.ts for the
graph export UI keys with proper Russian translations: set
graphExport.countLabel to "Готово к экспорту {count} фактов.",
graphExport.downloadButton to "Скачать {format}", graphExport.empty to "Пока нет
графа знаний для экспорта.", graphExport.emptyHint to "Когда ассистент
зафиксирует факты о вас, вы сможете экспортировать их здесь.",
graphExport.errorPrefix to "Не удалось загрузить граф:", graphExport.formatCsv
to "CSV", graphExport.formatJson to "JSON", graphExport.formatLabel to "Формат",
graphExport.intro to "Заберите свой граф знаний с собой. Скачайте все
сохранённые факты в формате JSON или CSV — ваши данные, портативные и ваши для
хранения.", graphExport.loading to "Загрузка графа…", and memory.tab.export to
"Экспорт" so Russian users see correct localized UI instead of English
fallbacks.

In `@app/src/lib/i18n/zh-CN.ts`:
- Around line 3941-3951: The new localization keys (graphExport.countLabel,
graphExport.downloadButton, graphExport.empty, graphExport.emptyHint,
graphExport.errorPrefix, graphExport.formatCsv, graphExport.formatJson,
graphExport.formatLabel, graphExport.intro, graphExport.loading,
memory.tab.export) are still in English; replace each English string with proper
Simplified Chinese translations—for example: graphExport.countLabel -> "已准备好
{count} 条事实,可导出。", graphExport.downloadButton -> "下载 {format}",
graphExport.empty -> "暂时没有可导出的知识图谱。", graphExport.emptyHint ->
"当助手记录有关你的事实后,您可以在此处导出它们。", graphExport.errorPrefix -> "无法加载图谱:",
graphExport.formatCsv -> "CSV", graphExport.formatJson -> "JSON",
graphExport.formatLabel -> "格式", graphExport.intro -> "将您的知识图谱随身携带。以 JSON 或 CSV
格式下载所有记录的事实——您的数据,可移植且归您所有。", graphExport.loading -> "正在加载图谱…", and set
memory.tab.export to "导出" (matching common.export); update the values for these
keys accordingly.
🪄 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: fd50dec6-e60a-4084-96df-5c56e962a42d

📥 Commits

Reviewing files that changed from the base of the PR and between b3e5324 and 28d7cdd.

📒 Files selected for processing (15)
  • app/src/components/intelligence/GraphExportTab.tsx
  • app/src/lib/i18n/ar.ts
  • app/src/lib/i18n/bn.ts
  • app/src/lib/i18n/de.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 (5)
  • app/src/lib/i18n/pt.ts
  • app/src/lib/i18n/it.ts
  • app/src/lib/i18n/ar.ts
  • app/src/lib/i18n/es.ts
  • app/src/lib/i18n/id.ts
🚧 Files skipped from review as they are similar to previous changes (2)
  • app/src/pages/Intelligence.tsx
  • app/src/components/intelligence/GraphExportTab.tsx

Comment thread app/src/lib/i18n/bn.ts
Comment on lines +4138 to +4150
'graphExport.countLabel': '{count} facts ready to export.',
'graphExport.downloadButton': 'Download {format}',
'graphExport.empty': 'No knowledge graph to export yet.',
'graphExport.emptyHint': 'Once the assistant records facts about you, you can export them here.',
'graphExport.errorPrefix': 'Could not load the graph:',
'graphExport.formatCsv': 'CSV',
'graphExport.formatJson': 'JSON',
'graphExport.formatLabel': 'Format',
'graphExport.intro': 'Take your knowledge graph with you. Download every recorded fact as JSON or CSV — your data, portable and yours to keep.',
'graphExport.loading': 'Loading the graph…',
'graphExport.retry': 'Retry',
'graphExport.title': 'Graph Export',
'memory.tab.export': 'Export',
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 | 🟡 Minor | ⚡ Quick win

Replace English placeholders with real Bengali translations for new graphExport keys.

These newly added values are still in English in bn.ts, which violates locale requirements for non-English files.

🌐 Suggested translation patch
-  'graphExport.countLabel': '{count} facts ready to export.',
-  'graphExport.downloadButton': 'Download {format}',
-  'graphExport.empty': 'No knowledge graph to export yet.',
-  'graphExport.emptyHint': 'Once the assistant records facts about you, you can export them here.',
-  'graphExport.errorPrefix': 'Could not load the graph:',
+  'graphExport.countLabel': '{count}টি তথ্য রপ্তানির জন্য প্রস্তুত।',
+  'graphExport.downloadButton': '{format} ডাউনলোড করুন',
+  'graphExport.empty': 'এখনো রপ্তানি করার মতো কোনো জ্ঞান গ্রাফ নেই।',
+  'graphExport.emptyHint': 'সহকারী আপনার সম্পর্কে তথ্য সংরক্ষণ করলে, আপনি এখান থেকে সেগুলো রপ্তানি করতে পারবেন।',
+  'graphExport.errorPrefix': 'গ্রাফ লোড করা যায়নি:',
   'graphExport.formatCsv': 'CSV',
   'graphExport.formatJson': 'JSON',
-  'graphExport.formatLabel': 'Format',
-  'graphExport.intro': 'Take your knowledge graph with you. Download every recorded fact as JSON or CSV — your data, portable and yours to keep.',
-  'graphExport.loading': 'Loading the graph…',
-  'graphExport.retry': 'Retry',
-  'graphExport.title': 'Graph Export',
-  'memory.tab.export': 'Export',
+  'graphExport.formatLabel': 'ফরম্যাট',
+  'graphExport.intro': 'আপনার জ্ঞান গ্রাফ সঙ্গে রাখুন। রেকর্ড করা সব তথ্য JSON বা CSV হিসেবে ডাউনলোড করুন — আপনার ডেটা, বহনযোগ্য এবং আপনারই।',
+  'graphExport.loading': 'গ্রাফ লোড হচ্ছে…',
+  'graphExport.retry': 'আবার চেষ্টা করুন',
+  'graphExport.title': 'গ্রাফ রপ্তানি',
+  'memory.tab.export': 'রপ্তানি',

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 - 4150, The Bengali locale file
bn.ts still contains English text for the new graphExport keys; replace each
English string for keys 'graphExport.countLabel', 'graphExport.downloadButton',
'graphExport.empty', 'graphExport.emptyHint', 'graphExport.errorPrefix',
'graphExport.formatCsv', 'graphExport.formatJson', 'graphExport.formatLabel',
'graphExport.intro', 'graphExport.loading', 'graphExport.retry',
'graphExport.title' (and 'memory.tab.export' if needed) with proper Bengali
translations while preserving placeholders like {count} and {format} exactly
as-is and keeping punctuation/ellipsis semantics consistent; update those string
values in bn.ts so the non-English locale contains real Bengali text for each
listed key.

Comment thread app/src/lib/i18n/de.ts
Comment on lines +4249 to +4261
'graphExport.countLabel': '{count} facts ready to export.',
'graphExport.downloadButton': 'Download {format}',
'graphExport.empty': 'No knowledge graph to export yet.',
'graphExport.emptyHint': 'Once the assistant records facts about you, you can export them here.',
'graphExport.errorPrefix': 'Could not load the graph:',
'graphExport.formatCsv': 'CSV',
'graphExport.formatJson': 'JSON',
'graphExport.formatLabel': 'Format',
'graphExport.intro': 'Take your knowledge graph with you. Download every recorded fact as JSON or CSV — your data, portable and yours to keep.',
'graphExport.loading': 'Loading the graph…',
'graphExport.retry': 'Retry',
'graphExport.title': 'Graph Export',
'memory.tab.export': 'Export',
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 | 🟡 Minor | ⚡ Quick win

Replace English graph-export strings with German translations.

These new graphExport.* and memory.tab.export entries are user-facing but still English in de.ts, causing mixed-language UI in German locale.

🌐 Proposed translation patch
-  'graphExport.countLabel': '{count} facts ready to export.',
-  'graphExport.downloadButton': 'Download {format}',
-  'graphExport.empty': 'No knowledge graph to export yet.',
-  'graphExport.emptyHint': 'Once the assistant records facts about you, you can export them here.',
-  'graphExport.errorPrefix': 'Could not load the graph:',
+  'graphExport.countLabel': '{count} Fakten zum Export bereit.',
+  'graphExport.downloadButton': '{format} herunterladen',
+  'graphExport.empty': 'Noch kein Wissensgraph zum Exportieren vorhanden.',
+  'graphExport.emptyHint': 'Sobald der Assistent Fakten über dich erfasst, kannst du sie hier exportieren.',
+  'graphExport.errorPrefix': 'Der Graph konnte nicht geladen werden:',
   'graphExport.formatCsv': 'CSV',
   'graphExport.formatJson': 'JSON',
-  'graphExport.formatLabel': 'Format',
-  'graphExport.intro': 'Take your knowledge graph with you. Download every recorded fact as JSON or CSV — your data, portable and yours to keep.',
-  'graphExport.loading': 'Loading the graph…',
-  'graphExport.retry': 'Retry',
-  'graphExport.title': 'Graph Export',
-  'memory.tab.export': 'Export',
+  'graphExport.formatLabel': 'Format',
+  'graphExport.intro': 'Nimm deinen Wissensgraphen mit. Lade jede erfasste Tatsache als JSON oder CSV herunter — deine Daten, portabel und unter deiner Kontrolle.',
+  'graphExport.loading': 'Graph wird geladen…',
+  'graphExport.retry': 'Erneut versuchen',
+  'graphExport.title': 'Graph-Export',
+  'memory.tab.export': 'Exportieren',

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
'graphExport.countLabel': '{count} facts ready to export.',
'graphExport.downloadButton': 'Download {format}',
'graphExport.empty': 'No knowledge graph to export yet.',
'graphExport.emptyHint': 'Once the assistant records facts about you, you can export them here.',
'graphExport.errorPrefix': 'Could not load the graph:',
'graphExport.formatCsv': 'CSV',
'graphExport.formatJson': 'JSON',
'graphExport.formatLabel': 'Format',
'graphExport.intro': 'Take your knowledge graph with you. Download every recorded fact as JSON or CSV — your data, portable and yours to keep.',
'graphExport.loading': 'Loading the graph…',
'graphExport.retry': 'Retry',
'graphExport.title': 'Graph Export',
'memory.tab.export': 'Export',
'graphExport.countLabel': '{count} Fakten zum Export bereit.',
'graphExport.downloadButton': '{format} herunterladen',
'graphExport.empty': 'Noch kein Wissensgraph zum Exportieren vorhanden.',
'graphExport.emptyHint': 'Sobald der Assistent Fakten über dich erfasst, kannst du sie hier exportieren.',
'graphExport.errorPrefix': 'Der Graph konnte nicht geladen werden:',
'graphExport.formatCsv': 'CSV',
'graphExport.formatJson': 'JSON',
'graphExport.formatLabel': 'Format',
'graphExport.intro': 'Nimm deinen Wissensgraphen mit. Lade jede erfasste Tatsache als JSON oder CSV herunter — deine Daten, portabel und unter deiner Kontrolle.',
'graphExport.loading': 'Graph wird geladen…',
'graphExport.retry': 'Erneut versuchen',
'graphExport.title': 'Graph-Export',
'memory.tab.export': 'Exportieren',
🤖 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/de.ts` around lines 4249 - 4261, The German locale still
contains English text for the graph export keys; update each key in de.ts (e.g.
'graphExport.countLabel', 'graphExport.downloadButton', 'graphExport.empty',
'graphExport.emptyHint', 'graphExport.errorPrefix', 'graphExport.formatCsv',
'graphExport.formatJson', 'graphExport.formatLabel', 'graphExport.intro',
'graphExport.loading', 'graphExport.retry', 'graphExport.title' and
'memory.tab.export') with proper German translations (not English) so the German
UI is fully localized; replace the string values for those keys with correct
German wording consistent with existing style and punctuation.

Comment thread app/src/lib/i18n/fr.ts
Comment on lines +4232 to +4243
'graphExport.countLabel': '{count} facts ready to export.',
'graphExport.downloadButton': 'Download {format}',
'graphExport.empty': 'No knowledge graph to export yet.',
'graphExport.emptyHint': 'Once the assistant records facts about you, you can export them here.',
'graphExport.errorPrefix': 'Could not load the graph:',
'graphExport.formatCsv': 'CSV',
'graphExport.formatJson': 'JSON',
'graphExport.formatLabel': 'Format',
'graphExport.intro': 'Take your knowledge graph with you. Download every recorded fact as JSON or CSV — your data, portable and yours to keep.',
'graphExport.loading': 'Loading the graph…',
'graphExport.title': 'Graph Export',
'memory.tab.export': 'Export',
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 graphExport.* and memory.tab.export keys into French (currently English).

Lines 4232-4243 introduce user-facing strings in English inside fr.ts, which breaks locale correctness for French users.

🌐 Proposed fix
-  'graphExport.countLabel': '{count} facts ready to export.',
-  'graphExport.downloadButton': 'Download {format}',
-  'graphExport.empty': 'No knowledge graph to export yet.',
-  'graphExport.emptyHint': 'Once the assistant records facts about you, you can export them here.',
-  'graphExport.errorPrefix': 'Could not load the graph:',
+  'graphExport.countLabel': '{count} faits prêts à être exportés.',
+  'graphExport.downloadButton': 'Télécharger {format}',
+  'graphExport.empty': "Aucun graphe de connaissances à exporter pour l'instant.",
+  'graphExport.emptyHint': "Une fois que l'assistant enregistre des faits sur vous, vous pourrez les exporter ici.",
+  'graphExport.errorPrefix': 'Impossible de charger le graphe :',
   'graphExport.formatCsv': 'CSV',
   'graphExport.formatJson': 'JSON',
   'graphExport.formatLabel': 'Format',
-  'graphExport.intro': 'Take your knowledge graph with you. Download every recorded fact as JSON or CSV — your data, portable and yours to keep.',
-  'graphExport.loading': 'Loading the graph…',
-  'graphExport.title': 'Graph Export',
-  'memory.tab.export': 'Export',
+  'graphExport.intro': 'Emportez votre graphe de connaissances. Téléchargez chaque fait enregistré en JSON ou CSV — vos données, portables et à vous.',
+  'graphExport.loading': 'Chargement du graphe…',
+  'graphExport.title': 'Export du graphe',
+  'memory.tab.export': 'Exporter',

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 - 4243, The new i18n keys
(graphExport.countLabel, graphExport.downloadButton, graphExport.empty,
graphExport.emptyHint, graphExport.errorPrefix, graphExport.formatCsv,
graphExport.formatJson, graphExport.formatLabel, graphExport.intro,
graphExport.loading, graphExport.title, memory.tab.export) are still in English
inside fr.ts; replace each English string with a correct French translation
while preserving interpolation tokens ({count}, {format}) and
punctuation/ellipsis, e.g. provide a proper French plural-aware phrasing for
graphExport.countLabel, translate download/format labels (CSV/JSON) and the
intro/loading/title/empty messages, and ensure memory.tab.export is translated
to the French equivalent.

Comment thread app/src/lib/i18n/hi.ts
Comment on lines +4145 to +4156
'graphExport.countLabel': '{count} facts ready to export.',
'graphExport.downloadButton': 'Download {format}',
'graphExport.empty': 'No knowledge graph to export yet.',
'graphExport.emptyHint': 'Once the assistant records facts about you, you can export them here.',
'graphExport.errorPrefix': 'Could not load the graph:',
'graphExport.formatCsv': 'CSV',
'graphExport.formatJson': 'JSON',
'graphExport.formatLabel': 'Format',
'graphExport.intro': 'Take your knowledge graph with you. Download every recorded fact as JSON or CSV — your data, portable and yours to keep.',
'graphExport.loading': 'Loading the graph…',
'graphExport.title': 'Graph Export',
'memory.tab.export': 'Export',
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 | 🟡 Minor | ⚡ Quick win

Replace English placeholders with real Hindi translations for new graphExport.* keys.

These newly added Hindi-locale entries are still English strings, so Hindi users won’t get localized UI for the Export tab.

Suggested patch
-  'graphExport.countLabel': '{count} facts ready to export.',
-  'graphExport.downloadButton': 'Download {format}',
-  'graphExport.empty': 'No knowledge graph to export yet.',
-  'graphExport.emptyHint': 'Once the assistant records facts about you, you can export them here.',
-  'graphExport.errorPrefix': 'Could not load the graph:',
+  'graphExport.countLabel': '{count} तथ्य निर्यात के लिए तैयार हैं।',
+  'graphExport.downloadButton': '{format} डाउनलोड करें',
+  'graphExport.empty': 'निर्यात करने के लिए अभी कोई ज्ञान ग्राफ नहीं है।',
+  'graphExport.emptyHint': 'जब सहायक आपके बारे में तथ्य रिकॉर्ड करेगा, तो आप उन्हें यहाँ निर्यात कर सकेंगे।',
+  'graphExport.errorPrefix': 'ग्राफ लोड नहीं हो सका:',
   'graphExport.formatCsv': 'CSV',
   'graphExport.formatJson': 'JSON',
-  'graphExport.formatLabel': 'Format',
-  'graphExport.intro': 'Take your knowledge graph with you. Download every recorded fact as JSON or CSV — your data, portable and yours to keep.',
-  'graphExport.loading': 'Loading the graph…',
-  'graphExport.title': 'Graph Export',
-  'memory.tab.export': 'Export',
+  'graphExport.formatLabel': 'फ़ॉर्मैट',
+  'graphExport.intro': 'अपना ज्ञान ग्राफ अपने साथ रखें। हर रिकॉर्ड किया गया तथ्य JSON या CSV में डाउनलोड करें — आपका डेटा, पोर्टेबल और पूरी तरह आपका।',
+  'graphExport.loading': 'ग्राफ लोड हो रहा है…',
+  'graphExport.title': 'ग्राफ निर्यात',
+  'memory.tab.export': 'निर्यात',

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
'graphExport.countLabel': '{count} facts ready to export.',
'graphExport.downloadButton': 'Download {format}',
'graphExport.empty': 'No knowledge graph to export yet.',
'graphExport.emptyHint': 'Once the assistant records facts about you, you can export them here.',
'graphExport.errorPrefix': 'Could not load the graph:',
'graphExport.formatCsv': 'CSV',
'graphExport.formatJson': 'JSON',
'graphExport.formatLabel': 'Format',
'graphExport.intro': 'Take your knowledge graph with you. Download every recorded fact as JSON or CSV — your data, portable and yours to keep.',
'graphExport.loading': 'Loading the graph…',
'graphExport.title': 'Graph Export',
'memory.tab.export': 'Export',
'graphExport.countLabel': '{count} तथ्य निर्यात के लिए तैयार हैं।',
'graphExport.downloadButton': '{format} डाउनलोड करें',
'graphExport.empty': 'निर्यात करने के लिए अभी कोई ज्ञान ग्राफ नहीं है।',
'graphExport.emptyHint': 'जब सहायक आपके बारे में तथ्य रिकॉर्ड करेगा, तो आप उन्हें यहाँ निर्यात कर सकेंगे।',
'graphExport.errorPrefix': 'ग्राफ लोड नहीं हो सका:',
'graphExport.formatCsv': 'CSV',
'graphExport.formatJson': 'JSON',
'graphExport.formatLabel': 'फ़ॉर्मैट',
'graphExport.intro': 'अपना ज्ञान ग्राफ अपने साथ रखें। हर रिकॉर्ड किया गया तथ्य JSON या CSV में डाउनलोड करें — आपका डेटा, पोर्टेबल और पूरी तरह आपका।',
'graphExport.loading': 'ग्राफ लोड हो रहा है…',
'graphExport.title': 'ग्राफ निर्यात',
'memory.tab.export': 'निर्यात',
🤖 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/hi.ts` around lines 4145 - 4156, The listed graphExport.*
entries are still English; replace each English string with a proper Hindi
translation for the keys 'graphExport.countLabel', 'graphExport.downloadButton',
'graphExport.empty', 'graphExport.emptyHint', 'graphExport.errorPrefix',
'graphExport.formatCsv', 'graphExport.formatJson', 'graphExport.formatLabel',
'graphExport.intro', 'graphExport.loading', 'graphExport.title' (and keep
'memory.tab.export' if needed) preserving placeholders like {count} and {format}
and punctuation/ellipsis; update the values in the hi locale so users see real
Hindi text (e.g., provide accurate Hindi phrases for title, intro, labels,
buttons, loading and error messages).

Comment thread app/src/lib/i18n/ko.ts
Comment on lines +4108 to +4119
'graphExport.countLabel': '{count} facts ready to export.',
'graphExport.downloadButton': 'Download {format}',
'graphExport.empty': 'No knowledge graph to export yet.',
'graphExport.emptyHint': 'Once the assistant records facts about you, you can export them here.',
'graphExport.errorPrefix': 'Could not load the graph:',
'graphExport.formatCsv': 'CSV',
'graphExport.formatJson': 'JSON',
'graphExport.formatLabel': 'Format',
'graphExport.intro': 'Take your knowledge graph with you. Download every recorded fact as JSON or CSV — your data, portable and yours to keep.',
'graphExport.loading': 'Loading the graph…',
'graphExport.title': 'Graph Export',
'memory.tab.export': 'Export',
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 | 🔴 Critical | ⚡ Quick win

All Graph Export translations are in English, not Korean.

These translation strings must be in Korean, not English placeholders. The coding guidelines explicitly require real translations for all non-English locale files. Korean-speaking users will currently see English text in the Graph Export UI.

Here are proper Korean translations for these keys:

🌐 Suggested Korean translations
-  'graphExport.countLabel': '{count} facts ready to export.',
-  'graphExport.downloadButton': 'Download {format}',
-  'graphExport.empty': 'No knowledge graph to export yet.',
-  'graphExport.emptyHint': 'Once the assistant records facts about you, you can export them here.',
-  'graphExport.errorPrefix': 'Could not load the graph:',
+  'graphExport.countLabel': '{count}개의 사실을 내보낼 준비가 되었습니다.',
+  'graphExport.downloadButton': '{format} 다운로드',
+  'graphExport.empty': '아직 내보낼 지식 그래프가 없습니다.',
+  'graphExport.emptyHint': '어시스턴트가 사용자에 대한 사실을 기록하면 여기에서 내보낼 수 있습니다.',
+  'graphExport.errorPrefix': '그래프를 불러올 수 없습니다:',
   'graphExport.formatCsv': 'CSV',
   'graphExport.formatJson': 'JSON',
-  'graphExport.formatLabel': 'Format',
-  'graphExport.intro': 'Take your knowledge graph with you. Download every recorded fact as JSON or CSV — your data, portable and yours to keep.',
-  'graphExport.loading': 'Loading the graph…',
-  'graphExport.title': 'Graph Export',
-  'memory.tab.export': 'Export',
+  'graphExport.formatLabel': '형식',
+  'graphExport.intro': '지식 그래프를 가져가세요. 기록된 모든 사실을 JSON 또는 CSV로 다운로드하세요 — 귀하의 데이터를 이식 가능하며 영구적으로 보관할 수 있습니다.',
+  'graphExport.loading': '그래프를 불러오는 중…',
+  'graphExport.title': '그래프 내보내기',
+  'memory.tab.export': '내보내기',

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
'graphExport.countLabel': '{count} facts ready to export.',
'graphExport.downloadButton': 'Download {format}',
'graphExport.empty': 'No knowledge graph to export yet.',
'graphExport.emptyHint': 'Once the assistant records facts about you, you can export them here.',
'graphExport.errorPrefix': 'Could not load the graph:',
'graphExport.formatCsv': 'CSV',
'graphExport.formatJson': 'JSON',
'graphExport.formatLabel': 'Format',
'graphExport.intro': 'Take your knowledge graph with you. Download every recorded fact as JSON or CSV — your data, portable and yours to keep.',
'graphExport.loading': 'Loading the graph…',
'graphExport.title': 'Graph Export',
'memory.tab.export': 'Export',
'graphExport.countLabel': '{count}개의 사실을 내보낼 준비가 되었습니다.',
'graphExport.downloadButton': '{format} 다운로드',
'graphExport.empty': '아직 내보낼 지식 그래프가 없습니다.',
'graphExport.emptyHint': '어시스턴트가 사용자에 대한 사실을 기록하면 여기에서 내보낼 수 있습니다.',
'graphExport.errorPrefix': '그래프를 불러올 수 없습니다:',
'graphExport.formatCsv': 'CSV',
'graphExport.formatJson': 'JSON',
'graphExport.formatLabel': '형식',
'graphExport.intro': '지식 그래프를 가져가세요. 기록된 모든 사실을 JSON 또는 CSV로 다운로드하세요 — 귀하의 데이터를 이식 가능하며 영구적으로 보관할 수 있습니다.',
'graphExport.loading': '그래프를 불러오는 중…',
'graphExport.title': '그래프 내보내기',
'memory.tab.export': '내보내기',
🤖 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/ko.ts` around lines 4108 - 4119, The graph export i18n keys
are still in English; update the listed keys in app/src/lib/i18n/ko.ts
(graphExport.countLabel, graphExport.downloadButton, graphExport.empty,
graphExport.emptyHint, graphExport.errorPrefix, graphExport.formatCsv,
graphExport.formatJson, graphExport.formatLabel, graphExport.intro,
graphExport.loading, graphExport.title, memory.tab.export) so they contain
correct Korean translations (replace the English placeholder text with proper
Korean strings), e.g. graphExport.countLabel -> "{count}개의 내보낼 사실이 준비되었습니다.",
graphExport.downloadButton -> "{format} 다운로드", graphExport.empty -> "내보낼 지식 그래프가
없습니다.", graphExport.emptyHint -> "어시스턴트가 귀하에 대한 사실을 기록하면 여기에서 내보낼 수 있습니다.",
graphExport.errorPrefix -> "그래프를 불러올 수 없습니다:", graphExport.formatCsv -> "CSV",
graphExport.formatJson -> "JSON", graphExport.formatLabel -> "형식",
graphExport.intro -> "지식 그래프를 가져가세요. 기록된 모든 사실을 JSON 또는 CSV로 다운로드할 수 있습니다 — 귀하의
데이터, 이동 가능하고 보관은 귀하의 권한입니다.", graphExport.loading -> "그래프 로딩 중…",
graphExport.title -> "그래프 내보내기", memory.tab.export -> "내보내기".

Comment thread app/src/lib/i18n/pl.ts
Comment on lines +4211 to +4221
'graphExport.countLabel': '{count} facts ready to export.',
'graphExport.downloadButton': 'Download {format}',
'graphExport.empty': 'No knowledge graph to export yet.',
'graphExport.emptyHint': 'Once the assistant records facts about you, you can export them here.',
'graphExport.errorPrefix': 'Could not load the graph:',
'graphExport.formatCsv': 'CSV',
'graphExport.formatJson': 'JSON',
'graphExport.formatLabel': 'Format',
'graphExport.intro': 'Take your knowledge graph with you. Download every recorded fact as JSON or CSV — your data, portable and yours to keep.',
'graphExport.loading': 'Loading the graph…',
'memory.tab.export': 'Export',
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

Polish locale entries are still English and violate i18n policy

Lines 4211-4221 introduce graphExport.* and memory.tab.export in English. In app/src/lib/i18n/pl.ts, these must be real Polish translations.

Suggested patch
-  'graphExport.countLabel': '{count} facts ready to export.',
-  'graphExport.downloadButton': 'Download {format}',
-  'graphExport.empty': 'No knowledge graph to export yet.',
-  'graphExport.emptyHint': 'Once the assistant records facts about you, you can export them here.',
-  'graphExport.errorPrefix': 'Could not load the graph:',
+  'graphExport.countLabel': '{count} faktów gotowych do eksportu.',
+  'graphExport.downloadButton': 'Pobierz {format}',
+  'graphExport.empty': 'Brak grafu wiedzy do eksportu.',
+  'graphExport.emptyHint': 'Gdy asystent zapisze fakty o Tobie, będzie można je tutaj wyeksportować.',
+  'graphExport.errorPrefix': 'Nie udało się załadować grafu:',
   'graphExport.formatCsv': 'CSV',
   'graphExport.formatJson': 'JSON',
-  'graphExport.formatLabel': 'Format',
-  'graphExport.intro': 'Take your knowledge graph with you. Download every recorded fact as JSON or CSV — your data, portable and yours to keep.',
-  'graphExport.loading': 'Loading the graph…',
-  'memory.tab.export': 'Export',
+  'graphExport.formatLabel': 'Format',
+  'graphExport.intro': 'Zabierz swój graf wiedzy ze sobą. Pobierz każdy zapisany fakt jako JSON lub CSV — Twoje dane, przenośne i należące do Ciebie.',
+  'graphExport.loading': 'Ładowanie grafu…',
+  'memory.tab.export': 'Eksport',

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
'graphExport.countLabel': '{count} facts ready to export.',
'graphExport.downloadButton': 'Download {format}',
'graphExport.empty': 'No knowledge graph to export yet.',
'graphExport.emptyHint': 'Once the assistant records facts about you, you can export them here.',
'graphExport.errorPrefix': 'Could not load the graph:',
'graphExport.formatCsv': 'CSV',
'graphExport.formatJson': 'JSON',
'graphExport.formatLabel': 'Format',
'graphExport.intro': 'Take your knowledge graph with you. Download every recorded fact as JSON or CSV — your data, portable and yours to keep.',
'graphExport.loading': 'Loading the graph…',
'memory.tab.export': 'Export',
'graphExport.countLabel': '{count} faktów gotowych do eksportu.',
'graphExport.downloadButton': 'Pobierz {format}',
'graphExport.empty': 'Brak grafu wiedzy do eksportu.',
'graphExport.emptyHint': 'Gdy asystent zapisze fakty o Tobie, będzie można je tutaj wyeksportować.',
'graphExport.errorPrefix': 'Nie udało się załadować grafu:',
'graphExport.formatCsv': 'CSV',
'graphExport.formatJson': 'JSON',
'graphExport.formatLabel': 'Format',
'graphExport.intro': 'Zabierz swój graf wiedzy ze sobą. Pobierz każdy zapisany fakt jako JSON lub CSV — Twoje dane, przenośne i należące do Ciebie.',
'graphExport.loading': 'Ładowanie grafu…',
'memory.tab.export': 'Eksport',
🤖 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/pl.ts` around lines 4211 - 4221, The new i18n keys
(graphExport.countLabel, graphExport.downloadButton, graphExport.empty,
graphExport.emptyHint, graphExport.errorPrefix, graphExport.formatCsv,
graphExport.formatJson, graphExport.formatLabel, graphExport.intro,
graphExport.loading and memory.tab.export) were added in English inside
app/src/lib/i18n/pl.ts; replace those English strings with correct Polish
translations preserving placeholders like {count} and {format} and
punctuation/ellipsis characters exactly where needed (e.g.,
graphExport.countLabel should keep "{count}" and graphExport.downloadButton
should keep "{format}"); update the values in the pl.ts file for the matching
keys ensuring accurate Polish grammar, diacritics, and natural phrasing.

Comment thread app/src/lib/i18n/ru.ts
Comment on lines +4179 to +4189
'graphExport.countLabel': '{count} facts ready to export.',
'graphExport.downloadButton': 'Download {format}',
'graphExport.empty': 'No knowledge graph to export yet.',
'graphExport.emptyHint': 'Once the assistant records facts about you, you can export them here.',
'graphExport.errorPrefix': 'Could not load the graph:',
'graphExport.formatCsv': 'CSV',
'graphExport.formatJson': 'JSON',
'graphExport.formatLabel': 'Format',
'graphExport.intro': 'Take your knowledge graph with you. Download every recorded fact as JSON or CSV — your data, portable and yours to keep.',
'graphExport.loading': 'Loading the graph…',
'memory.tab.export': 'Export',
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 fallback copy with real Russian translations.

Lines 4179-4189 currently add English text in ru.ts. Please provide actual Russian copy for these keys so Russian users don’t see mixed-language UI.

Suggested RU translations
-  'graphExport.countLabel': '{count} facts ready to export.',
-  'graphExport.downloadButton': 'Download {format}',
-  'graphExport.empty': 'No knowledge graph to export yet.',
-  'graphExport.emptyHint': 'Once the assistant records facts about you, you can export them here.',
-  'graphExport.errorPrefix': 'Could not load the graph:',
+  'graphExport.countLabel': '{count} фактов готовы к экспорту.',
+  'graphExport.downloadButton': 'Скачать {format}',
+  'graphExport.empty': 'Граф знаний пока нечего экспортировать.',
+  'graphExport.emptyHint': 'Когда ассистент запишет факты о вас, вы сможете экспортировать их здесь.',
+  'graphExport.errorPrefix': 'Не удалось загрузить граф:',
   'graphExport.formatCsv': 'CSV',
   'graphExport.formatJson': 'JSON',
-  'graphExport.formatLabel': 'Format',
-  'graphExport.intro': 'Take your knowledge graph with you. Download every recorded fact as JSON or CSV — your data, portable and yours to keep.',
-  'graphExport.loading': 'Loading the graph…',
-  'memory.tab.export': 'Export',
+  'graphExport.formatLabel': 'Формат',
+  'graphExport.intro': 'Заберите свой граф знаний с собой. Скачайте каждый сохранённый факт в формате JSON или CSV — ваши данные, переносимые и полностью ваши.',
+  'graphExport.loading': 'Загрузка графа…',
+  'memory.tab.export': 'Экспорт',

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
'graphExport.countLabel': '{count} facts ready to export.',
'graphExport.downloadButton': 'Download {format}',
'graphExport.empty': 'No knowledge graph to export yet.',
'graphExport.emptyHint': 'Once the assistant records facts about you, you can export them here.',
'graphExport.errorPrefix': 'Could not load the graph:',
'graphExport.formatCsv': 'CSV',
'graphExport.formatJson': 'JSON',
'graphExport.formatLabel': 'Format',
'graphExport.intro': 'Take your knowledge graph with you. Download every recorded fact as JSON or CSV — your data, portable and yours to keep.',
'graphExport.loading': 'Loading the graph…',
'memory.tab.export': 'Export',
'graphExport.countLabel': '{count} фактов готовы к экспорту.',
'graphExport.downloadButton': 'Скачать {format}',
'graphExport.empty': 'Граф знаний пока нечего экспортировать.',
'graphExport.emptyHint': 'Когда ассистент запишет факты о вас, вы сможете экспортировать их здесь.',
'graphExport.errorPrefix': 'Не удалось загрузить граф:',
'graphExport.formatCsv': 'CSV',
'graphExport.formatJson': 'JSON',
'graphExport.formatLabel': 'Формат',
'graphExport.intro': 'Заберите свой граф знаний с собой. Скачайте каждый сохранённый факт в формате JSON или CSV — ваши данные, переносимые и полностью ваши.',
'graphExport.loading': 'Загрузка графа…',
'memory.tab.export': 'Экспорт',
🤖 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 - 4189, Replace the English
fallback strings in ru.ts for the graph export UI keys with proper Russian
translations: set graphExport.countLabel to "Готово к экспорту {count} фактов.",
graphExport.downloadButton to "Скачать {format}", graphExport.empty to "Пока нет
графа знаний для экспорта.", graphExport.emptyHint to "Когда ассистент
зафиксирует факты о вас, вы сможете экспортировать их здесь.",
graphExport.errorPrefix to "Не удалось загрузить граф:", graphExport.formatCsv
to "CSV", graphExport.formatJson to "JSON", graphExport.formatLabel to "Формат",
graphExport.intro to "Заберите свой граф знаний с собой. Скачайте все
сохранённые факты в формате JSON или CSV — ваши данные, портативные и ваши для
хранения.", graphExport.loading to "Загрузка графа…", and memory.tab.export to
"Экспорт" so Russian users see correct localized UI instead of English
fallbacks.

Comment thread app/src/lib/i18n/zh-CN.ts
Comment on lines +3941 to +3951
'graphExport.countLabel': '{count} facts ready to export.',
'graphExport.downloadButton': 'Download {format}',
'graphExport.empty': 'No knowledge graph to export yet.',
'graphExport.emptyHint': 'Once the assistant records facts about you, you can export them here.',
'graphExport.errorPrefix': 'Could not load the graph:',
'graphExport.formatCsv': 'CSV',
'graphExport.formatJson': 'JSON',
'graphExport.formatLabel': 'Format',
'graphExport.intro': 'Take your knowledge graph with you. Download every recorded fact as JSON or CSV — your data, portable and yours to keep.',
'graphExport.loading': 'Loading the graph…',
'memory.tab.export': 'Export',
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 | 🔴 Critical | ⚡ Quick win

Critical: All new translation strings are in English, not Simplified Chinese.

The new graphExport.* and memory.tab.export keys contain English text instead of proper Simplified Chinese translations. Chinese-locale users will see English UI text, breaking the localization experience.

For example:

  • Line 3941: '{count} facts ready to export.' should be Chinese
  • Line 3942: 'Download {format}' should be Chinese
  • Line 3949: Long English sentence needs Chinese translation
  • Line 3951: 'Export' should be '导出' (you already have 'common.export': '导出' at line 45)

Please replace all English strings with proper Simplified Chinese translations. As per coding guidelines, non-English locale files must contain real translations in the target language, not English placeholders.

Example corrections needed
-  'graphExport.countLabel': '{count} facts ready to export.',
-  'graphExport.downloadButton': 'Download {format}',
-  'graphExport.empty': 'No knowledge graph to export yet.',
-  'graphExport.emptyHint': 'Once the assistant records facts about you, you can export them here.',
-  'graphExport.errorPrefix': 'Could not load the graph:',
+  'graphExport.countLabel': '{count} 条事实可供导出。',
+  'graphExport.downloadButton': '下载 {format}',
+  'graphExport.empty': '暂无知识图谱可导出。',
+  'graphExport.emptyHint': '助手记录与你相关的事实后,可在此处导出。',
+  'graphExport.errorPrefix': '无法加载图谱:',
   'graphExport.formatCsv': 'CSV',
   'graphExport.formatJson': 'JSON',
-  'graphExport.formatLabel': 'Format',
-  'graphExport.intro': 'Take your knowledge graph with you. Download every recorded fact as JSON or CSV — your data, portable and yours to keep.',
-  'graphExport.loading': 'Loading the graph…',
-  'memory.tab.export': 'Export',
+  'graphExport.formatLabel': '格式',
+  'graphExport.intro': '随身携带你的知识图谱。将所有记录的事实下载为 JSON 或 CSV — 你的数据,可移植且永远属于你。',
+  'graphExport.loading': '正在加载图谱…',
+  'memory.tab.export': '导出',

As per coding guidelines: when adding keys to en.ts, each non-English locale must receive real translations in its target language.

📝 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
'graphExport.countLabel': '{count} facts ready to export.',
'graphExport.downloadButton': 'Download {format}',
'graphExport.empty': 'No knowledge graph to export yet.',
'graphExport.emptyHint': 'Once the assistant records facts about you, you can export them here.',
'graphExport.errorPrefix': 'Could not load the graph:',
'graphExport.formatCsv': 'CSV',
'graphExport.formatJson': 'JSON',
'graphExport.formatLabel': 'Format',
'graphExport.intro': 'Take your knowledge graph with you. Download every recorded fact as JSON or CSV — your data, portable and yours to keep.',
'graphExport.loading': 'Loading the graph…',
'memory.tab.export': 'Export',
'graphExport.countLabel': '{count} 条事实可供导出。',
'graphExport.downloadButton': '下载 {format}',
'graphExport.empty': '暂无知识图谱可导出。',
'graphExport.emptyHint': '助手记录与你相关的事实后,可在此处导出。',
'graphExport.errorPrefix': '无法加载图谱:',
'graphExport.formatCsv': 'CSV',
'graphExport.formatJson': 'JSON',
'graphExport.formatLabel': '格式',
'graphExport.intro': '随身携带你的知识图谱。将所有记录的事实下载为 JSON CSV — 你的数据,可移植且永远属于你。',
'graphExport.loading': '正在加载图谱…',
'memory.tab.export': '导出',
🤖 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 - 3951, The new localization
keys (graphExport.countLabel, graphExport.downloadButton, graphExport.empty,
graphExport.emptyHint, graphExport.errorPrefix, graphExport.formatCsv,
graphExport.formatJson, graphExport.formatLabel, graphExport.intro,
graphExport.loading, memory.tab.export) are still in English; replace each
English string with proper Simplified Chinese translations—for example:
graphExport.countLabel -> "已准备好 {count} 条事实,可导出。", graphExport.downloadButton ->
"下载 {format}", graphExport.empty -> "暂时没有可导出的知识图谱。", graphExport.emptyHint ->
"当助手记录有关你的事实后,您可以在此处导出它们。", graphExport.errorPrefix -> "无法加载图谱:",
graphExport.formatCsv -> "CSV", graphExport.formatJson -> "JSON",
graphExport.formatLabel -> "格式", graphExport.intro -> "将您的知识图谱随身携带。以 JSON 或 CSV
格式下载所有记录的事实——您的数据,可移植且归您所有。", graphExport.loading -> "正在加载图谱…", and set
memory.tab.export to "导出" (matching common.export); update the values for these
keys accordingly.

A new read-only "Export" tab for data portability: download the entire memory
knowledge graph as JSON or CSV — a different KIND of feature from the analytics
lenses, giving the user ownership of their data.

- Pure deterministic serializers (lib/memory/graphExport.ts): toJsonExport and
  toCsvExport over a stable {subject,predicate,object,namespace,evidenceCount,
  updatedAt} projection (malformed rows dropped). CSV follows RFC 4180 — fields
  containing comma/quote/CR/LF are quoted and embedded quotes doubled, with CRLF
  row terminators — so entity names with commas/quotes/newlines round-trip.
- Zero new core surface: reuses ONLY memoryGraphQuery. Read-only — the download
  (Blob + anchor) happens in the container's click handler, never during render.
- Container/presentational split; the container guards the load with a request
  token; the pure panel renders the count + a JSON/CSV format toggle + download
  button. i18n across all 13 locales.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
aashir-athar added a commit to aashir-athar/openhuman that referenced this pull request May 30, 2026
…count

Address CodeRabbit review on tinyhumansai#2967:
- Defer URL.revokeObjectURL to a macrotask so the browser has started reading
  the Blob before it is freed (synchronous revoke can cancel the download).
- Show the EXPORTABLE row count (toExportRows drops malformed relations), not
  the raw relations.length, so the "N facts ready to export" label is accurate.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
…count

Address CodeRabbit review on tinyhumansai#2967:
- Defer URL.revokeObjectURL to a macrotask so the browser has started reading
  the Blob before it is freed (synchronous revoke can cancel the download).
- Show the EXPORTABLE row count (toExportRows drops malformed relations), not
  the raw relations.length, so the "N facts ready to export" label is accurate.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
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