-
- {entries.map((entry) => (
-
- ))}
-
+
+
+ {entries.map((entry) => (
+
+ ))}
)}
@@ -185,17 +184,29 @@ function FeedbackPopoverContent({ onClose }: { onClose: () => void }) {
);
}
-function FeedbackEntryItem({ entry }: { entry: FeedbackEntry }) {
- const formatted = new Date(entry.createdAt).toLocaleDateString(undefined, {
+function relativeDate(iso: string): string {
+ const diff = Date.now() - new Date(iso).getTime();
+ const mins = Math.floor(diff / 60_000);
+ if (mins < 1) return "just now";
+ if (mins < 60) return `${mins}m ago`;
+ const hrs = Math.floor(mins / 60);
+ if (hrs < 24) return `${hrs}h ago`;
+ const days = Math.floor(hrs / 24);
+ if (days < 7) return `${days}d ago`;
+ return new Date(iso).toLocaleDateString(undefined, {
month: "short",
day: "numeric",
});
+}
+function FeedbackEntryItem({ entry }: { entry: FeedbackEntry }) {
return (
-
-
{entry.message}
-
- {formatted}
+
+
+ {entry.message}
+
+
+ {relativeDate(entry.createdAt)}
);
diff --git a/apps/web/src/services/storage/migrations/__tests__/v1-to-v2.test.ts b/apps/web/src/services/storage/migrations/__tests__/v1-to-v2.test.ts
index 56c83403..9cea9a2e 100644
--- a/apps/web/src/services/storage/migrations/__tests__/v1-to-v2.test.ts
+++ b/apps/web/src/services/storage/migrations/__tests__/v1-to-v2.test.ts
@@ -1,7 +1,5 @@
import { describe, expect, test } from "bun:test";
-import {
- DEFAULT_BACKGROUND_BLUR_INTENSITY,
-} from "@/lib/background/blur";
+import { DEFAULT_BACKGROUND_BLUR_INTENSITY } from "@/lib/background/blur";
import { DEFAULT_BACKGROUND_COLOR } from "@/lib/background/color";
import { DEFAULT_CANVAS_SIZE } from "@/lib/canvas/sizes";
const DEFAULT_FPS = 30;
@@ -135,9 +133,7 @@ describe("V1 to V2 Migration", () => {
const settings = result.project.settings as Record;
const background = settings.background as Record;
- expect(background.blurIntensity).toBe(
- DEFAULT_BACKGROUND_BLUR_INTENSITY,
- );
+ expect(background.blurIntensity).toBe(DEFAULT_BACKGROUND_BLUR_INTENSITY);
});
test("preserves currentSceneId", async () => {
diff --git a/apps/web/src/services/storage/migrations/transformers/v1-to-v2.ts b/apps/web/src/services/storage/migrations/transformers/v1-to-v2.ts
index b6b38f3c..a19269cd 100644
--- a/apps/web/src/services/storage/migrations/transformers/v1-to-v2.ts
+++ b/apps/web/src/services/storage/migrations/transformers/v1-to-v2.ts
@@ -1,6 +1,4 @@
-import {
- DEFAULT_BACKGROUND_BLUR_INTENSITY,
-} from "@/lib/background/blur";
+import { DEFAULT_BACKGROUND_BLUR_INTENSITY } from "@/lib/background/blur";
import { DEFAULT_BACKGROUND_COLOR } from "@/lib/background/color";
import { DEFAULT_CANVAS_SIZE } from "@/lib/canvas/sizes";
const DEFAULT_FPS = 30;