Fixed
- Draft-with-me browser freeze. Clicking Draft-with-me with certain composer text (any long lowercase word, URL slug, or booking code of roughly 28+ characters) pinned the browser tab at 100%+ CPU with Chrome's "Page unresponsive" dialog, surviving refreshes because composer drafts persist locally. The cause was catastrophic (exponential) regex backtracking in the operator-guidance credential sanitizer, running synchronously on the click. The pattern has been rewritten to run in linear time with identical redaction semantics, and the guidance length cap now applies before the regex chain.
Performance
- Streaming Draft-with-me token updates now coalesce their store writes on an 80ms trailing timer, so fast generations no longer re-render every status indicator once per streamed token.
- Message-body link detection now trims trailing unbalanced brackets in a single pass instead of a quadratic loop, removing a potential multi-second stall on pathological message bodies.
Verification
pnpm exec vitest run components/inbox/linkified-text.test.tsx components/inbox/gb-agent-draft-with-me-action.test.tsx hooks/use-gb-agent-draft-stream.test.ts— 52 passed, including new linear-time regression tests for both hot spots.- Standalone Node benchmarks confirming the exponential blowup on the old sanitizer pattern (10s at 30 chars) and sub-millisecond behavior on the fix.
pnpm lint, app typecheck,pnpm release:hygiene.