Skip to content

fix(ts2304): importa vi no AdminStructuralComparison.test (−19 erros baseline TSC)#218

Merged
adm01-debug merged 1 commit into
mainfrom
fix/tsc-vi-import-admin-structural-test
May 24, 2026
Merged

fix(ts2304): importa vi no AdminStructuralComparison.test (−19 erros baseline TSC)#218
adm01-debug merged 1 commit into
mainfrom
fix/tsc-vi-import-admin-structural-test

Conversation

@adm01-debug
Copy link
Copy Markdown
Owner

@adm01-debug adm01-debug commented May 24, 2026

Contexto

Campanha zerar baselines — chunk 1 (maior ROI isolado do baseline TSC).

src/tests/AdminStructuralComparison.test.tsx usava vi.mock/vi.fn 19× mas importava apenas { describe, it, expect } do vitest → 19× TS2304 "Cannot find name 'vi'" — o maior agrupamento num único arquivo de todo o .tsc-baseline.json (1060 erros).

Mudança

Linha 1: + vi no import do vitest. 1 linha, test-only, sem dependentes.

Por que é seguro (sem flip / sem regressão)

  • TS2304 era o único código de erro neste arquivo → vai a 0, sem rótulo residual para "flipar".
  • Nenhum outro arquivo importa deste teste → impossível introduzir erro em terceiros.
  • vi é a API canônica do vitest e está usada 19× → sem risco de no-unused-vars no ESLint.

Efeito no gate

  • TSC: −19 (drift positivo). .tsc-baseline.json intocado nesta PR — regeneração oficial (1060→1041) em lote via VPS (tsc OOM no sandbox local).
  • ESLint: sem alteração.

Próximos chunks: cluster Web Speech API (1 ambient decl, ~15), @types/* (TS7016), TS2749 nos testes de sidebar.


Summary by cubic

Importa vi de vitest em src/tests/AdminStructuralComparison.test.tsx para corrigir 19 erros TS2304 (Cannot find name 'vi'). Reduz o baseline do TSC em 19; mudança só em testes, sem impacto em runtime.

Written for commit 61ba02d. Summary will update on new commits. Review in cubic

…s baseline)

O arquivo usa vi.mock/vi.fn 19x mas só importava { describe, it, expect }
do vitest, gerando 19 erros TS2304 "Cannot find name 'vi'". Adiciona `vi`
ao import. Mudança test-only, sem dependentes, sem alteração de runtime.
Copilot AI review requested due to automatic review settings May 24, 2026 02:13
@vercel
Copy link
Copy Markdown

vercel Bot commented May 24, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
we-dream-big Ready Ready Preview, Comment May 24, 2026 2:13am

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 24, 2026

Warning

Review limit reached

@adm01-debug, we couldn't start this review because you've used your available PR reviews for now.

Your plan currently allows 1 review/hour. Refill in 51 minutes and 18 seconds.

Your organization has run out of usage credits. Purchase more in the billing tab.

⌛ How to resolve this issue?

After more review capacity refills, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than trial, open-source, and free plans. In all cases, review capacity refills continuously over time.

Please see our FAQ for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: f9d1b88b-c2e9-40f5-ad57-d5b600a3380a

📥 Commits

Reviewing files that changed from the base of the PR and between 0e24af8 and 61ba02d.

📒 Files selected for processing (1)
  • src/tests/AdminStructuralComparison.test.tsx
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/tsc-vi-import-admin-structural-test

Comment @coderabbitai help to get the list of available commands and usage tips.

@supabase
Copy link
Copy Markdown

supabase Bot commented May 24, 2026

This pull request has been ignored for the connected project doufsxqlfjyuvxuezpln because there are no changes detected in supabase directory. You can change this behaviour in Project Integrations Settings ↗︎.


Preview Branches by Supabase.
Learn more about Supabase Branching ↗︎.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Corrige erros de typecheck (TS2304: “Cannot find name 'vi'”) em um teste que usa vi.mock/vi.fn, alinhando o arquivo com a API do Vitest e reduzindo o baseline do TSC sem impacto em runtime.

Changes:

  • Adiciona vi ao import de vitest em AdminStructuralComparison.test.tsx para resolver referências existentes a vi.*.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@adm01-debug adm01-debug merged commit c879613 into main May 24, 2026
27 of 30 checks passed
@adm01-debug adm01-debug deleted the fix/tsc-vi-import-admin-structural-test branch May 24, 2026 02:39
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.

2 participants