Why My Custom Tailwind Class Kept Losing (And the One-Word Fix That Saved It)
if your custom Tailwind class keeps getting overridden and you can't figure out why, check whether it lives inside @layer components. If it does — and
A lab notebook: what I'm learning while building with AI, written as I go.
if your custom Tailwind class keeps getting overridden and you can't figure out why, check whether it lives inside @layer components. If it does — and
If you have a work queue feeding a slow, expensive consumer, bound it with FIFO eviction. The oldest items are the most stale. An unbounded queue th
PostgREST's .not('column', 'in', '(1,2,3)') builds a raw filter string — you own the sanitization. One .map(Number).filter() call per call site
what we were building
If your open-redirect guard is a string heuristic, it's probably bypassable. Use new URL() and compare origins instead. One-liner → five lines. Bu
'unsafe-eval' in your script-src doesn't weaken your CSP — it effectively disables it. It had been sitting there since I first wired up the secu
If your server action succeeds but the UI reverts anyway — it's not a broken save. React 19 is resetting your uncontrolled input after revalidation.
The official Intuit QuickBooks Online MCP server (the Node/TypeScript one, intuit/quickbooks-online-mcp-server) had two silent bugs in its search
Don't put loading='lazy' on your LCP element. Lazy-load everything below it, and serve the hero/LCP image via your CDN's transform API — pre-siz
If you own the source of truth on one side and just mirror it, you can't have a consistency race. You only get races where both sides try to own t
The Swift type-checker timed out on a fat SwiftUI view body. Extracting one section into its own subview fixed it instantly — and it was the right call
CMS rich-text fields store content with HTML tags and entity codes. Strip the tags, and the entities survive — literally. You need two passes. Always.
Wire your iOS save to focus-loss — onChange(of: focusedField) — not onSubmit. Mobile users tap away. They don't press Return.
An app-layer auth gate doesn't protect you when the auto-generated REST API accepts any valid Google JWT. Lock the OAuth door first, then gate the UI.
After creating a record, navigate straight to it. Don't drop the user back on a list and make them hunt for what they just made.
Swipe-to-delete fired instantly. One fat-thumb swipe and a real KOL contact — warmth score, notes, relationship history — would have been gone. Adding a
Storing a resource ID in the browser is not ownership. Bind every object to a secret token and verify it server-side — or anyone who guesses the ID can
If you're embedding a third-party form in a scrollable card on mobile, just make it fullscreen. Two scroll containers fighting each other never ends
Zod (a schema validation library) guards your runtime edges. Eliminating any makes TypeScript guard everything in between. You need both.
Persisting a conversationId in localStorage is easy. Securing it — so one patient can't accidentally read another's — takes one more step that's easy
The Setup
If you're writing coercion glue so data can pass your own validator, the validator is the problem.
When you create a parent row and child junction rows in separate Supabase calls, you're responsible for rolling back. PostgREST gives you no transac
If your Next.js server action does redirect(userInput) — even for something as innocent as a post-login bounce — you have an open redirect. The fix is
In Next.js, protecting a page does NOT protect the server actions behind it. Every action is its own callable endpoint. Guard each one with require
Two separate gpt-4.1-mini calls doing the exact same extraction, added weeks apart. The API processed both happily. No error. No warning. Just a b
rlsenablednopolicy looks scary. Whether it IS scary depends entirely on how your app connects to Postgres. Know your connection architecture
Retry with backoff + draft persistence are the two things you add to any chat that talks to an LLM. One handles network flakes. The other means user
Your frontend can be bypassed in 30 seconds with curl. Validate everything server-side — IDs, tokens, route params — as if the client doesn't exis
the setup