From 0cf89627b5de4ed0212430d0dda3a163ea04d64b Mon Sep 17 00:00:00 2001 From: Claude Date: Sun, 24 May 2026 01:39:27 +0000 Subject: [PATCH] Add Aturi Explore waypoint and link records into it from universal pages MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Two pieces: * New aturiExplore entry in the waypoints catalog (category: devTools, no redirectCompat — it's a record explorer, not for auto-redirect). Routes to /explore/{did-or-handle}/{collection}/{rkey}, prefers DID when one is available so shared links survive handle changes. Picks up a dedicated Telescope-style icon that matches the Lucide Telescope used in the explore nav link. Surfaces in both the web site's WaypointPicker AND the browser extension popup. * RecordPreview (the generic record card on /profile/// ) gets a quiet inline "Open in Explorer" link beneath the existing "View Full Record" JSON-modal button. Keeps the universal link page's curated layout while giving a one-click jump into the explorer's richer view (backlinks, identity, audit log, editor). Profile-level cross-link already shipped in the first round (ProfilePreview's "View raw repo in the explorer →" footer). --- src/components/RecordPreview.tsx | 30 +++++++++++++++++++++++++++++- src/utils/waypointIcons.tsx | 26 ++++++++++++++++++++++++++ src/utils/waypoints.data.ts | 25 +++++++++++++++++++++++++ 3 files changed, 80 insertions(+), 1 deletion(-) diff --git a/src/components/RecordPreview.tsx b/src/components/RecordPreview.tsx index a10052e..8fc38b4 100644 --- a/src/components/RecordPreview.tsx +++ b/src/components/RecordPreview.tsx @@ -6,9 +6,11 @@ 'use client'; import { useState } from 'react'; +import Link from 'next/link'; import { GenericRecord } from '@/utils/recordFetcher'; import { sanitizeHandle } from '@/utils/sanitize'; -import { X } from 'lucide-react'; +import { Telescope, X } from 'lucide-react'; +import { encodeRepo } from '@/utils/atproto/urls'; type RecordPreviewProps = { record: GenericRecord; @@ -211,6 +213,32 @@ export default function RecordPreview({ record, collection, handle, rkey }: Reco ? `View Full Record (${allFields.length} fields)` : 'View Full Record'} + + {/* Cross-product: jump into the same record inside the explorer */} + { + e.currentTarget.style.color = 'var(--text-accent)'; + }} + onMouseLeave={(e) => { + e.currentTarget.style.color = 'var(--text-tertiary)'; + }} + > + + Open in Explorer — backlinks, identity, raw JSON → + {/* Footer: CID */} diff --git a/src/utils/waypointIcons.tsx b/src/utils/waypointIcons.tsx index 2045f2a..bb9f569 100644 --- a/src/utils/waypointIcons.tsx +++ b/src/utils/waypointIcons.tsx @@ -179,6 +179,31 @@ export const AturiSVG = () => ( ); +// Lucide-style telescope, matching the icon used in the explore nav link +// and the explorer landing page. Keeps the new Aturi Explore waypoint +// visually distinct from the standard Aturi (leaf) entry. +export const AturiExploreSVG = () => ( + + + + + + + + + +); + export const BluepySVG = () => ( ( export const WAYPOINT_ICONS: Record = { aturi: , + aturiExplore: , anisota: , bluesky: , bluepy: , diff --git a/src/utils/waypoints.data.ts b/src/utils/waypoints.data.ts index f78a195..5f3fe5b 100644 --- a/src/utils/waypoints.data.ts +++ b/src/utils/waypoints.data.ts @@ -306,6 +306,30 @@ export const WAYPOINT_DESTINATIONS_DATA: Record = { redirectCompat: [], }, + aturiExplore: { + id: 'aturiExplore', + name: 'Aturi Explore', + description: (collection) => { + if (collection) return 'Inspect record on aturi.to/explore'; + return 'Browse repo on aturi.to/explore'; + }, + getUrl: (handle, collection, rkey, did) => { + // The explorer keys URLs by DID when available so handle changes don't + // break shared links. Falls back to the handle when no DID was passed. + const identifier = did || handle; + if (collection && rkey) { + return `https://aturi.to/explore/${identifier}/${collection}/${encodeURIComponent(rkey)}`; + } + if (collection) { + return `https://aturi.to/explore/${identifier}/${collection}`; + } + return `https://aturi.to/explore/${identifier}`; + }, + supportedTypes: ['post', 'profile', 'list', 'record'], + category: 'devTools', + redirectCompat: [], + }, + atptools: { id: 'atptools', name: 'atp.tools', @@ -647,6 +671,7 @@ export const WAYPOINT_ORDER = [ 'pckt', 'pdsls', 'anisotaExplorer', + 'aturiExplore', 'tangled', 'atptools', 'witchsky', -- 2.51.2