Skip to content

AI-native knowledge base & Evernote/Obsidian alternative with instant sync & native MCP. Free on Cloudflare or self-hosted via Docker.

fix(web): drop the updated time from the note header

tianma-if566d8df90964
diff --git a/apps/web/src/components/DiagramEditorPane.test.mjs b/apps/web/src/components/DiagramEditorPane.test.mjs
index bbaa5102..fdefd73d 100644
--- a/apps/web/src/components/DiagramEditorPane.test.mjs
+++ b/apps/web/src/components/DiagramEditorPane.test.mjs
@@ -126,7 +126,8 @@ describe("diagram editor canvas surface", () => {
test("uses the common note header and capability-aware more menu", () => {
expect(source).toContain("<MemoEditorTopRowLeading");
- expect(topRowLeadingSource).toContain('<span className="hidden truncate text-xs text-slate-400 sm:inline">{updatedLabel}</span>');
+ expect(topRowLeadingSource).not.toContain("MemoEditorUpdatedLabel");
+ expect(source).not.toContain("formatDateTime(memo.updatedAt)");
expect(source).not.toContain('t("editor.updatedAt", { time: updatedLabel })');
expect(source).toContain("onToggleDesktopFocusMode");
expect(source).not.toContain("onOpenPreviousMemo");
diff --git a/apps/web/src/components/DiagramEditorPane.tsx b/apps/web/src/components/DiagramEditorPane.tsx
index 5d651006..bc09e38a 100644
--- a/apps/web/src/components/DiagramEditorPane.tsx
+++ b/apps/web/src/components/DiagramEditorPane.tsx
@@ -151,7 +151,7 @@ import { ClipboardCopyNotice } from "@/components/ClipboardCopyNotice";
import { DiagramToolbar, DiagramToolbarAddTrigger } from "@/components/DiagramToolbar";
import { MemoEditorHeaderActions } from "@/components/MemoEditorHeaderActions";
import { MemoEditorMetadataRow } from "@/components/MemoEditorMetadataRow";
-import { MemoEditorFocusModeButton, MemoEditorTopRowLeading, MemoEditorUpdatedLabel } from "@/components/MemoEditorTopRowLeading";
+import { MemoEditorFocusModeButton, MemoEditorTopRowLeading } from "@/components/MemoEditorTopRowLeading";
import { MemoEditorToolbarDivider } from "@/components/MemoEditorToolbarChrome";
import {
MEMO_EDITOR_METADATA_ROW_CLASS_NAME,
@@ -182,7 +182,7 @@ import { isLocalMemoId } from "@/lib/local-mirror";
import { isBrowserOffline } from "@/lib/network-status";
import { statusSettleMotion } from "@/lib/motion";
import type { EdgeEverRepository } from "@/lib/repository";
-import { cn, formatDateTime, parseTagsText } from "@/lib/utils";
+import { cn, parseTagsText } from "@/lib/utils";
Graph.registerConnector(MIND_MAP_CONNECTOR_NAME, mindMapConnector, true);
@@ -3058,7 +3058,6 @@ export const DiagramEditorPane = ({
if (!document) return null;
const kindLabel = document.kind === "mind-map" ? t("diagram.mindMap") : document.kind === "architecture" ? t("diagram.architecture") : t("diagram.flowchart");
- const updatedLabel = formatDateTime(memo.updatedAt);
const currentMarkdown = historyOpen && dirty
? serializeDiagramDocument(graphRef.current ? graphToDocument(graphRef.current, document.kind, themeRef.current, structureRef.current) : document)
: memo.contentMarkdown;
@@ -3147,7 +3146,6 @@ export const DiagramEditorPane = ({
<div ref={setHeaderStatusCluster} className="absolute right-1 top-0 flex h-full shrink-0 items-center gap-1 sm:right-2">
<div className="flex min-w-0 items-center gap-1.5">
- <MemoEditorUpdatedLabel updatedLabel={updatedLabel} />
<m.span
key={`mobile-${saveStatus}`}
className={cn(
diff --git a/apps/web/src/components/EditorPane.tsx b/apps/web/src/components/EditorPane.tsx
index 6373f275..156294be 100644
--- a/apps/web/src/components/EditorPane.tsx
+++ b/apps/web/src/components/EditorPane.tsx
@@ -34,7 +34,7 @@ import { Button } from "@/components/ui/button";
import { ClipboardCopyNotice } from "@/components/ClipboardCopyNotice";
import { MemoEditorHeaderActions } from "@/components/MemoEditorHeaderActions";
import { MemoEditorMetadataRow } from "@/components/MemoEditorMetadataRow";
-import { MemoEditorFocusModeButton, MemoEditorTopRowLeading, MemoEditorUpdatedLabel } from "@/components/MemoEditorTopRowLeading";
+import { MemoEditorFocusModeButton, MemoEditorTopRowLeading } from "@/components/MemoEditorTopRowLeading";
import { MemoEditorToolbarDivider } from "@/components/MemoEditorToolbarChrome";
import {
MEMO_EDITOR_METADATA_ROW_CLASS_NAME,
@@ -116,7 +116,7 @@ import { AiSidebarErrorBoundary } from "./ai-sidebar/AiSidebarErrorBoundary";
import { api } from "@/lib/api";
import { isDesktopResourceRuntime, stageDesktopResource, toDesktopResourceDownloadUrl, toDesktopResourceUrl } from "@/lib/desktop-resources";
import { contentReferencesStagedResourceUrl, findMatchingMemoResource, repairMemoStagedResourceUrls, repairTiptapStagedResourceUrls } from "@/lib/staged-resource-repair";
-import { cn, formatDateTime, parseTagsText } from "@/lib/utils";
+import { cn, parseTagsText } from "@/lib/utils";
import { editorContentColumnMaxWidth, type EditorContentWidth } from "@/lib/editor-content-width";
import {
countMemoCharacters,
@@ -3415,7 +3415,6 @@ const RichEditorPane = ({
? "bg-slate-100 text-slate-700"
: saveStateClassName;
- const updatedLabel = formatDateTime(memo.updatedAt);
const currentMarkdownForAi = getCurrentMarkdownForAi();
const mobileDoneDisabled =
@@ -3724,7 +3723,6 @@ const RichEditorPane = ({
<div ref={setHeaderStatusCluster} className="absolute right-1 top-0 flex h-full shrink-0 items-center gap-1 sm:right-2">
<div className="flex min-w-0 items-center gap-1.5">
- <MemoEditorUpdatedLabel updatedLabel={updatedLabel} />
<span className="hidden shrink-0 whitespace-nowrap text-xs tabular-nums text-slate-400 sm:inline">
{t("editor.characterCount", { count: characterCount })}
</span>
diff --git a/apps/web/src/components/FocusModeEntry.test.mjs b/apps/web/src/components/FocusModeEntry.test.mjs
index b3d1f1a0..526a04ad 100644
--- a/apps/web/src/components/FocusModeEntry.test.mjs
+++ b/apps/web/src/components/FocusModeEntry.test.mjs
@@ -3,6 +3,7 @@ import { readFileSync } from "node:fs";
const editorPaneSource = readFileSync(new URL("./EditorPane.tsx", import.meta.url), "utf8");
const diagramEditorPaneSource = readFileSync(new URL("./DiagramEditorPane.tsx", import.meta.url), "utf8");
+const infographicEditorPaneSource = readFileSync(new URL("./InfographicEditorPane.tsx", import.meta.url), "utf8");
const topRowLeadingSource = readFileSync(new URL("./MemoEditorTopRowLeading.tsx", import.meta.url), "utf8");
const expectIconOnlyFocusModeEntry = (source) => {
@@ -24,11 +25,14 @@ describe("focus mode entry", () => {
}
});
- test("keeps status copy ahead of the action icons in the shared editor header", () => {
- for (const source of [editorPaneSource, diagramEditorPaneSource]) {
- const statusIndex = source.indexOf("<MemoEditorUpdatedLabel");
+ test("keeps status copy ahead of the action icons and leaves the updated time off the header", () => {
+ expect(topRowLeadingSource).not.toContain("MemoEditorUpdatedLabel");
+ for (const source of [editorPaneSource, diagramEditorPaneSource, infographicEditorPaneSource]) {
+ const statusIndex = source.indexOf('ref={setHeaderStatusCluster}');
const focusIndex = source.indexOf("<MemoEditorFocusModeButton");
const headerActionsIndex = source.indexOf("<MemoEditorHeaderActions");
+ expect(source).not.toContain("MemoEditorUpdatedLabel");
+ expect(source).not.toContain("formatDateTime(memo.updatedAt)");
expect(statusIndex).toBeGreaterThan(-1);
expect(focusIndex).toBeGreaterThan(statusIndex);
expect(headerActionsIndex).toBeGreaterThan(focusIndex);
diff --git a/apps/web/src/components/InfographicEditorPane.test.mjs b/apps/web/src/components/InfographicEditorPane.test.mjs
index 58229b51..67c68a78 100644
--- a/apps/web/src/components/InfographicEditorPane.test.mjs
+++ b/apps/web/src/components/InfographicEditorPane.test.mjs
@@ -20,5 +20,7 @@ describe("infographic editor header", () => {
expect(source).not.toContain('t("infographic.save")');
expect(source).toContain("parseTagsText(tagsRef.current)");
expect(source).toContain("repository.moveMemos");
+ expect(source).not.toContain("MemoEditorUpdatedLabel");
+ expect(source).not.toContain("formatDateTime(memo.updatedAt)");
});
});
diff --git a/apps/web/src/components/InfographicEditorPane.tsx b/apps/web/src/components/InfographicEditorPane.tsx
index 2daf9801..05d9d059 100644
--- a/apps/web/src/components/InfographicEditorPane.tsx
+++ b/apps/web/src/components/InfographicEditorPane.tsx
@@ -12,7 +12,7 @@ import { EditorNoteSearchBar } from "@/components/editor/EditorNoteSearchBar";
import { IconTooltip } from "@/components/editor/EditorPaneChrome";
import { MemoEditorHeaderActions } from "@/components/MemoEditorHeaderActions";
import { MemoEditorMetadataRow } from "@/components/MemoEditorMetadataRow";
-import { MemoEditorFocusModeButton, MemoEditorTopRowLeading, MemoEditorUpdatedLabel } from "@/components/MemoEditorTopRowLeading";
+import { MemoEditorFocusModeButton, MemoEditorTopRowLeading } from "@/components/MemoEditorTopRowLeading";
import { MEMO_EDITOR_METADATA_ROW_CLASS_NAME, MEMO_EDITOR_TOP_ROW_CLASS_NAME, nextTitleStatusClearance } from "@/components/MemoEditorChromeDensity";
import { MemoEditorToolbarDivider } from "@/components/MemoEditorToolbarChrome";
import { MemoTitleInput } from "@/components/MemoTitleInput";
@@ -22,7 +22,7 @@ import { createLocalEditSession, requiresLocalEditSession } from "@/components/e
import { buildInfographicSyntax, buildOfficialInfographicSyntax, infographicAgentCandidates, INFOGRAPHIC_TEMPLATES, parseGeneratedOfficialData, type InfographicItem } from "@/lib/infographic-generation";
import { statusSettleMotion } from "@/lib/motion";
import type { EdgeEverRepository } from "@/lib/repository";
-import { cn, formatDateTime, parseTagsText } from "@/lib/utils";
+import { cn, parseTagsText } from "@/lib/utils";
type Props = {
memo: MemoDetail;
@@ -537,7 +537,6 @@ export default function InfographicEditorPane({
};
const previewUsesLightSheet = Boolean(syntax.trim()) && syntax.split("\n")[1] !== "theme dark";
- const updatedLabel = formatDateTime(memo.updatedAt);
const saveStatus = saving ? "saving" : dirty ? "unsaved" : "saved";
const saveLabel = t(`editor.saveState.${saveStatus}`);
const saveStatusClassName = saveStatus === "saved" ? "text-slate-400" : "bg-slate-100 text-slate-700";
@@ -581,7 +580,6 @@ export default function InfographicEditorPane({
</div>
<div ref={setHeaderStatusCluster} className="absolute right-1 top-0 flex h-full shrink-0 items-center gap-1 sm:right-2">
<div className="flex min-w-0 items-center gap-1.5">
- <MemoEditorUpdatedLabel updatedLabel={updatedLabel} />
{readOnly ? <span className="text-xs text-slate-500">{t("infographic.readOnly")}</span> : (
<>
<m.span key={`mobile-${saveStatus}`} className={cn("inline-flex max-w-[5.5rem] truncate rounded-full px-2 py-1 text-xs font-medium sm:hidden", saveStatus === "saved" ? "bg-slate-100 text-slate-500" : saveStatusClassName)} role="status" {...statusSettleMotion}>{saveLabel}</m.span>
diff --git a/apps/web/src/components/MemoEditorTopRowLeading.tsx b/apps/web/src/components/MemoEditorTopRowLeading.tsx
index 57b0c68c..8985663c 100644
--- a/apps/web/src/components/MemoEditorTopRowLeading.tsx
+++ b/apps/web/src/components/MemoEditorTopRowLeading.tsx
@@ -5,10 +5,6 @@ import { IconTooltip } from "@/components/editor/EditorPaneChrome";
import { Button } from "@/components/ui/button";
import { cn } from "@/lib/utils";
-export const MemoEditorUpdatedLabel = ({ updatedLabel }: { updatedLabel: string }) => (
- <span className="hidden truncate text-xs text-slate-400 sm:inline">{updatedLabel}</span>
-);
-
export const MemoEditorFocusModeButton = ({
desktopFocusMode,
onToggleDesktopFocusMode,