From e3576fcfec9c2db663b9abe0831b8e78a21c7536 Mon Sep 17 00:00:00 2001 From: SkateSpots Date: Mon, 5 Oct 2026 12:53:13 +0700 Subject: [PATCH] Freeze/hide the Deck designer (not ready for regular users) - Remove the deckDesigner card from the DIY hub, so it is not listed publicly. - Gate /diy/deck-designer to platform admins: DeckDesignerPage redirects to /diy for everyone else and shows an "Internal preview" badge to admins. Code and i18n keys are kept. To un-freeze, remove the Navigate guard and re-add the card in diyGuides.ts (both noted in comments and AGENTS.md). --- AGENTS.md | 11 +++++++++-- src/lib/diyGuides.ts | 10 ++-------- src/pages/DeckDesignerPage.tsx | 19 +++++++++++++++++-- 3 files changed, 28 insertions(+), 12 deletions(-) diff --git a/AGENTS.md b/AGENTS.md index 40ad329..a4afd86 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -914,8 +914,15 @@ session with **no other memory of this project**. So: parse/escape so commas in names are safe. Next: write our own step-by-step guides (NIP-23 `30023` with `t=diy`) to flip the coming-soon cards live. -- **Deck designer — parametric 2D outline + 1:1 template (`/diy/deck-designer`, - 2026-10-05):** `src/lib/deckDesign.ts` (pure maths) + `components/DeckDesigner.tsx` +- **Deck designer — FROZEN / HIDDEN (2026-10-05):** ⚠️ **Not ready for regular + users.** It is **not listed in the DIY hub** (`diyGuides.ts` has a note where + the card was) and `/diy/deck-designer` is **admin-gated** — `DeckDesignerPage` + returns `` unless `isAdminPubkey(user.pubkey)`, and shows an + "Internal preview" badge. To un-freeze: remove the guard in + `DeckDesignerPage.tsx` **and** re-add the `deckDesigner` card in + `diyGuides.ts`. The i18n keys (`diyUi.cards.deckDesigner.*`, `diyUi.designer.*`) + are kept. The code below is otherwise intact. + Parametric 2D outline + 1:1 template (`src/lib/deckDesign.ts` (pure maths) + `components/DeckDesigner.tsx` + page. Inputs: width, wheelbase, nose, tail (length is **derived** as nose+wheelbase+tail), waist, end-roundness, concave, thickness, tail/nose kick, and the **truck-hole pattern** — **New school 53.975 × 41.275 mm (2.125″×1.625″)** diff --git a/src/lib/diyGuides.ts b/src/lib/diyGuides.ts index bf78f38..0d23438 100644 --- a/src/lib/diyGuides.ts +++ b/src/lib/diyGuides.ts @@ -65,14 +65,8 @@ export const DIY_CARDS: DiyCard[] = [ blurbKey: 'diyUi.cards.deckCost.blurb', to: '/diy/deck-cost', }, - { - id: 'deckDesigner', - category: 'boards', - emoji: '📐', - titleKey: 'diyUi.cards.deckDesigner.title', - blurbKey: 'diyUi.cards.deckDesigner.blurb', - to: '/diy/deck-designer', - }, + // NOTE: the deck *designer* (`/diy/deck-designer`) is intentionally NOT listed + // here — it is frozen/hidden and admin-gated until it is ready. See DeckDesignerPage. // ── Ramps & wooden obstacles ───────────────────────────────────────────── { diff --git a/src/pages/DeckDesignerPage.tsx b/src/pages/DeckDesignerPage.tsx index 439e366..3f7566a 100644 --- a/src/pages/DeckDesignerPage.tsx +++ b/src/pages/DeckDesignerPage.tsx @@ -1,18 +1,30 @@ import { useSeoMeta } from '@unhead/react'; -import { Link } from 'react-router-dom'; +import { Link, Navigate } from 'react-router-dom'; import { ArrowLeft, Ruler } from 'lucide-react'; import { useTranslation } from '@/contexts/language'; +import { useCurrentUser } from '@/hooks/useCurrentUser'; +import { isAdminPubkey } from '@/lib/admins'; import { DeckDesigner } from '@/components/DeckDesigner'; -/** DIY tool page — the parametric 2D deck designer / 1:1 template. */ +/** + * DIY tool page — the parametric 2D deck designer / 1:1 template. + * + * FROZEN / NOT READY FOR REGULAR USERS (2026-10-05): not listed in the DIY hub + * and gated to platform admins, so the owner can keep testing it while the public + * can't reach it. Un-gate by removing the `Navigate` guard AND re-adding the + * `deckDesigner` card in `src/lib/diyGuides.ts`. + */ export default function DeckDesignerPage() { const { t } = useTranslation(); + const { user } = useCurrentUser(); useSeoMeta({ title: 'Deck Designer — SkateSpots DIY', description: 'Design a skateboard or longboard outline, then export a printable 1:1 template, SVG or DXF — concave, kicks, wheelbase and truck holes included.', }); + if (!isAdminPubkey(user?.pubkey)) return ; + return (
@@ -26,6 +38,9 @@ export default function DeckDesignerPage() { {t('diyUi.designer.title')}

{t('diyUi.designer.intro')}

+

+ Internal preview · not public yet +