From af39f2224d169795161f02dc45d69d34b81459c4 Mon Sep 17 00:00:00 2001 From: Ani Date: Wed, 5 Aug 2026 00:02:15 +0530 Subject: [PATCH] feat(lander): mysterious ascii root with liquid cursor wake Replace the root redirect target with a full-bleed ASCII field that viscously displaces under the pointer; operator console moves to /console. Co-authored-by: Cursor --- deploy/Caddyfile | 8 ++ web/console/app/console/page.tsx | 5 + web/console/app/globals.css | 69 ++++++++++ web/console/app/layout.tsx | 4 +- web/console/app/page.tsx | 10 +- web/console/app/sitemap.ts | 10 +- web/console/components/AsciiLander.tsx | 178 +++++++++++++++++++++++++ 7 files changed, 275 insertions(+), 9 deletions(-) create mode 100644 web/console/app/console/page.tsx create mode 100644 web/console/components/AsciiLander.tsx diff --git a/deploy/Caddyfile b/deploy/Caddyfile index c67724b..2d80b8a 100644 --- a/deploy/Caddyfile +++ b/deploy/Caddyfile @@ -7,10 +7,18 @@ reverse_proxy console:3000 } + handle /console* { + reverse_proxy console:3000 + } + handle /_next* { reverse_proxy console:3000 } + handle / { + reverse_proxy console:3000 + } + handle_path /internal-console* { reverse_proxy console:3000 } diff --git a/web/console/app/console/page.tsx b/web/console/app/console/page.tsx new file mode 100644 index 0000000..1d94de9 --- /dev/null +++ b/web/console/app/console/page.tsx @@ -0,0 +1,5 @@ +import { ConsoleApp } from "../../components/ConsoleApp"; + +export default function ConsolePage() { + return ; +} diff --git a/web/console/app/globals.css b/web/console/app/globals.css index 28c1257..7e01895 100644 --- a/web/console/app/globals.css +++ b/web/console/app/globals.css @@ -259,6 +259,75 @@ body:has(.public-page) { color: #111111; } +/* --------------------------------------------------------------------------- + Root ASCII lander — full-bleed, monospace, cursor-liquid. + --------------------------------------------------------------------------- */ + +body:has(.ascii-lander) { + background: #070708; + color: #ececf0; + margin: 0; + overflow: hidden; +} + +.ascii-lander { + position: relative; + width: 100vw; + height: 100vh; + height: 100dvh; + overflow: hidden; + background: #070708; + color-scheme: dark; + cursor: crosshair; +} + +.ascii-lander-canvas { + display: block; + width: 100%; + height: 100%; + touch-action: none; +} + +.ascii-lander-brand { + position: absolute; + width: 1px; + height: 1px; + padding: 0; + margin: -1px; + overflow: hidden; + clip: rect(0, 0, 0, 0); + white-space: nowrap; + border: 0; +} + +.ascii-lander-enter { + position: absolute; + left: 50%; + bottom: max(28px, env(safe-area-inset-bottom)); + transform: translateX(-50%); + font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; + font-size: 12px; + letter-spacing: 0.28em; + text-transform: lowercase; + text-decoration: none; + color: rgba(236, 236, 240, 0.28); + transition: color 180ms ease-out, letter-spacing 220ms ease-out; + z-index: 2; +} + +.ascii-lander-enter:hover, +.ascii-lander-enter:focus-visible { + color: rgba(236, 236, 240, 0.82); + letter-spacing: 0.4em; + outline: none; +} + +@media (prefers-reduced-motion: reduce) { + .ascii-lander-enter { + transition: none; + } +} + .public-page { --pub-bg: #ffffff; --pub-bg-alt: #fafafa; diff --git a/web/console/app/layout.tsx b/web/console/app/layout.tsx index 143d2cb..167b422 100644 --- a/web/console/app/layout.tsx +++ b/web/console/app/layout.tsx @@ -7,10 +7,10 @@ const siteUrl = "https://thirdshift.ani.computer"; export const metadata: Metadata = { metadataBase: new URL(siteUrl), title: { - default: "Thirdshift Console", + default: "Thirdshift", template: "%s · Thirdshift" }, - description: "Thirdshift alpha operator console and public network status", + description: "Limitless AI in an AI-less world.", verification: { google: process.env.NEXT_PUBLIC_GOOGLE_SITE_VERIFICATION || undefined } diff --git a/web/console/app/page.tsx b/web/console/app/page.tsx index ee62c36..355c4b9 100644 --- a/web/console/app/page.tsx +++ b/web/console/app/page.tsx @@ -1,5 +1,11 @@ -import { ConsoleApp } from "../components/ConsoleApp"; +import type { Metadata } from "next"; +import { AsciiLander } from "../components/AsciiLander"; + +export const metadata: Metadata = { + title: "Thirdshift", + description: "Limitless AI in an AI-less world." +}; export default function Page() { - return ; + return ; } diff --git a/web/console/app/sitemap.ts b/web/console/app/sitemap.ts index ae2a2e3..205fadf 100644 --- a/web/console/app/sitemap.ts +++ b/web/console/app/sitemap.ts @@ -5,16 +5,16 @@ const siteUrl = "https://thirdshift.ani.computer"; export default function sitemap(): MetadataRoute.Sitemap { return [ { - url: `${siteUrl}/status`, + url: siteUrl, lastModified: new Date(), - changeFrequency: "daily", + changeFrequency: "weekly", priority: 1 }, { - url: siteUrl, + url: `${siteUrl}/status`, lastModified: new Date(), - changeFrequency: "weekly", - priority: 0.6 + changeFrequency: "daily", + priority: 0.9 } ]; } diff --git a/web/console/components/AsciiLander.tsx b/web/console/components/AsciiLander.tsx new file mode 100644 index 0000000..fbdd349 --- /dev/null +++ b/web/console/components/AsciiLander.tsx @@ -0,0 +1,178 @@ +"use client"; + +import { useEffect, useRef } from "react"; +import Link from "next/link"; + +const GLYPHS = " ··::--==++**##%%@@"; +const BRAND = "thirdshift"; + +type Pointer = { x: number; y: number; tx: number; ty: number; vx: number; vy: number }; + +/** + * Full-viewport ASCII field. The cursor leaves a viscous wake: sample points + * lag and spring back so the mesh feels liquid rather than rubbery. + */ +export function AsciiLander() { + const canvasRef = useRef(null); + const reducedMotion = useRef(false); + + useEffect(() => { + const canvas = canvasRef.current; + if (!canvas) { + return; + } + const ctx = canvas.getContext("2d"); + if (!ctx) { + return; + } + + reducedMotion.current = window.matchMedia("(prefers-reduced-motion: reduce)").matches; + + const pointer: Pointer = { + x: -9999, + y: -9999, + tx: -9999, + ty: -9999, + vx: 0, + vy: 0 + }; + let width = 0; + let height = 0; + let cols = 0; + let rows = 0; + let cellW = 0; + let cellH = 0; + let raf = 0; + let brandCol = 0; + let brandRow = 0; + let time = 0; + + function resize() { + const dpr = Math.min(window.devicePixelRatio || 1, 2); + width = window.innerWidth; + height = window.innerHeight; + canvas!.width = Math.floor(width * dpr); + canvas!.height = Math.floor(height * dpr); + canvas!.style.width = `${width}px`; + canvas!.style.height = `${height}px`; + ctx!.setTransform(dpr, 0, 0, dpr, 0, 0); + + // Slightly wide cells so the field reads as texture, not noise snow. + cellW = width < 640 ? 9 : 11; + cellH = width < 640 ? 14 : 16; + cols = Math.ceil(width / cellW) + 1; + rows = Math.ceil(height / cellH) + 1; + brandCol = Math.floor((cols - BRAND.length) / 2); + brandRow = Math.floor(rows / 2); + } + + function onMove(event: PointerEvent) { + pointer.tx = event.clientX; + pointer.ty = event.clientY; + } + + function onLeave() { + // Keep the last point so the wake settles instead of snapping off-canvas. + } + + function glyphAt(col: number, row: number, swirl: number): string { + if (row === brandRow && col >= brandCol && col < brandCol + BRAND.length) { + return BRAND[col - brandCol] ?? " "; + } + // Soft idle field + cursor-biased density. + const n = + Math.sin(col * 0.37 + row * 0.21 + time * 0.4) * 0.45 + + Math.cos(col * 0.11 - row * 0.29 + time * 0.25) * 0.35 + + swirl; + const idx = Math.max(0, Math.min(GLYPHS.length - 1, Math.floor(((n + 1) / 2) * (GLYPHS.length - 1)))); + return GLYPHS[idx] ?? " "; + } + + function frame() { + time += reducedMotion.current ? 0 : 0.016; + + // Viscous follow: pointer trails the target (liquid lag). + const ease = reducedMotion.current ? 1 : 0.085; + const prevX = pointer.x; + const prevY = pointer.y; + pointer.x += (pointer.tx - pointer.x) * ease; + pointer.y += (pointer.ty - pointer.y) * ease; + pointer.vx = pointer.x - prevX; + pointer.vy = pointer.y - prevY; + + ctx!.fillStyle = "#070708"; + ctx!.fillRect(0, 0, width, height); + ctx!.font = `${Math.floor(cellH * 0.72)}px ui-monospace, "SF Mono", Menlo, Consolas, monospace`; + ctx!.textBaseline = "middle"; + ctx!.textAlign = "center"; + + const radius = Math.min(width, height) * 0.28; + const speed = Math.min(1.6, Math.hypot(pointer.vx, pointer.vy) / 18); + + for (let row = 0; row < rows; row++) { + for (let col = 0; col < cols; col++) { + const restX = col * cellW + cellW * 0.5; + const restY = row * cellH + cellH * 0.5; + const dx = restX - pointer.x; + const dy = restY - pointer.y; + const dist = Math.hypot(dx, dy) + 0.001; + const falloff = Math.exp(-(dist * dist) / (2 * radius * radius)); + + // Liquid push: displace sample origin opposite the cursor, stretched by velocity. + const push = falloff * (18 + speed * 42); + const sx = restX - (dx / dist) * push - pointer.vx * falloff * 2.4; + const sy = restY - (dy / dist) * push - pointer.vy * falloff * 2.4; + + const sampleCol = Math.floor(sx / cellW); + const sampleRow = Math.floor(sy / cellH); + const isBrand = + row === brandRow && col >= brandCol && col < brandCol + BRAND.length; + const ch = glyphAt(sampleCol, sampleRow, falloff * (0.8 + speed)); + + // Draw at a lightly offset position so the mesh warps, not just recolors. + const drawX = restX + (sx - restX) * 0.35; + const drawY = restY + (sy - restY) * 0.35; + + if (isBrand) { + ctx!.fillStyle = `rgba(236, 236, 240, ${0.72 + falloff * 0.28})`; + } else { + const alpha = 0.14 + falloff * (0.45 + speed * 0.25); + ctx!.fillStyle = `rgba(168, 168, 176, ${Math.min(0.85, alpha)})`; + } + ctx!.fillText(ch, drawX, drawY); + } + } + + raf = window.requestAnimationFrame(frame); + } + + resize(); + if (pointer.tx < 0) { + pointer.x = width / 2; + pointer.y = height / 2; + pointer.tx = width / 2; + pointer.ty = height / 2; + } + window.addEventListener("pointermove", onMove, { passive: true }); + window.addEventListener("pointerleave", onLeave); + window.addEventListener("resize", resize); + raf = window.requestAnimationFrame(frame); + + return () => { + window.cancelAnimationFrame(raf); + window.removeEventListener("pointermove", onMove); + window.removeEventListener("pointerleave", onLeave); + window.removeEventListener("resize", resize); + }; + }, []); + + return ( +
+

thirdshift

+
+ ); +}