diff --git a/src/app/at/[...slug]/page.tsx b/src/app/at/[...slug]/page.tsx index 5f1f081..c588402 100644 --- a/src/app/at/[...slug]/page.tsx +++ b/src/app/at/[...slug]/page.tsx @@ -39,9 +39,12 @@ export default function AtUriRedirect() { // Reconstruct the path without the at:// prefix const cleanPath = nonEmptySegments.map(segment => encodeURIComponent(segment)).join('/'); - - // Redirect to the canonical /profile/ route - router.replace(`/profile/${cleanPath}`); + + // Pasted AT URIs land on the explorer — that's the technical view + // most people poking around a raw at:// want. The universal-link + // page lives at /profile/ and is reachable from the explorer's + // copy row. + router.replace(`/explore/${cleanPath}`); }, [slug, router]); // Show minimal loading state during redirect diff --git a/src/app/at:[...slug]/page.tsx b/src/app/at:[...slug]/page.tsx index a2cb307..5a9ad44 100644 --- a/src/app/at:[...slug]/page.tsx +++ b/src/app/at:[...slug]/page.tsx @@ -37,9 +37,9 @@ export default function AtUriSingleSlashRedirect() { // Reconstruct the path without the at:/ prefix const cleanPath = nonEmptySegments.map(segment => encodeURIComponent(segment)).join('/'); - - // Redirect to the canonical /profile/ route - router.replace(`/profile/${cleanPath}`); + + // Pasted AT URIs land on the explorer — see /at/[...slug]/page.tsx. + router.replace(`/explore/${cleanPath}`); }, [slug, router]); // Show minimal loading state during redirect diff --git a/src/components/RecordPreview.tsx b/src/components/RecordPreview.tsx index 359a853..7e173e8 100644 --- a/src/components/RecordPreview.tsx +++ b/src/components/RecordPreview.tsx @@ -69,73 +69,77 @@ export default function RecordPreview({ }} className="card record-preview-card" > - {/* Header: URI Structure */} -
- {/* AT URI Path */} + {/* Header: URI Structure. Suppressed inside the explorer, where the + breadcrumb already shows the at:// segments and the collection + chip — repeating them here is the redundancy this prop targets. */} + {!hideExplorerCtas && (
- at:// - { - e.currentTarget.style.opacity = '0.7'; - }} - onMouseLeave={(e) => { - e.currentTarget.style.opacity = '1'; - }} - > - {handle} - - / - {collection} - / - {rkey} -
- - {/* Record Type Badge */} -
+ {/* AT URI Path */}
- {displayType} + at:// + { + e.currentTarget.style.opacity = '0.7'; + }} + onMouseLeave={(e) => { + e.currentTarget.style.opacity = '1'; + }} + > + {handle} + + / + {collection} + / + {rkey}
- {formattedDate && ( -
- {formattedDate} + + {/* Record Type Badge */} +
+
+ {displayType}
- )} + {formattedDate && ( +
+ {formattedDate} +
+ )} +
-
+ )} {/* Preview Fields - Simplified */}
@@ -226,12 +230,14 @@ export default function RecordPreview({ {/* Quick action: grab the raw record JSON without leaving the universal link page. Sits beneath the primary CTA as a - quieter secondary affordance. */} - + quieter secondary affordance. Hidden inside the explorer — + the consolidated copy row already covers JSON. */} + {!hideExplorerCtas && }
- {/* Footer: CID */} - {cid && ( + {/* Footer: CID. Suppressed inside the explorer (CID is in the + copy row + the raw JSON below). */} + {cid && !hideExplorerCtas && (
//` still works as a fallback route but + // shareable copies should point at the canonical one. + const aturiUniversalPath = `/profile/${identity.handle || identity.did}/${collection}/${encodeURIComponent(decodedRkey)}`; + const universalLinkFull = `https://aturi.to${aturiUniversalPath}`; return (
@@ -103,9 +106,6 @@ export default function RecordExplorer({ repo, collection, rkey }: Props) { pds={identity.pds} collection={collection} rkey={decodedRkey} - // Universal link for the record — shareable into any compatible - // Atmosphere client via the WaypointPicker on aturi.to. - shareUrl={`/${identity.handle || identity.did}/${collection}/${encodeURIComponent(decodedRkey)}`} /> @@ -130,87 +130,73 @@ export default function RecordExplorer({ repo, collection, rkey }: Props) { )} + {/* Consolidated copy row. URI elements live in the breadcrumb above, + so we don't repeat them as a value-display grid — every identifier + is one tap away as a copy button instead. */} - + - -
- - Universal link - - - {canEdit && !editing && ( - - )} - {canEdit && editing && ( - - )} - {record && ( - - )} -
-
+ {!editing && ( + + )} + {editing && ( + + )} +
+ + )} {editing && canEdit && agent && ( - - {cid && } - - -
- ); -} - -function MetaCell({ - label, - value, - copyLabel, -}: { - label: string; - value: string; - copyLabel: string; -}) { - return ( -
-
- {label} -
-
- - {value} - - -
+ Copy + + + + {cid && } + + + {recordJson && ( + + )}
); }