ci: stabilize deploy gates runtime checks#285
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Updates to Preview Branch (fix/deploy-gates-smoke-project) ↗︎
Tasks are run on every commit but only new migration files are pushed.
❌ Branch Error • Sun, 24 May 2026 18:47:18 UTC View logs for this Workflow Run ↗︎. |
|
Caution Review failedPull request was closed or merged during review WalkthroughPR consolida ajustes no pipeline de Lighthouse CI, implementa padrão de prevenção de memory leaks em dois hooks React via isMountedRef/isMounted, corrige strings de erro em português e ajusta tipagem genérica em webhook do Supabase. ChangesLighthouse CI Configuration
Memory Leak Prevention in React Hooks
Error Handling and Type Adjustments
Estimated code review effort🎯 2 (Simple) | ⏱️ ~12 minutes Possibly related PRs
Suggested labels
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
Pull request overview
Stabilizes the “Deploy Gates” CI checks (especially Lighthouse) and fixes a couple of post-#281 regressions by ensuring builds can run with harmless Supabase env placeholders, avoiding blank Lighthouse runs, and preventing async state updates after unmount in hooks.
Changes:
- Adjust Lighthouse CI to use
127.0.0.1for preview hosting/auditing and provide placeholderVITE_SUPABASE_*env vars during the Lighthouse gate build. - Guard async hook state updates after unmount (
useAdvancedFilters,useExternalDatabase) to prevent React warnings/regressions. - Fix UTF-8 corruption in
useVoiceAgentstrings/comments and remove a staleDatabasegeneric reference in the Deno webhook function.
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
supabase/functions/product-webhook/index.ts |
Removes stale Database typing by loosening the Supabase client generic in helper signature(s). |
src/hooks/products/useAdvancedFilters.ts |
Prevents setIsLoading(false) from firing after unmount during initial async option loads. |
src/hooks/intelligence/useVoiceAgent.ts |
Restores proper UTF-8 text for user-facing messages/comments. |
src/hooks/intelligence/useExternalDatabase.ts |
Adds an isMountedRef guard to avoid state updates/toasts after unmount during async invocations. |
.lighthouserc.json |
Switches LHCI preview URL/host from localhost/0.0.0.0 to 127.0.0.1. |
.github/workflows/deploy-gates.yml |
Adds Lighthouse-only placeholder VITE_SUPABASE_* env vars to allow preview builds to run deterministically. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| // deno-lint-ignore no-explicit-any | ||
| supabase: SupabaseClient<any>, |
Summary
product-webhookDeno typecheck by removing the staleDatabasegeneric reference.Validation
git diff --check origin/main...HEAD— passednpm.cmd run typecheck— no TypeScript baseline regressionnpm.cmd run lint:baseline— no ESLint baseline regressionnpx.cmd vitest run tests/hooks/useVoiceAgent.test.ts tests/hooks/useContextualSuggestions.test.tsx --reporter=verbose— 2 files, 9 tests passednpx.cmd vitest run tests/contracts --run— 8 files, 426 tests passednpm.cmd run build— passednpm.cmd run test:e2e:smoke— 8 passed, 38 skipped/auth; remaining local failure was Windows-only Chrome temp cleanupEPERM.Refs #264
Follow-up to #281
Summary by cubic
Stabilizes deploy-gates checks by fixing the Lighthouse CI preview build and preventing state updates after unmount in hooks. Also restores UTF-8 voice agent messages and fixes the
product-webhooktypecheck; addresses deploy-gates flakiness (Linear #264).VITE_SUPABASE_*placeholders and run LHCI on127.0.0.1to avoid NO_FCP and host issues.useExternalDatabaseanduseAdvancedFilters.useVoiceAgent; keep fallback flow intact.Databasegeneric inproduct-webhookto pass typecheck.Written for commit 2174608. Summary will update on new commits. Review in cubic
Summary by CodeRabbit
Notas de Lançamento
Bug Fixes
Chores