275 Commits
Author SHA1 Message Date
jake 3baffbbd29 fix: add cacheLife("max") to build-time cached functions and clarify throw-vs-catch caching rule
- Add `cacheLife("max")` to `getLocalImage` (OG image) and `getStaticRoutes` (sitemap) so entries are held as long as possible during prerender instead of expiring at the default TTL
- Update AGENTS.md to distinguish build-time reads (catch inside the cached function, return a fallback, use a short `cacheLife` on the error path) from request-time reads (may throw from the cached function since they never run during prerender)
- Expand the `getCachedComments` comment to explain why throwing is only safe there: a throw inside `"use cache"` during prerender fails the build even if the caller catches it
2026-10-03 09:55:33 -04:00
jake d3b2d07de7 refactor: use "use cache: remote" for request-time reads and updateTag/refresh for mutations
- Replace `"use cache"` with `"use cache: remote"` on functions that run inside dynamic holes (`getContributions`, `getRepos`, `getPostStats`, `getCachedComments`) so entries are shared across server instances
- Switch comment and view server actions from `revalidatePath`/`revalidateTag` to `updateTag` + `refresh` for read-your-writes invalidation
- Extract a `commentsTag(pageSlug)` helper so each page's comment cache is expired independently instead of blowing the whole "comments" tag
- Refactor `getComments` to delegate to a cached inner function that throws on failure (so errors are never cached); `getCommentCount` now reuses that cache entry instead of issuing a separate COUNT query
- Drop `lib/data/views.ts` (`getAllViewCounts`) — the `/api/hits` route now calls `getPostStats()` instead
- Remove `revalidateTag("views")` from `incrementViews`; view counts in `getPostStats` are allowed to lag by a cache TTL
- Remove the `Suspense`/`Skeleton` wrapper on the projects page since `getContributions` is now a remote-cached call
2026-10-03 09:50:06 -04:00
jake d6bd6a4702 refactor: simplify comment form state, auth client exports, and feed builder
- Replace CommentFormContext/Provider with a plain `useCommentFormState` hook; the context abstraction was unused outside the file
- Narrow auth-client exports to only `signIn`; `authClient` and `useSession` are no longer exported
- Add `getPosts()` as a canonical sorted-posts helper and use it in `getFrontMatter` and `buildFeed`, removing the redundant sort in the latter
- Drop JSON feed support from `createFeedHandler` since no JSON feed route exists
- Rewrite `FrontMatter` as a `Pick` over the content-collections `Post` type to stay in sync automatically
2026-10-03 09:21:59 -04:00
jakeandClaude Sonnet 5.5 6527c7081c perf: fetch session and comments in parallel, pass current user to comment components instead of useSession
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-03 08:48:15 -04:00
jakeandClaude Sonnet 5.5 6d255ce822 refactor: move read queries into server-only lib/data and render post stats on the server
Reads no longer live in "use server" files (which made them public
endpoints). /notes stats come from one cached query pair rendered on the
server; the post page comment count streams in as a dynamic hole.
revalidateTag("views"/"comments") now invalidates the cached stats.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-03 08:40:14 -04:00
jakeandClaude Sonnet 5.5 bd18c6d553 fix: validate server action inputs for views and comments
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-03 08:33:57 -04:00
jakeandClaude Sonnet 5.5 ae2ab88988 fix: disable better-auth update-user endpoint
Names and avatars come from GitHub at sign-up; prevent signed-in users
from renaming themselves to impersonate other commenters.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-03 08:19:41 -04:00
jake f110c3aa04 refactor: centralize feed handler creation, use typed route props 2026-10-01 18:14:25 -04:00
jake 3e3e9a04a3 feat: add @better-auth/infra dash plugin 2026-09-26 14:03:02 -04:00
jake a9859215f2 refactor: replace class-variance-authority with cva, centralize in lib/utils 2026-09-26 13:37:40 -04:00
jake ed62c0cd6e feat: change main font to Schibsted Grotesk, adjust sizes 2026-09-26 13:17:25 -04:00
jake 2403842f39 fix: address react-doctor violations 2026-09-26 12:54:00 -04:00
jake 82eedf02bb chore: bump deps 2026-09-26 12:47:29 -04:00
jake 9b19f9eb39 fix: make sitemap.xml prerenderable 2026-08-16 18:04:40 -04:00
jake 38a00cf203 chore: next 16.3, drizzle v1, other cleanup (#2620) 2026-08-16 16:17:10 -04:00
jake b6cf79ff12 refactor: integrate content-collections for notes (#2609) 2026-06-30 16:29:50 -04:00
jakeandClaude Opus 4.6 e59aee63c5 fix: load OG image fonts from @fontsource/inter instead of Google Fonts
Vercel's build infra was intermittently hitting ETIMEDOUT against
fonts.googleapis.com, causing OG image generation errors during
prerender. Ship the Inter .woff files with the function via
outputFileTracingIncludes so the build is network-free. Also add
turbopackIgnore hints on process.cwd() calls to silence an NFT warning
that was over-tracing next.config.ts into the route bundle.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-08 15:44:40 -04:00
jake 5a3c7b9613 refactor: redesign home page, remove old video pages, migrate to @tailwindcss/typography
- Replace root page with new (home) route featuring a project showcase (Domainstack, Sofa, Versioneer, Snoozle)
- Remove /birthday and /hillary video pages
- Replace custom hand-rolled .prose styles with @tailwindcss/typography via a .markdown utility class
- Remove heading-anchor component and .nvmrc
2026-04-08 15:00:49 -04:00
jake 5a1636baa3 refactor: migrate from Biome to oxlint/oxfmt, remove contact form
- Replace Biome with oxlint + oxfmt (OXC toolchain) for linting and formatting
- Add .oxlintrc.json and .oxfmtrc.json configuration files
- Update VS Code settings and devcontainer to use oxc-vscode extension
- Remove contact form, Resend email integration, and related server action/schema
- Remove unused UI components (accordion, alert, card, tabs, toggle, etc.)
2026-04-05 19:45:18 -04:00
jakeandClaude Opus 4.6 6f86fd1ca9 refactor: remove @t3-oss/env-nextjs, use process.env directly
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-19 14:12:42 -05:00
jake c30197ccc5 refactor: eslint/prettier ➡️ biome 2026-02-19 14:02:03 -05:00
jake 4858c8928c refactor: update font imports and variables
- Replaced GeistSans and GeistMono with Inter and JetBrainsMono in globals.css and layout.tsx.
- Updated font variable names to reflect the new font choices in fonts.ts.
2026-02-19 13:36:13 -05:00
jakeandClaude Opus 4.5 bcc595e141 refactor: migrate contact form to TanStack Form
- Replace manual state management with @tanstack/react-form
- Add proper Field/FieldLabel components for accessibility
- Simplify server action (remove useActionState signature)
- Remove use-debounce dependency
- Update PGP key links and minor styling tweaks

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-29 22:08:54 -05:00
jake 9afe8abfed fix: image comparison component weirdness 2026-01-28 17:11:28 -05:00
jake 9d8e775fcd chore: update shadcn primitives 2026-01-28 13:56:39 -05:00
jake 5fc9efb181 fix: don't pre-render view and comment count components
- Introduced a new PostStats component to handle view and comment counts, replacing the previous async implementation with a client-side approach.
- Updated CommentCount component to use client-side state management for fetching comment counts.
- Removed unnecessary caching logic from view and comment fetching functions.
- Simplified date formatting by moving it inline, enhancing performance and readability.
2026-01-28 13:35:16 -05:00
jake 0d6e489cc8 refactor: neon -> planetscale 2026-01-28 12:26:17 -05:00
jake 8a09aa918c chore: Next.js 15 → 16 (#2503) 2025-11-22 17:11:42 -05:00
jake 2fa9b73f8d Enhance notes page with comment counts and display. Update data fetching to include comment counts alongside views, and integrate comment count badges in both the notes listing and individual post pages. 2025-09-07 16:26:45 -04:00
jake f4fd80f20a Add BotID verification in comment creation to enhance security. Update instrumentation-client to include new notes route for POST requests. 2025-09-03 11:13:32 -04:00
jake a3f05dc7d8 Refactor bot detection logic in contact form to improve error handling. Log verification failures and throw errors for better debugging. 2025-09-03 11:05:24 -04:00
jake b06e7bbf4d Refactor contact form validation to use useDebounce for improved performance and streamline error handling. Simplify error retrieval logic and ensure touched state is updated on input changes. 2025-09-02 19:10:56 -04:00
jake 6a0ff897da Enhance contact form with client-side validation and error handling. Import validation schema from shared module and improve user experience by tracking input touch state for error display. 2025-09-02 18:39:54 -04:00
jake ab6b188a99 Remove Cloudflare Turnstile integration and replace it with Vercel's BotID for spam protection in the contact form. Update environment variables and dependencies accordingly. 2025-08-28 18:08:05 -04:00
jake 06ac28df1f bump some deps 2025-06-09 22:02:27 -04:00
jake f8974e9a92 fixing header icons (once again) 2025-05-22 10:50:46 -04:00
jake 9933d20868 complete giscus migration 2025-05-22 09:05:22 -04:00
jake 1996ad6c10 fix more icons 2025-05-20 16:55:28 -04:00
jake f4c69292df do react types more better too 🧠 2025-05-19 17:58:03 -04:00
jake a9d83768ca re-enable comments on non-post pages 2025-05-18 14:38:10 -04:00
jake cb5934647f revert back to zod 2025-05-17 20:43:15 -04:00
jake 360d0fda1b fix oauth scopes 2025-05-14 22:20:03 -04:00
jake b196249f25 homebrew comments system 2025-05-14 09:49:55 -04:00
jake afcced7707 publish tailwind post with new image diff component 2025-05-08 15:14:37 -04:00
jake fff705f1e8 add language indicator to code blocks 2025-05-07 20:01:12 -04:00
jake 0df56d127a save a redis query when fetching all view counts 2025-05-06 20:24:55 -04:00
jake a08ec532b3 add .github/copilot-instructions.md file
https://docs.github.com/en/copilot/customizing-copilot/adding-repository-custom-instructions-for-github-copilot
2025-05-06 19:07:23 -04:00
jake bea2a55f77 display each post's view count in list 2025-05-06 15:26:24 -04:00
jake 62e95e3cfe some more arguably unnecessary refactoring 2025-05-05 22:24:25 -04:00
jake 27e6ca2a4b minor style tweaks 2025-05-05 12:55:12 -04:00