Skip to content

Instantly share code, notes, and snippets.

@matthew-gerstman
matthew-gerstman / iridescent-wandering-micali.md
Created February 12, 2026 01:14
Project Folders Cleanup Plan

Project Folders Cleanup Plan

Context

The project folders feature (workspace-scoped folders that organize projects) shipped as an MVP and has accumulated technical debt. The three main areas needing attention are: incomplete error handling in dashboard components, service-layer code quality issues, and gaps in test coverage. This plan covers a full cleanup pass.


Commits

@matthew-gerstman
matthew-gerstman / reflective-skipping-hollerith.md
Created February 10, 2026 23:50
Plan: Upgrade CLI to React 19 + Ink 6

Upgrade CLI to React 19 + Ink 6

Context

The CLI is isolated from the monorepo (excluded from workspaces in root package.json, has its own cli/bun.lock) solely because Ink 5 required React 18 while the dashboard uses React 19. Ink 6 now supports React 19, so the version conflict no longer exists. This upgrade unblocks agents that trip over the React 18 isolation and simplifies the monorepo setup.

Commits

  1. feat(cli): upgrade to React 19 + Ink 6
  2. refactor(cli): integrate CLI into monorepo workspaces
@matthew-gerstman
matthew-gerstman / radiant-cuddling-flurry.md
Created February 10, 2026 21:02
SSE Resilience Improvements Plan

SSE Resilience Improvements

Context

The SSE implementation is already well-architected with exponential backoff, heartbeat monitoring, event replay via lastEventId, and Redis-backed connection tracking. However, there are gaps in failure recovery paths — specifically around unbounded replay queries, silent replay failures, a heartbeat race condition, and lack of Redis subscriber health monitoring. These gaps mean that after prolonged disconnections or infrastructure hiccups, clients can end up with stale data and no way to detect or recover from it.

Improvements (ranked by impact-to-risk ratio)

1. Bound the event replay query + notify client of truncation

Problem: getRecentEventsFromDatabase() has no LIMIT clause. A reconnecting client with a stale/missing lastEventId can trigger an unbounded query returning all events for a topic. One reconnecting client can spike database load for everyone.

@matthew-gerstman
matthew-gerstman / gist:bc6feb2b3b8d5ab6f238d7f6a16d5c9f
Created February 10, 2026 16:50
SSE resilience improvements for future PRs
# SSE Resilience Improvements — Future PRs
Findings from investigating dropped agent events in PR #6692.
## 1. Event replay gap for thread status updates (HIGH)
`emitAgentStatusEvent` in `apps/api/src/agents/obvious-v2/state/events.ts` calls
`publishToProjectUsers` without a `tx` parameter, so `thread:updated` events aren't
stored for replay. If a client reconnects during an agent run, they miss status
transitions and the UI gets stuck on "thinking" or "running".
@matthew-gerstman
matthew-gerstman / memoized-sparking-wind.md
Last active February 10, 2026 15:30
Abstract messaging: Slack → Multi-Platform (SMS/Twilio first)

Abstract Messaging: Slack → Multi-Platform (SMS/Twilio first) with Group Chat

Commits

  1. feat: add messaging platform types, adapter interface, and registry
  2. feat: add database tables for generic messaging connections and links
  3. feat: add thread/message service methods for generic messaging links
  4. refactor: create Slack messaging platform adapter wrapping existing code
  5. feat: add Twilio SMS/Conversations service wrapper and adapter
  6. feat: add SMS inbound webhook route and connection setup
  7. feat: add messaging event dispatcher with group chat support
@matthew-gerstman
matthew-gerstman / gist:bf0a705f5d6e7357acd3943f2b92b67b
Created February 10, 2026 02:23
Follow-up: Address Claude bot review comments on PR #6641
# Follow-up: Claude Bot Review Comments on PR #6641
## Context
PR #6641 adds employee mode credit bypass. Claude bot flagged three issues.
Two were addressed in the PR; the "critical" one is a false positive.
## 🔴 "Critical": Per-step credit deduction not bypassed
**Status: False positive — no action needed**
Claude claims the per-step deduction block still runs for employee mode.
@matthew-gerstman
matthew-gerstman / test-coverage-plan.md
Created February 9, 2026 01:36
Obvious monorepo — comprehensive test coverage plan

Obvious Monorepo — Comprehensive Test Coverage Plan

Date: 2026-02-08 Current coverage: ~25-30% of source files have corresponding tests Coverage enforcement: None (no thresholds, no CI reporting)


Executive Summary

@matthew-gerstman
matthew-gerstman / sse-performance-report.md
Created February 9, 2026 01:33
SSE Event Stream Performance Analysis — Bun 1.3.9 profiling results, benchmark data, and actionable improvements

SSE Event Stream Performance Analysis

Date: February 8, 2026 Runtime: Bun 1.3.9 (darwin arm64) Method: Custom stress test suite using Bun's built-in --cpu-prof-md and --heap-prof-md profiling tools


Executive Summary

@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"