Skip to content

v0.9.4: env-tunable DB pool + real back-nav spinner fix#5

Merged
Shaan-alpha merged 8 commits into
mainfrom
feat/v0.9.4-db-pool-tunable
May 28, 2026
Merged

v0.9.4: env-tunable DB pool + real back-nav spinner fix#5
Shaan-alpha merged 8 commits into
mainfrom
feat/v0.9.4-db-pool-tunable

Conversation

@Shaan-alpha

Copy link
Copy Markdown
Owner

Summary

Two changes shipped under v0.9.4:

  • DB pool size is now env-tunable (DB_POOL_SIZE / DB_MAX_OVERFLOW), defaults unchanged at 5/5 so the deploy is byte-identical at runtime. The originally-planned 10/20 bump was dropped after direct telemetry (Neon max_connections=112 → ~105 usable, ~1 live app connection; Vercel 0% error rate; Sentry clean) showed no pool-exhaustion symptom — and a blind bump to 30 conns/instance would risk the ceiling under multi-instance Fluid Compute. Engine reads the values via a module reference for test monkeypatch propagation.
  • Real fix for the search spinner sticking on browser-back. Root cause: Cache Components (cacheComponents: true, v0.8.6) keeps the landing page in a hidden React <Activity> on navigation instead of unmounting it, so the manual isLoading useState was preserved and reappeared as a stuck spinner on Back. The v0.9.3 pageshow fix was inert (same-document soft-nav never fires it) and its test was a false positive. Now uses useTransition — pending state is derived from the live navigation, idle on return by construction.

Test plan

  • Backend: ruff clean, pytest 283 passed / 69 skipped (+2 new pool tests)
  • Frontend: lint + tsc clean, vitest 54 passed (search-bar 1→4: normalize/validation/nav coverage), next build clean (PPR routes intact)
  • Live: search a profile → browser Back → analyze button is idle, no stuck spinner (verified on prod after merge)

Data gathered 2026-05-28 (Neon max_connections=112, ~1 live app
connection; Vercel 0% error rate; Sentry clean) shows no pool-exhaustion
symptom, so the slice ships tunability rather than a blind 10/20 bump.
Root cause: Cache Components (cacheComponents: true) keeps the landing page
mounted in a hidden React <Activity> on navigation instead of unmounting it,
so the manual isLoading useState was preserved and reappeared as a stuck
spinner + disabled input on browser-back. The v0.9.3 pageshow fix was inert
(same-document soft-nav never fires pageshow). Switch to useTransition so the
pending state is derived from the live navigation and is idle on return by
construction. Replace the false-positive bfcache test with normalize/
validation/navigation coverage.
@Shaan-alpha Shaan-alpha merged commit 67c28e7 into main May 28, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant