Repository navigation
fix(notifications): avoid quadratic provider candidate scans - #588
Conversation
The formatting popover was anchored at the selection midpoint, shifted left by half its own width through a CSS transform, and pinned 44px above the selection top. Neither axis was bounded, and the surface scrolls inside an overflow container, so a selection starting at the left edge of the narrow drawer put roughly half the popover outside it, and a selection on the first line put the popover above the box entirely (#515). The popover now measures itself after mount, centres on the selection only where the result fits, clamps into the editor box otherwise, and flips below the selection when there is no room above it. The placement rule is a pure exported helper, so the reported geometry is a unit test. Verified: - bun test tests/features/docs/editor/rich-text-editor.test.tsx: 31 passed - bun test tests/features/docs: 487 passed, 3 failed, and the same three fail on a clean main checkout (useAutosave x2 under full-suite timing, and the outline memo setext underline case), so they are pre-existing - RED both ways: restoring the pre-fix arithmetic fails the six placement tests and both component tests; restoring only the pre-fix rendering fails the two component tests (left 12px instead of 8px, top -40px instead of 28px) - biome check, check-comments, check-bytes and check-deps are clean - apps/web tsc --noEmit names neither touched file (the checkout reports pre-existing errors elsewhere) Fixes #515 Signed-off-by: ayam04 <[email protected]>
…x-production-repair-release
|
No actionable comments were generated in the recent review. Walkthrough
Merge Risk:
|
|
Independent production diagnosis confirms this exact candidate SELECT is active on the served release, with multiple CPU-bound copies and no blocking locks. pg_stat_statements provided the full normalized SQL; activity text alone was truncated. Independent review checked the two-part rewrite and the actual emitted-SQL workload test, including email exemption, ordering, leases and workspace isolation. The local 1,024-conversation fixture returns the same ordered candidates while reducing measured logical row work from 1,052,672 to 5,124. No production EXPLAIN ANALYZE, load test, schema change or index change was performed. Full verification is active; actual-main integration and fresh CI still precede merge. |
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Production verification: the merged c71be0b artifact is serving the public alias. The scheduler allowance was rotated to its exact current hostname, with the previous hostname retired and no broader API/OAuth/MCP exception. All five cron definitions point to the same production artifact. No migration was needed; Postgres remains 3.4.9. After more than 330 seconds of natural scheduling, all 11 retrieved notification/sprint-rollover requests returned 200 and no Task timed out event was retrieved for the new deployment. Public health, realtime readiness and an authenticated read passed. The daily/hourly jobs were not manually invoked. One separate Redis rate-limiter connection timeout remains under investigation; this does not claim all production issues are resolved. |
The provider notification candidate query repeatedly scans the earlier-delivery backlog for each eligible row. Move the current source join into the outer query and place the email exemption inside a top-level NOT EXISTS predicate, allowing PostgreSQL to plan a hash anti join while preserving ordering, workspace isolation, eligibility and leases.
Only the query and its regression tests change. No schema, migration, index or dependency change.
Validation at dc35503: