Skip to content

fix(secrets): corrige contratos quebrados no módulo de secrets/conexões#132

Merged
adm01-debug merged 1 commit into
mainfrom
claude/vibrant-fermi-SHzbc
May 23, 2026
Merged

fix(secrets): corrige contratos quebrados no módulo de secrets/conexões#132
adm01-debug merged 1 commit into
mainfrom
claude/vibrant-fermi-SHzbc

Conversation

@adm01-debug
Copy link
Copy Markdown
Owner

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

Summary

  • updatedByIdupdatedBy em buildUpdatedTooltip (SecretField.utils.ts) — alinha o nome do parâmetro com SecretStatus.updated_by, eliminando confusão de nomenclatura
  • Mock paths corrigidos em 3 arquivos de teste: @/hooks/useSecretsManager@/hooks/admin e @/hooks/useConnectionTestDetails@/hooks/intelligence (os caminhos reais dos barrel exports), usando importOriginal para preservar demais exports
  • Campos ausentes adicionados ao mock de useSecretsManager: isLoading, secrets, listError, list, refreshCache — cobrindo todo o contrato do hook
  • refreshrefetch nos mocks de useConnectionTestDetails — reflete o campo real de ConnectionTestDetailsState
  • Cast as any removido no teste de modo rotate; campo obrigatório name adicionado ao objeto SecretStatus

Test plan

  • npx vitest run tests/components/admin/SecretField.test.tsx — 19 testes passam
  • npx vitest run tests/components/admin/SecretField.a11y.test.tsx — 8 testes passam
  • npx vitest run tests/components/admin/pluralization.test.tsx — 11 testes passam
  • Total: 38/38 testes passam sem regressões

https://claude.ai/code/session_01QL2QShzSzFYzonYBTVcBhT


Generated by Claude Code


Summary by cubic

Corrige contratos no módulo de secrets/conexões, alinhando nomes e mocks de hooks para evitar erros na UI e nos testes. Atualiza o utilitário de tooltip e ajusta os testes para refletirem os barrel exports e estados reais.

  • Bug Fixes
    • buildUpdatedTooltip: renomeia parâmetro updatedByIdupdatedBy para alinhar com SecretStatus.updated_by.
    • Mocks: @/hooks/useSecretsManager@/hooks/admin e @/hooks/useConnectionTestDetails@/hooks/intelligence, usando importOriginal para preservar exports.
    • useSecretsManager mock: adiciona isLoading, secrets, listError, list, refreshCache.
    • useConnectionTestDetails mock: refreshrefetch conforme ConnectionTestDetailsState.
    • Remove as any no teste de rotate, adicionando campo obrigatório name em SecretStatus.

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

- Renomeia parâmetro `updatedById` → `updatedBy` em `buildUpdatedTooltip` para
  alinhar com `SecretStatus.updated_by` e eliminar confusão de nomenclatura
- Corrige path dos mocks de teste: `@/hooks/useSecretsManager` → `@/hooks/admin`
  e `@/hooks/useConnectionTestDetails` → `@/hooks/intelligence` (paths reais dos
  barrel exports) usando o padrão `importOriginal` para não quebrar outros exports
- Adiciona campos ausentes no mock de `useSecretsManager` (`isLoading`, `secrets`,
  `listError`, `list`, `refreshCache`) para cobrir todo o contrato do hook
- Corrige `refresh: vi.fn()` → `refetch: vi.fn()` nos mocks de
  `useConnectionTestDetails` para refletir o campo real do `ConnectionTestDetailsState`
- Remove cast `as any` no teste de modo rotate, adicionando o campo obrigatório
  `name` ao objeto `SecretStatus`

https://claude.ai/code/session_01QL2QShzSzFYzonYBTVcBhT
@vercel
Copy link
Copy Markdown

vercel Bot commented May 23, 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 23, 2026 11:41am

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 23, 2026

Important

Review skipped

Draft detected.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 9fad12ee-6029-465d-8c44-62685708823e

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch claude/vibrant-fermi-SHzbc

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

@supabase
Copy link
Copy Markdown

supabase Bot commented May 23, 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 ↗︎.

@adm01-debug adm01-debug marked this pull request as ready for review May 23, 2026 11:48
Copilot AI review requested due to automatic review settings May 23, 2026 11:48
@adm01-debug adm01-debug merged commit 4c6bce2 into main May 23, 2026
22 of 25 checks passed
@adm01-debug adm01-debug deleted the claude/vibrant-fermi-SHzbc branch May 23, 2026 11:48
@adm01-debug adm01-debug review requested due to automatic review settings May 23, 2026 12:09
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