Compare commits

...
Author SHA1 Message Date
kristinheandCursor 470ea4459a fix(memhub): keep home status copy compact
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-11-04 14:53:33 +08:00
14 changed files with 59 additions and 14 deletions

No files matched your search

@@ -1235,7 +1235,9 @@ it("shows lite raw ingestion as running even when model sedimentation is paused"
/>,
);
expect(await screen.findAllByText("正在保存原始对话")).toHaveLength(2);
expect(await screen.findAllByText("正在保存")).toHaveLength(2);
expect(screen.getByText("暂无更新")).toBeTruthy();
expect(screen.getByText("已核对,暂无可显示的原始对话更新")).toBeTruthy();
expect(screen.getByText("原始对话持续保存,不需要生成模型")).toBeTruthy();
expect(screen.queryByText("已暂停")).toBeNull();
});
+4 -3
View File
@@ -38,7 +38,7 @@ const base = {
describe("home view model", () => {
it.each([
["lite", "raw", "apps.rawConversations", "apps.rawSaving"],
["lite", "raw", "apps.rawConversations", "apps.rawSavingCompact"],
["pro", "memory", "apps.memories", "apps.running"],
["ultra", "memory", "apps.memories", "apps.running"],
] as const)(
@@ -109,7 +109,7 @@ describe("home view model", () => {
} as never,
});
expect(result.recentMetric).toEqual({
valueKey: "apps.rawCheckedEmpty",
valueKey: "apps.recentEmptyCompact",
detailKey: "apps.checkedRecent",
});
expect(result.activity).toMatchObject({
@@ -158,9 +158,10 @@ describe("home view model", () => {
projectionState: "ready",
});
expect(result.recentMetric).toEqual({
valueKey: "apps.memoryCheckedEmpty",
valueKey: "apps.recentEmptyCompact",
detailKey: "apps.checkedRecent",
});
expect(result.activity.titleKey).toBe("apps.memoryCheckedEmpty");
expect(result.activity.kind).toBe("empty");
});
+3 -10
View File
@@ -40,11 +40,7 @@ export interface HomeViewModel {
emptyExcerpt: boolean;
} | null;
recentMetric: {
valueKey:
| "apps.checkingRecent"
| "apps.rawCheckedEmpty"
| "apps.memoryCheckedEmpty"
| null;
valueKey: "apps.checkingRecent" | "apps.recentEmptyCompact" | null;
detailKey:
| "apps.rawSaved"
| "apps.saved"
@@ -120,7 +116,7 @@ export function buildHomeViewModel(input: {
const sedimenting = input.sedimentation?.enabled;
const processingLabel =
!generationRequired || mode === "lite"
? "apps.rawSaving"
? "apps.rawSavingCompact"
: sedimenting === true
? "apps.running"
: sedimenting === false
@@ -179,10 +175,7 @@ export function buildHomeViewModel(input: {
}
: state === "ready" || state === "stale"
? {
valueKey:
plane === "raw"
? ("apps.rawCheckedEmpty" as const)
: ("apps.memoryCheckedEmpty" as const),
valueKey: "apps.recentEmptyCompact" as const,
detailKey: "apps.checkedRecent" as const,
}
: {
@@ -9,6 +9,7 @@ export const applicationsChineseMessages = {
"apps.memories": "已沉淀记忆",
"apps.rawConversations": "原始对话",
"apps.rawSaving": "正在保存原始对话",
"apps.rawSavingCompact": "正在保存",
"apps.rawSavingStatus": "保存状态",
"apps.rawSavingDetail": "原始对话持续保存,不需要生成模型",
"apps.rawNoExcerpt": "这条对话没有可显示的用户原文",
@@ -17,6 +18,7 @@ export const applicationsChineseMessages = {
"apps.rawEmpty": "还没有保存的原始对话",
"apps.rawCheckedEmpty": "已核对,暂无可显示的原始对话更新",
"apps.memoryCheckedEmpty": "已核对,暂无可显示的记忆更新",
"apps.recentEmptyCompact": "暂无更新",
"apps.rawWaiting": "原始对话保存后会显示在这里",
"apps.checkedRecent": "已核对当前内容",
"apps.currentMode": "当前模式",
@@ -149,6 +151,7 @@ export const applicationsSpanishMessages: Record<
"apps.memories": "Memorias guardadas",
"apps.rawConversations": "Conversaciones originales",
"apps.rawSaving": "Guardando",
"apps.rawSavingCompact": "Guardando",
"apps.rawSavingStatus": "Estado de guardado",
"apps.rawSavingDetail":
"Las conversaciones originales se guardan sin un modelo generativo",
@@ -160,6 +163,7 @@ export const applicationsSpanishMessages: Record<
"Comprobado: no hay actualizaciones de conversaciones para mostrar",
"apps.memoryCheckedEmpty":
"Comprobado: no hay actualizaciones de memorias para mostrar",
"apps.recentEmptyCompact": "Sin novedades",
"apps.rawWaiting":
"Las conversaciones originales aparecerán aquí cuando se guarden",
"apps.checkedRecent": "Contenido actual comprobado",
@@ -1345,6 +1345,7 @@ const baseEnglishMessages = {
"apps.memories": "Saved memories",
"apps.rawConversations": "Original conversations",
"apps.rawSaving": "Saving",
"apps.rawSavingCompact": "Saving",
"apps.rawSavingStatus": "Saving status",
"apps.rawSavingDetail":
"Original conversations are saved without a generation model",
@@ -1355,6 +1356,7 @@ const baseEnglishMessages = {
"apps.rawCheckedEmpty":
"Checked: no original-conversation updates to display",
"apps.memoryCheckedEmpty": "Checked: no memory updates to display",
"apps.recentEmptyCompact": "No updates",
"apps.rawWaiting": "Original conversations will appear here when saved",
"apps.checkedRecent": "Current content checked",
"apps.currentMode": "Current mode",
@@ -24,6 +24,8 @@ const ENGLISH_EQUIVALENT_ALLOWED = new Set<MessageKey>([
const keys = Object.keys(chineseMessages) as MessageKey[];
const rawSavingStatusKey = "apps.rawSavingStatus" satisfies MessageKey;
const rawSavingCompactKey = "apps.rawSavingCompact" satisfies MessageKey;
const recentEmptyCompactKey = "apps.recentEmptyCompact" satisfies MessageKey;
const rawSavingStatusTranslations = {
en: "Saving status",
@@ -39,6 +41,23 @@ const rawSavingStatusTranslations = {
id: "Status penyimpanan",
} as const satisfies Record<(typeof SUPPORTED_LOCALES)[number], string>;
const compactHomeTranslations = {
en: ["Saving", "No updates"],
"zh-Hans": ["正在保存", "暂无更新"],
"zh-Hant": ["儲存中", "暫無更新"],
ja: ["保存中", "更新なし"],
es: ["Guardando", "Sin novedades"],
de: ["Wird gespeichert", "Keine Updates"],
pt: ["Salvando", "Sem atualizações"],
fr: ["Enregistrement", "Aucune mise à jour"],
ko: ["저장 중", "업데이트 없음"],
ru: ["Сохранение", "Нет обновлений"],
id: ["Menyimpan", "Belum ada pembaruan"],
} as const satisfies Record<
(typeof SUPPORTED_LOCALES)[number],
readonly [string, string]
>;
describe.each(SUPPORTED_LOCALES)("%s catalog", (locale) => {
const catalog = guiMessages[locale];
@@ -100,6 +119,14 @@ describe("applications catalog", () => {
rawSavingStatusTranslations[locale],
);
});
it("keeps large home metric copy compact in all 11 locales", () => {
for (const locale of SUPPORTED_LOCALES) {
const [saving, empty] = compactHomeTranslations[locale];
expect(guiMessages[locale][rawSavingCompactKey]).toBe(saving);
expect(guiMessages[locale][recentEmptyCompactKey]).toBe(empty);
}
});
});
describe("embedding switch catalog", () => {
@@ -1544,6 +1544,7 @@ export const germanMessages: Record<MessageKey, string> = {
"apps.memories": "Gespeicherte Erinnerungen",
"apps.rawConversations": "Originalunterhaltungen",
"apps.rawSaving": "Wird gespeichert",
"apps.rawSavingCompact": "Wird gespeichert",
"apps.rawSavingStatus": "Speicherstatus",
"apps.rawSavingDetail":
"Originalunterhaltungen werden ohne generatives Modell gespeichert",
@@ -1555,6 +1556,7 @@ export const germanMessages: Record<MessageKey, string> = {
"Geprüft: keine anzeigbaren Aktualisierungen der Originalunterhaltungen",
"apps.memoryCheckedEmpty":
"Geprüft: keine anzeigbaren Erinnerungsaktualisierungen",
"apps.recentEmptyCompact": "Keine Updates",
"apps.rawWaiting": "Gespeicherte Originalunterhaltungen erscheinen hier",
"apps.checkedRecent": "Aktueller Inhalt geprüft",
"apps.currentMode": "Aktueller Modus",
@@ -1565,6 +1565,7 @@ export const frenchMessages: Record<MessageKey, string> = {
"apps.memories": "Mémoires enregistrées",
"apps.rawConversations": "Conversations d’origine",
"apps.rawSaving": "Enregistrement",
"apps.rawSavingCompact": "Enregistrement",
"apps.rawSavingStatus": "État de l’enregistrement",
"apps.rawSavingDetail":
"Les conversations d’origine sont enregistrées sans modèle génératif",
@@ -1576,6 +1577,7 @@ export const frenchMessages: Record<MessageKey, string> = {
"Vérifié : aucune mise à jour de conversation à afficher",
"apps.memoryCheckedEmpty":
"Vérifié : aucune mise à jour de mémoire à afficher",
"apps.recentEmptyCompact": "Aucune mise à jour",
"apps.rawWaiting":
"Les conversations d’origine enregistrées apparaîtront ici",
"apps.checkedRecent": "Contenu actuel vérifié",
@@ -1519,6 +1519,7 @@ export const indonesianMessages: Record<MessageKey, string> = {
"apps.memories": "Memori tersimpan",
"apps.rawConversations": "Percakapan asli",
"apps.rawSaving": "Menyimpan",
"apps.rawSavingCompact": "Menyimpan",
"apps.rawSavingStatus": "Status penyimpanan",
"apps.rawSavingDetail": "Percakapan asli disimpan tanpa model generatif",
"apps.rawNoExcerpt": "Tidak ada kutipan pengguna yang dapat ditampilkan",
@@ -1529,6 +1530,7 @@ export const indonesianMessages: Record<MessageKey, string> = {
"Diperiksa: tidak ada pembaruan percakapan untuk ditampilkan",
"apps.memoryCheckedEmpty":
"Diperiksa: tidak ada pembaruan memori untuk ditampilkan",
"apps.recentEmptyCompact": "Belum ada pembaruan",
"apps.rawWaiting": "Percakapan asli yang disimpan akan muncul di sini",
"apps.checkedRecent": "Konten saat ini telah diperiksa",
"apps.currentMode": "Mode saat ini",
@@ -1516,6 +1516,7 @@ export const japaneseMessages: Record<MessageKey, string> = {
"apps.memories": "保存済みの記憶",
"apps.rawConversations": "元の会話",
"apps.rawSaving": "保存中",
"apps.rawSavingCompact": "保存中",
"apps.rawSavingStatus": "保存状態",
"apps.rawSavingDetail": "生成モデルを使わず元の会話を保存します",
"apps.rawNoExcerpt": "表示できるユーザーの原文がありません",
@@ -1524,6 +1525,7 @@ export const japaneseMessages: Record<MessageKey, string> = {
"apps.rawEmpty": "保存済みの元の会話はまだありません",
"apps.rawCheckedEmpty": "確認済み:表示できる元の会話の更新はありません",
"apps.memoryCheckedEmpty": "確認済み:表示できる記憶の更新はありません",
"apps.recentEmptyCompact": "更新なし",
"apps.rawWaiting": "保存された元の会話がここに表示されます",
"apps.checkedRecent": "現在の内容を確認済み",
"apps.currentMode": "現在のモード",
@@ -1480,6 +1480,7 @@ export const koreanMessages: Record<MessageKey, string> = {
"apps.memories": "저장된 기억",
"apps.rawConversations": "원본 대화",
"apps.rawSaving": "저장 중",
"apps.rawSavingCompact": "저장 중",
"apps.rawSavingStatus": "저장 상태",
"apps.rawSavingDetail": "생성 모델 없이 원본 대화를 저장합니다",
"apps.rawNoExcerpt": "표시할 수 있는 사용자 원문이 없습니다",
@@ -1488,6 +1489,7 @@ export const koreanMessages: Record<MessageKey, string> = {
"apps.rawEmpty": "저장된 원본 대화가 아직 없습니다",
"apps.rawCheckedEmpty": "확인됨: 표시할 원본 대화 업데이트가 없습니다",
"apps.memoryCheckedEmpty": "확인됨: 표시할 메모리 업데이트가 없습니다",
"apps.recentEmptyCompact": "업데이트 없음",
"apps.rawWaiting": "저장된 원본 대화가 여기에 표시됩니다",
"apps.checkedRecent": "현재 내용 확인됨",
"apps.currentMode": "현재 모드",
@@ -1541,6 +1541,7 @@ export const portugueseMessages: Record<MessageKey, string> = {
"apps.memories": "Memórias salvas",
"apps.rawConversations": "Conversas originais",
"apps.rawSaving": "Salvando",
"apps.rawSavingCompact": "Salvando",
"apps.rawSavingStatus": "Status de salvamento",
"apps.rawSavingDetail":
"As conversas originais são salvas sem um modelo generativo",
@@ -1552,6 +1553,7 @@ export const portugueseMessages: Record<MessageKey, string> = {
"Verificado: não há atualizações de conversas para mostrar",
"apps.memoryCheckedEmpty":
"Verificado: não há atualizações de memórias para mostrar",
"apps.recentEmptyCompact": "Sem atualizações",
"apps.rawWaiting": "As conversas originais salvas aparecerão aqui",
"apps.checkedRecent": "Conteúdo atual verificado",
"apps.currentMode": "Modo atual",
@@ -1524,6 +1524,7 @@ export const russianMessages: Record<MessageKey, string> = {
"apps.memories": "Сохранённые записи памяти",
"apps.rawConversations": "Исходные разговоры",
"apps.rawSaving": "Сохранение",
"apps.rawSavingCompact": "Сохранение",
"apps.rawSavingStatus": "Статус сохранения",
"apps.rawSavingDetail":
"Исходные разговоры сохраняются без генеративной модели",
@@ -1534,6 +1535,7 @@ export const russianMessages: Record<MessageKey, string> = {
"apps.rawCheckedEmpty":
"Проверено: нет обновлений исходных диалогов для показа",
"apps.memoryCheckedEmpty": "Проверено: нет обновлений памяти для показа",
"apps.recentEmptyCompact": "Нет обновлений",
"apps.rawWaiting": "Сохранённые исходные диалоги появятся здесь",
"apps.checkedRecent": "Текущее содержимое проверено",
"apps.currentMode": "Текущий режим",
@@ -1388,6 +1388,7 @@ export const traditionalChineseMessages: Record<MessageKey, string> = {
"apps.memories": "已建立的記憶",
"apps.rawConversations": "原始對話",
"apps.rawSaving": "儲存中",
"apps.rawSavingCompact": "儲存中",
"apps.rawSavingStatus": "儲存狀態",
"apps.rawSavingDetail": "原始對話會持續儲存,不需要生成模型",
"apps.rawNoExcerpt": "這段對話沒有可顯示的使用者原文",
@@ -1396,6 +1397,7 @@ export const traditionalChineseMessages: Record<MessageKey, string> = {
"apps.rawEmpty": "還沒有儲存的原始對話",
"apps.rawCheckedEmpty": "已核對,暫無可顯示的原始對話更新",
"apps.memoryCheckedEmpty": "已核對,暫無可顯示的記憶更新",
"apps.recentEmptyCompact": "暫無更新",
"apps.rawWaiting": "原始對話儲存後會顯示在這裡",
"apps.checkedRecent": "已核對目前內容",
"apps.currentMode": "目前模式",