Skip to content

Instantly share code, notes, and snippets.

@matthew-gerstman
matthew-gerstman / melodic-baking-deer.md
Created February 9, 2026 01:03
Plan: Project-Specific E2E Browser Testing with agent-browser

Plan: Project-Specific E2E Browser Testing with agent-browser

Summary

Create a single project-level slash command .claude/commands/test-e2e.md that uses agent-browser CLI to intelligently test dashboard pages affected by the current PR/branch. It auto-starts the dev server if needed, authenticates as the test user, maps changed files to routes, and tests each affected page.

Commits

  1. feat: add /test-e2e command for agent-browser E2E testing
@matthew-gerstman
matthew-gerstman / gist:cf144f40f9c2e49c1296ae2766c9c81b
Created February 9, 2026 00:50
E2E Shard 2/4 flaky failure: drizzle v1 'decoder' bug in grant-feature-flag.ts
# E2E Shard 2/4 Flaky Failure: Drizzle v1 "decoder" Bug
## Problem
E2E Shard 2/4 fails intermittently across multiple PRs (confirmed on #6498 and #6548).
The root cause is the drizzle-orm v1 (beta.15) "decoder" bug affecting E2E setup scripts.
## Error
```
❌ Failed to grant feature flag: Unknown relational filter field: "decoder"
❌ Failed to set user context: Unknown relational filter field: "decoder"
@matthew-gerstman
matthew-gerstman / clever-whistling-lampson.md
Created February 8, 2026 16:07
Native Connectors: 4-PR Implementation Plan (OAuth framework + task management + Todoist + Unified task providers)

Native Connectors: 4-PR Implementation Plan

Overview

Add support for first-party connectors that bypass Unified.to, starting with a generic OAuth framework, then a provider-agnostic task management tool, then Todoist as the first native provider, and finally wiring Jira/Asana/etc through Unified.to's existing task API.

Each PR builds on the previous one. Each section contains enough context for an independent agent session to implement it.


@matthew-gerstman
matthew-gerstman / functional-forging-badger.md
Last active February 8, 2026 16:06
Plan: User-Scoped Floating Credits

Plan: User-Scoped Floating Credits

Product Decisions

These decisions were made during planning. Revisit if any feel wrong.

  1. Credit source is per-workspace, user's choice — Each user picks "workspace credits" or "personal credits" per workspace. This is a toggle on their membership, not a global setting.

  2. No fallback between sources — If a user picks "personal credits" and runs out, they get blocked (CREDITS_EXHAUSTED). They must buy more or switch back to workspace credits. No silent fallback.

@matthew-gerstman
matthew-gerstman / phase3-rqb-v2-migration.md
Last active February 8, 2026 01:35
Phase 3: Migrate Relational Queries from Drizzle RQB v1 → v2

Phase 3: Migrate Relational Queries from RQB v1 → v2

Context

After Phases 0-2, the codebase is on drizzle-orm@1.0.0-beta.15-859cf75 with:

  • db.query → v2 relational query API (new syntax)
  • db._query → v1 compat shim (old syntax, currently used by all 54 files)

Phase 3 migrates each file from db._query (v1) → db.query (v2), batch by batch.

@matthew-gerstman
matthew-gerstman / arbitrary-skus-architecture.md
Created February 8, 2026 00:15
Arbitrary SKUs: Architecture Changes for Enterprise Deals & Employee Plans

Arbitrary SKUs: Architecture Changes

Problem

Plans are hardcoded as a TypeScript union type and a static PLAN_METADATA object. Adding a new plan requires a code change and deploy. We need to support:

  1. Enterprise deals — custom plan per customer (custom credits, custom price, custom features)
  2. Employee accounts — free team plan with unlimited credits, no Stripe subscription
  3. Future — any one-off SKU without touching application code
@matthew-gerstman
matthew-gerstman / gist:d70fefe003d3db47e01c262d019ba0df
Created February 6, 2026 15:02
OBV-1846: Message pagination implementation plan for threads with >200 messages
# OBV-1846: Message Pagination — Remaining Work
## Problem
Threads with >200 messages have older messages permanently inaccessible.
Mirror hydration loads 200 messages per thread. There is no UI to load more.
## Architecture
### Current data flow
1. **Hydration** (`/hydrate/project/:scopeId`) loads 200 most recent messages per thread
@matthew-gerstman
matthew-gerstman / remaining-workbook-refactoring.md
Created February 6, 2026 14:37
Workbook Architecture Refactoring — Remaining Work (Steps 5-7)

Workbook Architecture Refactoring — Remaining Work

Completed in PR #6396: Steps 1–4 (WorkbookSessionContext, useSimpleWorkbookData decomposition, ColumnOperationsShared, orchestrator extraction).

Step 5: Rename & Reorganize (Low Priority — Cosmetic)

Rename simple-workbook-table/workbook-table/ and reorganize hooks into subdirectories.

Why deferred: Touches 29+ files for mechanical import renaming. High conflict risk, no behavioral change. Best done during a quiet period with no other active workbook PRs.

@matthew-gerstman
matthew-gerstman / iridescent-percolating-balloon.md
Last active February 6, 2026 14:30
Workspace-Scoped Chat: Backend Architecture Plan

Workspace-Scoped Chat: Backend Architecture Plan

Goal

Add workspace-scoped chat as a new capability alongside the existing project-scoped chat. This is purely additive -- project chat continues to work exactly as it does today. Workspace chat introduces a general-purpose assistant that operates without a fixed project context.

Two Chat Scopes

Project Chat (existing) Workspace Chat (new)
@matthew-gerstman
matthew-gerstman / gist:eafdcd797c176547b70f4af57b6550a2
Created January 18, 2026 19:30
Mirror Convenience Hooks Proposal
# Mirror Convenience Hooks Proposal
## Overview
This proposal introduces three convenience hooks to reduce unnecessary re-renders and improve developer experience when working with Mirror data. These hooks cover the most common patterns found in the codebase that currently cause suboptimal re-render behavior.
**Current state:**
- `useMirrorList` and `useGlobalMirrorList` now use derived atoms with shallow array equality ✅
- Selector hooks (PR #3754) were reverted due to complexity concerns ❌