AI-native knowledge base & Evernote/Obsidian alternative with instant sync & native MCP. Free on Cloudflare or self-hosted via Docker.
HTML ai-agentcloudflarecloudflare-d1cloudflare-r2cloudflare-workersdockerelectronevernoteevernote-alternativeknowledge-basemcpnote-takingobsidian-alternativeoffline-firstpersonal-knowledge-basepwaself-hostedsqlitetiptapweb-clipper
feat(settings): add instance URL and data directory to system info
tianma-ifba7b01502877
diff --git a/apps/desktop/src/main/desktop-update-flow.test.mjs b/apps/desktop/src/main/desktop-update-flow.test.mjsindex 9f081df4..aa9f92e4 100644--- a/apps/desktop/src/main/desktop-update-flow.test.mjs+++ b/apps/desktop/src/main/desktop-update-flow.test.mjs@@ -49,6 +49,8 @@ describe("desktop update flow", () => {expect(systemInfoSource).toContain("getClientRuntimeDiagnostics");expect(systemInfoSource).toContain('t("systemInfo.runtimeEngine")');expect(systemInfoSource).toContain('t("systemInfo.connectionSection")');+ expect(systemInfoSource).toContain('t("systemInfo.dataDirectory")');+ expect(mainSource).toContain("dataDir: sidecarDataDirectory(activeAccountId)");});test("rechecks for updates while a packaged app remains open", () => {diff --git a/apps/desktop/src/main/index.mjs b/apps/desktop/src/main/index.mjsindex e746e2fe..f0b675b4 100644--- a/apps/desktop/src/main/index.mjs+++ b/apps/desktop/src/main/index.mjs@@ -219,6 +219,7 @@ const desktopRuntimeSystemInfo = () => ({osRelease: operatingSystemRelease(),electron: process.versions.electron || "unknown",chrome: process.versions.chrome || "unknown",+ dataDir: sidecarDataDirectory(activeAccountId),});const desktopDiagnosticSystemInfo = async () => {diff --git a/apps/ios/EdgeEver/Features/Workspace/SettingsView.swift b/apps/ios/EdgeEver/Features/Workspace/SettingsView.swiftindex da8656a1..b109bb37 100644--- a/apps/ios/EdgeEver/Features/Workspace/SettingsView.swift+++ b/apps/ios/EdgeEver/Features/Workspace/SettingsView.swift@@ -562,52 +562,69 @@ struct SettingsView: View {return false}- private var clientSystemInfoItems: [(label: String, value: String)] {+ private struct SystemInfoItem {+ let label: String+ let value: String+ var localOnly = false+ }++ private var clientSystemInfoItems: [SystemInfoItem] {let version = Bundle.main.infoDictionary?["CFBundleShortVersionString"] as? String ?? "—"let build = Bundle.main.infoDictionary?["CFBundleVersion"] as? String ?? "—"let language = env.preferences.localeCode == "system"? "\(env.preferences.resolvedLocale.identifier) (\(env.preferences.t("跟随系统", en: "Follow system")))": env.preferences.resolvedLocale.identifierreturn [- (env.preferences.t("版本", en: "Version"), "v\(version)"),- (env.preferences.t("构建", en: "Build"), build),- (env.preferences.t("客户端", en: "Client"), env.preferences.t("移动应用", en: "Mobile app")),- (env.preferences.t("系统", en: "System"), "iOS"),- (env.preferences.t("系统版本", en: "System version"), UIDevice.current.systemVersion),- (env.preferences.t("语言", en: "Language"), language),- (env.preferences.t("时区", en: "Time zone"), TimeZone.current.identifier),- (env.preferences.t("安装形态", en: "Mode"), env.preferences.t("原生 SwiftUI 应用", en: "Native SwiftUI app")),+ SystemInfoItem(label: env.preferences.t("版本", en: "Version"), value: "v\(version)"),+ SystemInfoItem(label: env.preferences.t("构建", en: "Build"), value: build),+ SystemInfoItem(label: env.preferences.t("客户端", en: "Client"), value: env.preferences.t("移动应用", en: "Mobile app")),+ SystemInfoItem(label: env.preferences.t("系统", en: "System"), value: "iOS"),+ SystemInfoItem(label: env.preferences.t("系统版本", en: "System version"), value: UIDevice.current.systemVersion),+ SystemInfoItem(label: env.preferences.t("语言", en: "Language"), value: language),+ SystemInfoItem(label: env.preferences.t("时区", en: "Time zone"), value: TimeZone.current.identifier),+ SystemInfoItem(label: env.preferences.t("安装形态", en: "Mode"), value: env.preferences.t("原生 SwiftUI 应用", en: "Native SwiftUI app")),]}- private var cloudSystemInfoItems: [(label: String, value: String)] {- var items: [(label: String, value: String)] = [- (env.preferences.t("实例版本", en: "Instance version"), instanceVersion.map { "v\($0.replacingOccurrences(of: "^v", with: "", options: .regularExpression))" } ?? unknownSystemInfoValue),- (env.preferences.t("实例构建", en: "Instance build"), instanceHealth?.build ?? unknownSystemInfoValue),- (env.preferences.t("数据库版本", en: "Database version"), instanceHealth?.migration ?? unknownSystemInfoValue),- (env.preferences.t("数据库后端", en: "Database backend"), databaseBackendLabel(instanceHealth?.storage?.database)),- (env.preferences.t("新上传对象存储", en: "New upload object storage"), objectStorageLabel(instanceHealth)),- ]+ private var cloudSystemInfoItems: [SystemInfoItem] {+ var items: [SystemInfoItem] = []+ if let instanceURL = env.session.session?.baseUrl, !instanceURL.isEmpty {+ items.append(SystemInfoItem(+ label: env.preferences.t("实例地址", en: "Instance URL", ja: "インスタンス URL"),+ value: instanceURL,+ localOnly: true+ ))+ }+ items.append(contentsOf: [+ SystemInfoItem(+ label: env.preferences.t("实例版本", en: "Instance version"),+ value: instanceVersion.map { "v\($0.replacingOccurrences(of: "^v", with: "", options: .regularExpression))" } ?? unknownSystemInfoValue+ ),+ SystemInfoItem(label: env.preferences.t("实例构建", en: "Instance build"), value: instanceHealth?.build ?? unknownSystemInfoValue),+ SystemInfoItem(label: env.preferences.t("数据库版本", en: "Database version"), value: instanceHealth?.migration ?? unknownSystemInfoValue),+ SystemInfoItem(label: env.preferences.t("数据库后端", en: "Database backend"), value: databaseBackendLabel(instanceHealth?.storage?.database)),+ SystemInfoItem(label: env.preferences.t("新上传对象存储", en: "New upload object storage"), value: objectStorageLabel(instanceHealth)),+ ])if instanceHealth?.objectStorageProvider == "s3" {- items.append((- env.preferences.t("已有附件", en: "Existing attachments"),- env.preferences.t("继续从原存储读取", en: "Read from original storage")+ items.append(SystemInfoItem(+ label: env.preferences.t("已有附件", en: "Existing attachments"),+ value: env.preferences.t("继续从原存储读取", en: "Read from original storage")))}- items.append((- env.preferences.t("部署平台", en: "Deployment platform"),- deploymentPlatformLabel(instanceHealth?.runtime)+ items.append(SystemInfoItem(+ label: env.preferences.t("部署平台", en: "Deployment platform"),+ value: deploymentPlatformLabel(instanceHealth?.runtime)))if instanceHealth?.runtime == "self-hosted-bun" {- items.append((- env.preferences.t("容器镜像来源", en: "Container image source"),- containerImageSourceLabel(instanceHealth?.containerImageSource)+ items.append(SystemInfoItem(+ label: env.preferences.t("容器镜像来源", en: "Container image source"),+ value: containerImageSourceLabel(instanceHealth?.containerImageSource)))}return items}- private var connectionSystemInfoItems: [(label: String, value: String)] {+ private var connectionSystemInfoItems: [SystemInfoItem] {let queueItems = env.session.dataScope.flatMap { try? env.outbox.listItems(scope: $0) } ?? []let pending = queueItems.filter { $0.status == .pending || $0.status == .syncing }.countlet failed = queueItems.filter { $0.status == .error || $0.status == .conflict }.count@@ -617,10 +634,13 @@ struct SettingsView: View {? env.preferences.t("连接失败", en: "Connection failed"): env.preferences.t("正在检查", en: "Checking")return [- (env.preferences.t("实例连接", en: "Instance connection"), connection),- (env.preferences.t("请求耗时", en: "Request latency"), instanceLatencyMilliseconds.map { "\($0) ms" } ?? unknownSystemInfoValue),- (env.preferences.t("待同步", en: "Pending sync"), String(pending)),- (env.preferences.t("失败或冲突", en: "Failed or conflicted"), String(failed)),+ SystemInfoItem(label: env.preferences.t("实例连接", en: "Instance connection"), value: connection),+ SystemInfoItem(+ label: env.preferences.t("健康检查耗时", en: "Health check time", ja: "ヘルスチェック時間"),+ value: instanceLatencyMilliseconds.map { "\($0) ms" } ?? unknownSystemInfoValue+ ),+ SystemInfoItem(label: env.preferences.t("待同步", en: "Pending sync"), value: String(pending)),+ SystemInfoItem(label: env.preferences.t("失败或冲突", en: "Failed or conflicted"), value: String(failed)),]}@@ -668,14 +688,19 @@ struct SettingsView: View {}private var systemInfoText: String {- [- systemInfoTextSection(env.preferences.t("云端实例", en: "Cloud instance"), items: cloudSystemInfoItems),- systemInfoTextSection(env.preferences.t("当前客户端", en: "Current client"), items: clientSystemInfoItems),- systemInfoTextSection(env.preferences.t("连接与同步", en: "Connection and sync"), items: connectionSystemInfoItems),+ systemInfoText(includeLocalOnly: true)+ }++ private func systemInfoText(includeLocalOnly: Bool) -> String {+ let keep: (SystemInfoItem) -> Bool = includeLocalOnly ? { _ in true } : { !$0.localOnly }+ return [+ systemInfoTextSection(env.preferences.t("云端实例", en: "Cloud instance"), items: cloudSystemInfoItems.filter(keep)),+ systemInfoTextSection(env.preferences.t("当前客户端", en: "Current client"), items: clientSystemInfoItems.filter(keep)),+ systemInfoTextSection(env.preferences.t("连接与同步", en: "Connection and sync"), items: connectionSystemInfoItems.filter(keep)),].joined(separator: "\n\n")}- private func systemInfoTextSection(_ title: String, items: [(label: String, value: String)]) -> String {+ private func systemInfoTextSection(_ title: String, items: [SystemInfoItem]) -> String {([title] + items.map { "\($0.label): \($0.value)" }).joined(separator: "\n")}@@ -726,7 +751,7 @@ struct SettingsView: View {\(notice)```text- \(systemInfoText)+ \(systemInfoText(includeLocalOnly: false))```"""var components = URLComponents(string: "https://github.com/tianma-if/edgeever/issues/new")@@ -766,7 +791,7 @@ struct SettingsView: View {title: String,description: String,icon: String,- items: [(label: String, value: String)],+ items: [SystemInfoItem],notice: String? = nil) -> some View {settingsGroup(title: title, icon: icon) {@@ -835,6 +860,7 @@ struct SettingsView: View {.font(.system(size: 13, weight: .semibold)).foregroundStyle(AppTheme.title).multilineTextAlignment(.trailing)+ .textSelection(.enabled)}.padding(16).overlay(alignment: .top) {diff --git a/apps/mobile/src/screens/WorkspaceSettingsView.tsx b/apps/mobile/src/screens/WorkspaceSettingsView.tsxindex 020d0a6e..3f0a156d 100644--- a/apps/mobile/src/screens/WorkspaceSettingsView.tsx+++ b/apps/mobile/src/screens/WorkspaceSettingsView.tsx@@ -50,10 +50,17 @@ type MobileInstanceDiagnostics = {version: string;};+type MobileSystemInfoItem = {+ fullWidth?: boolean;+ label: string;+ localOnly?: boolean;+ value: string;+};+type MobileSystemInfoGroup = {description: string;id: "cloud" | "client" | "connection";- items: Array<{ label: string; value: string }>;+ items: MobileSystemInfoItem[];notice?: string;title: string;};@@ -139,6 +146,7 @@ export const SettingsView = ({void Linking.openURL(buildMobileFeedbackUrl(localePreference, {connectionState: instanceResult ? "connected" : instanceDiagnosticsQuery.isError ? "failed" : "checking",instance: instanceResult,+ instanceUrl: session?.baseUrl,sync: syncResult,}));};@@ -164,6 +172,7 @@ export const SettingsView = ({connectionState={instanceDiagnosticsQuery.data ? "connected" : instanceDiagnosticsQuery.isError ? "failed" : "checking"}defaultExpandedinstance={instanceDiagnosticsQuery.data}+ instanceUrl={session?.baseUrl}sync={syncDiagnosticsQuery.data}/></View>@@ -356,11 +365,13 @@ const SystemInfoCard = ({connectionState,defaultExpanded = false,instance,+ instanceUrl,sync,}: {connectionState: "checking" | "connected" | "failed";defaultExpanded?: boolean;instance?: MobileInstanceDiagnostics;+ instanceUrl?: string;sync?: MobileSyncDiagnostics;}) => {const [copied, setCopied] = useState(false);@@ -369,7 +380,7 @@ const SystemInfoCard = ({const localePreference = useMobileLocalePreference();const english = isEnglishMobileLocale(localePreference);const copy = getMobileSystemInfoText(localePreference);- const infoGroups = getMobileSystemInfoGroups(localePreference, { connectionState, instance, sync });+ const infoGroups = getMobileSystemInfoGroups(localePreference, { connectionState, instance, instanceUrl, sync });const description = hasUpdate ? copy.updateAvailableDescription : copy.description;const checking = status === "checking";const downloading = status === "downloading";@@ -457,26 +468,22 @@ const MobileSystemInfoSection = ({ group }: { group: MobileSystemInfoGroup }) =></View>) : null}<View style={styles.systemInfoRows}>- {Array.from({ length: Math.ceil(group.items.length / 3) }, (_, rowIndex) => {- const rowItems = group.items.slice(rowIndex * 3, rowIndex * 3 + 3);-- return (- <View- key={`${group.id}-row-${rowIndex}`}- style={[styles.systemInfoRow, rowIndex === Math.ceil(group.items.length / 3) - 1 && styles.systemInfoRowLast]}- >- {rowItems.map((item, itemIndex) => (- <View- key={item.label}- style={[styles.systemInfoCell, itemIndex < rowItems.length - 1 && styles.systemInfoCellDivider]}- >- <Text numberOfLines={1} style={styles.panelLabel}>{item.label}</Text>- <Text numberOfLines={1} selectable style={styles.systemInfoListValue}>{item.value}</Text>- </View>- ))}- </View>- );- })}+ {layoutMobileSystemInfoRows(group.items).map((rowItems, rowIndex, rows) => (+ <View+ key={`${group.id}-row-${rowIndex}`}+ style={[styles.systemInfoRow, rowIndex === rows.length - 1 && styles.systemInfoRowLast]}+ >+ {rowItems.map((item, itemIndex) => (+ <View+ key={item.label}+ style={[styles.systemInfoCell, itemIndex < rowItems.length - 1 && styles.systemInfoCellDivider]}+ >+ <Text numberOfLines={1} style={styles.panelLabel}>{item.label}</Text>+ <Text numberOfLines={item.fullWidth ? 3 : 1} selectable style={styles.systemInfoListValue}>{item.value}</Text>+ </View>+ ))}+ </View>+ ))}</View></View>);@@ -511,6 +518,7 @@ const getMobileSystemInfoText = (localePreference: MobileLocaleMode) =>installMode: "Mode",instanceBuild: "Instance build",instanceConnection: "Instance connection",+ instanceUrl: "Instance URL",instanceVersion: "Instance version",language: "Language",newUploadObjectStorage: "New upload object storage",@@ -518,7 +526,7 @@ const getMobileSystemInfoText = (localePreference: MobileLocaleMode) =>platform: "System",mobileApp: "Mobile app",platformVersion: "System version",- requestLatency: "Request latency",+ requestLatency: "Health check time",timeZone: "Time zone",openUpdate: "Get update",title: "System info",@@ -554,6 +562,7 @@ const getMobileSystemInfoText = (localePreference: MobileLocaleMode) =>installMode: "安装形态",instanceBuild: "实例构建",instanceConnection: "实例连接",+ instanceUrl: "实例地址",instanceVersion: "实例版本",language: "语言",newUploadObjectStorage: "新上传对象存储",@@ -561,7 +570,7 @@ const getMobileSystemInfoText = (localePreference: MobileLocaleMode) =>platform: "系统",mobileApp: "移动应用",platformVersion: "系统版本",- requestLatency: "请求耗时",+ requestLatency: "健康检查耗时",timeZone: "时区",openUpdate: "前往更新",title: "系统信息",@@ -614,11 +623,34 @@ const getMobileObjectStorage = (health: InstanceHealth | undefined, english: boo}};+const layoutMobileSystemInfoRows = (items: MobileSystemInfoItem[]) => {+ const rows: MobileSystemInfoItem[][] = [];+ let buffer: MobileSystemInfoItem[] = [];+ for (const item of items) {+ if (item.fullWidth) {+ if (buffer.length > 0) {+ rows.push(buffer);+ buffer = [];+ }+ rows.push([item]);+ continue;+ }+ buffer.push(item);+ if (buffer.length === 3) {+ rows.push(buffer);+ buffer = [];+ }+ }+ if (buffer.length > 0) rows.push(buffer);+ return rows;+};+const getMobileSystemInfoGroups = (localePreference: MobileLocaleMode,diagnostics: {connectionState?: "checking" | "connected" | "failed";instance?: MobileInstanceDiagnostics;+ instanceUrl?: string;sync?: MobileSyncDiagnostics;} = {},): MobileSystemInfoGroup[] => {@@ -655,6 +687,9 @@ const getMobileSystemInfoGroups = (id: "cloud",notice: getMobileClientAheadNotice(copy, instance?.version, instance?.health.runtime),items: [+ ...(diagnostics.instanceUrl+ ? [{ fullWidth: true, label: copy.instanceUrl, localOnly: true, value: diagnostics.instanceUrl }]+ : []),{ label: copy.instanceVersion, value: instance?.version ? `v${instance.version.replace(/^v/, "")}` : copy.unknown },{ label: copy.instanceBuild, value: instance?.health.build || copy.unknown },{ label: copy.databaseVersion, value: instance?.health.migration || copy.unknown },@@ -714,10 +749,12 @@ const buildMobileFeedbackUrl = (privacyNotice: english? "GitHub Issues are public. Do not include passwords, tokens, instance URLs, or private note content.": "GitHub Issue 公开可见,请勿提交密码、Token、实例地址或私人笔记内容。",- systemInfo: infoGroups.flatMap((group) => group.items.map((item) => ({- label: `${group.title} / ${item.label}`,- value: item.value,- }))),+ systemInfo: infoGroups.flatMap((group) => group.items+ .filter((item) => !item.localOnly)+ .map((item) => ({+ label: `${group.title} / ${item.label}`,+ value: item.value,+ }))),systemInfoHeading: english ? "System information" : "系统信息",systemInfoNotice: english? "The following information was generated by EdgeEver to help diagnose the issue."diff --git a/apps/web/src/components/DesktopSyncIssuesDialog.tsx b/apps/web/src/components/DesktopSyncIssuesDialog.tsxindex 8fc17035..74a675d9 100644--- a/apps/web/src/components/DesktopSyncIssuesDialog.tsx+++ b/apps/web/src/components/DesktopSyncIssuesDialog.tsx@@ -7,7 +7,7 @@ import { Button } from "@/components/ui/button";import { Dialog, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogTitle } from "@/components/ui/dialog";import { Select, SelectContent, SelectItem, SelectTrigger, SelectValue } from "@/components/ui/select";import { AppConfirmDialog } from "@/components/dialogs/ConfirmDialogs";-import { getWebSystemInfoItems } from "@/components/settings/SystemInfoCard";+import { getShareableWebSystemInfoItems } from "@/components/settings/SystemInfoCard";import { api, getConfiguredDesktopApiBaseUrl } from "@/lib/api";import {createDesktopSyncDiagnosticText,@@ -87,7 +87,7 @@ export const DesktopSyncIssuesDialog = ({text: createDesktopSyncDiagnosticText(items, globalIssue),},privacyNotice: t("feedback.privacyNotice"),- systemInfo: getWebSystemInfoItems(t, i18n.language, {+ systemInfo: getShareableWebSystemInfoItems(t, i18n.language, {clientRuntime: clientRuntimeQuery.data,instance: healthQuery.data?.health,instanceVersion: releaseQuery.data?.version,diff --git a/apps/web/src/components/settings/FeedbackLink.tsx b/apps/web/src/components/settings/FeedbackLink.tsxindex 36b09161..b47dfe2d 100644--- a/apps/web/src/components/settings/FeedbackLink.tsx+++ b/apps/web/src/components/settings/FeedbackLink.tsx@@ -3,7 +3,7 @@ import { ExternalLink, MessageSquare } from "lucide-react";import { useMemo } from "react";import { useTranslation } from "react-i18next";import { cn } from "@/lib/utils";-import { getWebSystemInfoItems } from "./SystemInfoCard";+import { getShareableWebSystemInfoItems } from "./SystemInfoCard";export const FeedbackLink = ({ className }: { className?: string }) => {const { t, i18n } = useTranslation();@@ -13,7 +13,7 @@ export const FeedbackLink = ({ className }: { className?: string }) => {contentHeading: t("feedback.issueContentHeading"),contentPrompt: t("feedback.issueContentPrompt"),privacyNotice: t("feedback.privacyNotice"),- systemInfo: getWebSystemInfoItems(t, i18n.language),+ systemInfo: getShareableWebSystemInfoItems(t, i18n.language),systemInfoHeading: t("feedback.systemInfoHeading"),systemInfoNotice: t("feedback.systemInfoNotice"),titlePrefix: t("feedback.issueTitlePrefix"),diff --git a/apps/web/src/components/settings/SystemInfoCard.tsx b/apps/web/src/components/settings/SystemInfoCard.tsxindex 7e56ba83..3b8ead14 100644--- a/apps/web/src/components/settings/SystemInfoCard.tsx+++ b/apps/web/src/components/settings/SystemInfoCard.tsx@@ -10,9 +10,9 @@ import {} from "./settings-ui";import { Collapsible, CollapsibleContent, CollapsibleTrigger } from "@/components/ui/collapsible";import { cn } from "@/lib/utils";-import { SystemInfoPanel, type SystemInfoItem, getWebSystemInfoItems } from "./SystemInfoPanel";+import { SystemInfoPanel, type SystemInfoItem, getShareableWebSystemInfoItems, getWebSystemInfoItems } from "./SystemInfoPanel";-export { getWebSystemInfoItems };+export { getShareableWebSystemInfoItems, getWebSystemInfoItems };export type { SystemInfoItem };export const SystemInfoCard = ({ defaultExpanded = false }: { defaultExpanded?: boolean }) => {diff --git a/apps/web/src/components/settings/SystemInfoPanel.test.mjs b/apps/web/src/components/settings/SystemInfoPanel.test.mjsindex fcaf1d30..231b64da 100644--- a/apps/web/src/components/settings/SystemInfoPanel.test.mjs+++ b/apps/web/src/components/settings/SystemInfoPanel.test.mjs@@ -2,6 +2,8 @@ import { readFileSync } from "node:fs";import { describe, expect, test } from "bun:test";const source = readFileSync(new URL("./SystemInfoPanel.tsx", import.meta.url), "utf8");+const feedbackSource = readFileSync(new URL("./FeedbackLink.tsx", import.meta.url), "utf8");+const syncIssueSource = readFileSync(new URL("../DesktopSyncIssuesDialog.tsx", import.meta.url), "utf8");describe("system information client/instance version hint", () => {test("warns in system info when the client is ahead of the connected instance", () => {@@ -13,3 +15,25 @@ describe("system information client/instance version hint", () => {expect(source).toContain("clientAheadOfInstance");});});++describe("system information diagnostic fields", () => {+ test("shows desktop instance URL and data directory only as local-only fields", () => {+ expect(source).toContain('t("systemInfo.instanceUrl")');+ expect(source).toContain('t("systemInfo.dataDirectory")');+ expect(source).toContain("localOnly: true");+ expect(source).toContain('clientKind === "desktopApp"');+ expect(source).toContain("getShareableWebSystemInfoItems");+ expect(source).toContain(".filter((item) => !item.localOnly)");+ expect(feedbackSource).toContain("getShareableWebSystemInfoItems");+ expect(feedbackSource.replaceAll("getShareableWebSystemInfoItems", "")).not.toContain("getWebSystemInfoItems");+ expect(syncIssueSource).toContain("getShareableWebSystemInfoItems");+ expect(syncIssueSource.replaceAll("getShareableWebSystemInfoItems", "")).not.toContain("getWebSystemInfoItems");+ });++ test("distinguishes empty sync from never synced", () => {+ expect(source).not.toContain('t("systemInfo.authMode")');+ expect(source).toContain('t("systemInfo.nothingToSync")');+ expect(source).toContain('t("systemInfo.neverSynced")');+ expect(source).toContain("formatLastSuccessfulSync");+ });+});diff --git a/apps/web/src/components/settings/SystemInfoPanel.tsx b/apps/web/src/components/settings/SystemInfoPanel.tsxindex 60cf9da1..4106b3ea 100644--- a/apps/web/src/components/settings/SystemInfoPanel.tsx+++ b/apps/web/src/components/settings/SystemInfoPanel.tsx@@ -25,6 +25,7 @@ export type SystemInfoItem = {mono?: boolean;colSpan?: "full" | "two" | "double-sm";status?: "connected" | "connecting" | "failed" | "warning" | "error" | "default";+ localOnly?: boolean;};type InstanceSystemDiagnostics = Pick<InstanceHealth, "build" | "containerImageSource" | "deployment" | "migration" | "objectStorageProvider" | "storage"> & {@@ -34,6 +35,7 @@ type InstanceSystemDiagnostics = Pick<InstanceHealth, "build" | "containerImageSexport type SystemInfoDiagnostics = {clientRuntime?: ClientRuntimeDiagnostics | null;instance?: Partial<InstanceSystemDiagnostics> | null;+ instanceUrl?: string | null;instanceVersion?: string | null;};@@ -85,6 +87,22 @@ const getColSpanClass = (colSpan?: SystemInfoItem["colSpan"]) => {return "col-span-1";};+const formatLastSuccessfulSync = (+ t: (key: string) => string,+ language: string,+ sync: ClientSyncDiagnostics | undefined,+) => {+ if (!sync) return t("systemInfo.unknown");+ if (sync.lastSyncedAt) {+ const lastSyncedDate = new Date(sync.lastSyncedAt);+ if (Number.isFinite(lastSyncedDate.getTime())) {+ return new Intl.DateTimeFormat(language, { dateStyle: "medium", timeStyle: "short" }).format(lastSyncedDate);+ }+ }+ const outstanding = sync.pending + sync.syncing + sync.error + sync.conflict;+ return outstanding > 0 ? t("systemInfo.neverSynced") : t("systemInfo.nothingToSync");+};+const getWebSystemInfoGroups = (t: (key: string) => string,language: string,@@ -107,6 +125,9 @@ const getWebSystemInfoGroups = (},clientKind !== "desktopApp",);+ const instanceUrl = clientKind === "desktopApp"+ ? (diagnostics.instanceUrl ?? getConfiguredDesktopApiBaseUrl()).trim()+ : "";return [{@@ -114,6 +135,14 @@ const getWebSystemInfoGroups = (title: t("systemInfo.cloudSection"),description: t("systemInfo.cloudSectionDescription"),items: [+ ...(instanceUrl+ ? [{+ label: t("systemInfo.instanceUrl"),+ value: instanceUrl,+ colSpan: "full" as const,+ localOnly: true,+ }]+ : []),{label: t("systemInfo.instanceVersion"),value: diagnostics.instanceVersion@@ -194,6 +223,15 @@ const getWebSystemInfoGroups = (},{ label: t("systemInfo.language"), value: navigator.language || language, mono: true },{ label: t("systemInfo.timeZone"), value: timeZone, mono: true, colSpan: "double-sm" },+ ...(clientKind === "desktopApp"+ ? [{+ label: t("systemInfo.dataDirectory"),+ value: diagnostics.clientRuntime?.dataDirectory ?? t("systemInfo.unknown"),+ mono: true,+ colSpan: "full" as const,+ localOnly: true,+ }]+ : []),],},];@@ -206,6 +244,14 @@ export const getWebSystemInfoItems = (): SystemInfoItem[] => getWebSystemInfoGroups(t, language, diagnostics).flatMap((group) => group.items);+export const getShareableWebSystemInfoItems = (+ t: (key: string) => string,+ language: string,+ diagnostics: SystemInfoDiagnostics = {},+) => getWebSystemInfoItems(t, language, diagnostics)+ .filter((item) => !item.localOnly)+ .map(({ label, value }) => ({ label, value }));+export const SystemInfoPanel = ({ active = true }: { active?: boolean }) => {const { t, i18n } = useTranslation();const [copied, setCopied] = useState(false);@@ -261,15 +307,10 @@ export const SystemInfoPanel = ({ active = true }: { active?: boolean }) => {const groups = getWebSystemInfoGroups(t, i18n.language, {clientRuntime: clientRuntimeQuery.data,instance: healthQuery.data?.health,+ instanceUrl: desktopAvailable ? instanceUrl : null,instanceVersion: release?.version,});- const lastSyncedAt = syncDiagnosticsQuery.data?.lastSyncedAt;- const lastSyncedDate = lastSyncedAt ? new Date(lastSyncedAt) : null;- const formattedLastSync = !syncDiagnosticsQuery.data- ? t("systemInfo.unknown")- : lastSyncedDate && Number.isFinite(lastSyncedDate.getTime())- ? new Intl.DateTimeFormat(i18n.language, { dateStyle: "medium", timeStyle: "short" }).format(lastSyncedDate)- : t("systemInfo.neverSynced");+ const formattedLastSync = formatLastSuccessfulSync(t, i18n.language, syncDiagnosticsQuery.data);const pendingCount = syncDiagnosticsQuery.data? syncDiagnosticsQuery.data.pending + syncDiagnosticsQuery.data.syncing: null;@@ -315,10 +356,12 @@ export const SystemInfoPanel = ({ active = true }: { active?: boolean }) => {return groups;}, [clientRuntimeQuery.data,+ desktopAvailable,healthQuery.data,healthQuery.isError,healthQuery.isSuccess,i18n.language,+ instanceUrl,release?.version,syncDiagnosticsQuery.data,t,diff --git a/apps/web/src/lib/system-diagnostics.ts b/apps/web/src/lib/system-diagnostics.tsindex 65d7bf90..43ea9d8f 100644--- a/apps/web/src/lib/system-diagnostics.ts+++ b/apps/web/src/lib/system-diagnostics.ts@@ -7,6 +7,7 @@ export type ClientRuntimeDiagnostics = {appVersion: string | null;architecture: string | null;autoUpdateSupported: boolean | null;+ dataDirectory: string | null;engine: string | null;operatingSystem: string | null;};@@ -80,6 +81,7 @@ export const getClientRuntimeDiagnostics = async (): Promise<ClientRuntimeDiagnoappVersion: info.appVersion,architecture: info.architecture === "unknown" ? null : info.architecture,autoUpdateSupported: info.autoUpdateSupported,+ dataDirectory: info.dataDir && info.dataDir !== "unknown" ? info.dataDir : null,engine: [info.electron === "unknown" ? null : `Electron ${info.electron}`,info.chrome === "unknown" ? null : `Chromium ${info.chrome}`,@@ -106,6 +108,7 @@ export const getClientRuntimeDiagnostics = async (): Promise<ClientRuntimeDiagnoappVersion: null,architecture: architecture || null,autoUpdateSupported: null,+ dataDirectory: null,engine: browserEngine(navigator.userAgent),operatingSystem: browserOperatingSystem(navigator.userAgent,diff --git a/apps/web/src/vite-env.d.ts b/apps/web/src/vite-env.d.tsindex 3b9a8e19..715d8e2c 100644--- a/apps/web/src/vite-env.d.ts+++ b/apps/web/src/vite-env.d.ts@@ -56,6 +56,7 @@ interface EdgeEverDesktopBridge {osRelease: string;electron: string;chrome: string;+ dataDir: string;}>;setAccountScope(accountId: string | null): Promise<{ ready: true; scope: string }>;updateStatus(): Promise<DesktopUpdateStatus>;diff --git a/packages/shared/src/i18n/en-US.ts b/packages/shared/src/i18n/en-US.tsindex c993d16c..b0878ee3 100644--- a/packages/shared/src/i18n/en-US.ts+++ b/packages/shared/src/i18n/en-US.ts@@ -1127,6 +1127,7 @@ export const enUS = {connectionSection: "Connection and sync",connectionSectionDescription: "Connection status between this client and the cloud instance.",version: "Version",+ instanceUrl: "Instance URL",instanceVersion: "Instance version",instanceBuild: "Instance build",databaseMigration: "Database version",@@ -1186,8 +1187,9 @@ export const enUS = {runtimeEngine: "Runtime engine",language: "Language",timeZone: "Time zone",+ dataDirectory: "Data directory",instanceConnection: "Instance connection",- requestLatency: "Request latency",+ requestLatency: "Health check time",lastSuccessfulSync: "Last successful sync",pendingSync: "Pending sync",failedSync: "Failed or conflicted",@@ -1195,6 +1197,7 @@ export const enUS = {connectionChecking: "Checking",connectionFailed: "Connection failed",neverSynced: "Not synced yet",+ nothingToSync: "Nothing to sync",installMode: "Mode",standalone: "Installed app",browserMode: "Browser",diff --git a/packages/shared/src/i18n/ja.ts b/packages/shared/src/i18n/ja.tsindex c0b6f5be..03bdbf43 100644--- a/packages/shared/src/i18n/ja.ts+++ b/packages/shared/src/i18n/ja.ts@@ -1127,6 +1127,7 @@ export const ja = {connectionSection: "接続と同期",connectionSectionDescription: "このクライアントとクラウドインスタンスの接続状態です。",version: "バージョン",+ instanceUrl: "インスタンス URL",instanceVersion: "インスタンスバージョン",instanceBuild: "インスタンスビルド",databaseMigration: "データベースバージョン",@@ -1186,8 +1187,9 @@ export const ja = {runtimeEngine: "ランタイムエンジン",language: "言語",timeZone: "タイムゾーン",+ dataDirectory: "データディレクトリ",instanceConnection: "インスタンス接続",- requestLatency: "リクエスト遅延",+ requestLatency: "ヘルスチェック時間",lastSuccessfulSync: "最後に成功した同期",pendingSync: "同期待ち",failedSync: "失敗または競合",@@ -1195,6 +1197,7 @@ export const ja = {connectionChecking: "確認中",connectionFailed: "接続失敗",neverSynced: "まだ同期していません",+ nothingToSync: "同期するものはありません",installMode: "モード",standalone: "インストール済みアプリ",browserMode: "ブラウザ",diff --git a/packages/shared/src/i18n/zh-CN.ts b/packages/shared/src/i18n/zh-CN.tsindex 20df15bb..b7515353 100644--- a/packages/shared/src/i18n/zh-CN.ts+++ b/packages/shared/src/i18n/zh-CN.ts@@ -1127,6 +1127,7 @@ export const zhCN = {connectionSection: "连接与同步",connectionSectionDescription: "当前客户端与云端实例之间的连接状态。",version: "版本号",+ instanceUrl: "实例地址",instanceVersion: "实例版本",instanceBuild: "实例构建",databaseMigration: "数据库版本",@@ -1186,8 +1187,9 @@ export const zhCN = {runtimeEngine: "运行引擎",language: "语言",timeZone: "时区",+ dataDirectory: "数据目录",instanceConnection: "实例连接",- requestLatency: "请求耗时",+ requestLatency: "健康检查耗时",lastSuccessfulSync: "最近成功同步",pendingSync: "待同步",failedSync: "失败或冲突",@@ -1195,6 +1197,7 @@ export const zhCN = {connectionChecking: "正在检查",connectionFailed: "连接失败",neverSynced: "尚未同步",+ nothingToSync: "当前无需同步",installMode: "运行模式",standalone: "已安装应用",browserMode: "浏览器",