diff --git a/apps/start/src/components/ui/key-value-grid.tsx b/apps/start/src/components/ui/key-value-grid.tsx
index 213ac9736..01180dd42 100644
--- a/apps/start/src/components/ui/key-value-grid.tsx
+++ b/apps/start/src/components/ui/key-value-grid.tsx
@@ -28,6 +28,35 @@ interface KeyValueGridProps {
copyable?: boolean;
}
+/**
+ * The value cell truncates, so the full value is only reachable through the native
+ * tooltip and the copy button. Both need a string, and objects render as JSON here,
+ * so stringify them rather than leaving the value unreadable.
+ */
+export function toStringValue(value: unknown): string | undefined {
+ if (value === null || value === undefined) {
+ return undefined;
+ }
+
+ if (typeof value === 'string') {
+ return value;
+ }
+
+ if (value instanceof Date) {
+ return value.toISOString();
+ }
+
+ if (typeof value === 'object') {
+ try {
+ return JSON.stringify(value);
+ } catch {
+ return undefined;
+ }
+ }
+
+ return String(value);
+}
+
export function KeyValueGrid({
data,
columns = 1,
@@ -80,7 +109,10 @@ export function KeyValueGrid({