From 67bc8468550d81085fe3d1b380f8355ef18fbda0 Mon Sep 17 00:00:00 2001 From: Shahid Raza Date: Fri, 17 Jul 2026 15:43:02 +0530 Subject: [PATCH] feat(threads): deepen Claude routines thread, add reading enhancements Thread: - Much deeper, more practical: routine anatomy, a gallery of real routines (CI triage, dependency digest, stale sweep, on-call handoff, docs freshness) with schedules and prompts, idempotency patterns, a cron syntax refresher, and an observability section. - Adds the companion YouTube link and a `claude` tag (tags are derived from frontmatter, so it becomes a filter automatically). Reusable components (all wired into MDX): - `annotate.tsx`: hand-drawn pen marks (Underline/Circle/Box/Strike/Highlight) that draw themselves on scroll, gated behind prefers-reduced-motion. Soft candy colours (blue/violet/lime/sun), no red. - `table-of-contents.tsx`: sticky "On this page" right rail with scroll-spy. - `cron-diagram.tsx`: styled cron field breakdown, replacing brittle ASCII art. - `code-block.tsx`: copy-to-clipboard button on thread code blocks. Co-Authored-By: Claude Opus 4.8 --- src/app/threads/[slug]/page.tsx | 9 + src/components/annotate.tsx | 189 ++++++++++++++ src/components/code-block.tsx | 46 ++++ src/components/cron-diagram.tsx | 64 +++++ src/components/table-of-contents.tsx | 96 +++++++ .../threads/claude-routines-and-cron.mdx | 241 ++++++++++++++---- src/mdx-components.tsx | 13 + 7 files changed, 602 insertions(+), 56 deletions(-) create mode 100644 src/components/annotate.tsx create mode 100644 src/components/code-block.tsx create mode 100644 src/components/cron-diagram.tsx create mode 100644 src/components/table-of-contents.tsx diff --git a/src/app/threads/[slug]/page.tsx b/src/app/threads/[slug]/page.tsx index d635851..8d61496 100644 --- a/src/app/threads/[slug]/page.tsx +++ b/src/app/threads/[slug]/page.tsx @@ -11,6 +11,7 @@ import { threadCovers } from "@/lib/thread-covers"; import { Photo } from "@/components/photo"; import { Header } from "@/components/header"; import { Footer } from "@/components/footer"; +import { TableOfContents } from "@/components/table-of-contents"; type Params = { slug: string }; @@ -67,6 +68,7 @@ export default async function ThreadPage({
+
+ + +