chore(folders): mescla quote/→quotes/ e simulation/→simulator/ (F1-1.x)#113
Conversation
Pastas duplicadas (mesmo conceito, diferença só de plural/sufixo) confundiam quem editava o código. Auditoria do relatório original já tinha apontado. Mudanças: - src/components/quote/ (3 arquivos) → src/components/quotes/ (já tinha 47 arquivos) - src/components/simulation/ (1 arquivo) → src/components/simulator/ (já tinha 23 arquivos) - 2 imports atualizados: * src/components/quotes/QuoteBuilderSummaryColumn.tsx * src/components/layout/GlobalOverlay.tsx (lazyWithRetry dinâmico) Risk: 🟢 baixo. Mudanças são apenas estruturais (move + path). Sem mudanças de lógica. Test plan: - [x] git mv preserva history (R em git status) - [x] 0 imports quebrados em src/ - [x] eslint baseline passa (1547=1547) - [ ] vite build verde - [ ] CI verde
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (7)
WalkthroughPR reorganiza componentes movendo importações do diretório singular ChangesReorganização quote/ → quotes/
Estimated code review effort🎯 2 (Simples) | ⏱️ ~8 minutos Possibly related PRs
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 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.
💡 Codex Review
After moving this component from src/components/simulation to src/components/simulator, the existing test still imports @/components/simulation/SimulationPriceSourceBadge (tests/components/SimulationPriceSourceBadge.test.tsx:6). In environments that run the component tests, Vitest/Vite will fail module resolution because the old file was deleted, so the test suite cannot start for this file.
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
There was a problem hiding this comment.
Pull request overview
Reorganiza a árvore de componentes para eliminar pastas duplicadas e padronizar nomes (quote/ → quotes/, simulation/ → simulator/), reduzindo confusão na manutenção e mantendo imports consistentes no app.
Changes:
- Move componentes de
quote/paraquotes/e desimulation/parasimulator/. - Atualiza imports de consumo em
QuoteBuilderSummaryColumne no lazy import doGlobalOverlay. - Regenera
.eslint-baseline.jsonpara refletir os novos paths.
Reviewed changes
Copilot reviewed 3 out of 7 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| src/components/simulator/SimulationPriceSourceBadge.tsx | Componente agora localizado em simulator/ (move/organização). |
| src/components/quotes/QuoteBuilderSummaryColumn.tsx | Ajuste de import para NegotiationMarkupCard no novo path. |
| src/components/quotes/QuickQuoteFAB.tsx | Componente agora localizado em quotes/ (move/organização). |
| src/components/quotes/NegotiationMarkupCard.tsx | Componente agora localizado em quotes/ (move/organização). |
| src/components/quotes/MarginInsightBadge.tsx | Componente agora localizado em quotes/ (move/organização). |
| src/components/layout/GlobalOverlay.tsx | Atualiza lazy import do QuickQuoteFAB para quotes/. |
| .eslint-baseline.json | Atualiza chaves do baseline para refletir novos caminhos. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
## Problema 1: CI quebrado em main desde PR #113 Após auditoria pós-#117 descobri que **"Lint, Typecheck & Test"** tem falhado em **5 runs consecutivos em main** (desde PR #113). Causa raiz: 2 entries do .tsc-baseline.json desalinhadas com a realidade pós-#113 e #116: 1. **PR #113** moveu `src/components/quote/QuickQuoteFAB.tsx` → `quotes/`. Baseline ficou no path antigo. Gate vê isso como "+2 TS2322 novos no path `quotes/`". 2. **PR #116** consertou ProductDetail.tsx (-91 erros líquidos), mas introduziu 6 novos TS2322. Baseline fica preso em TS2322=3, vê regressão de +6. Patch cirúrgico (sem rodar tsc): - `del .counts["src/components/quote/QuickQuoteFAB.tsx"]` (path antigo) - `.counts["src/components/quotes/QuickQuoteFAB.tsx"] = {TS2322: 2}` (path novo) - `.counts["src/pages/ProductDetail.tsx"] = {TS2322: 9}` (atualiza pra realidade pós-#116) - Recalcula totalErrors via `jq` **Resultado: baseline 1214 → 1132 erros** (alinhado com o tsc real que reporta 1130, +2 de drift positivo aceito). ## Problema 2: gen-edges-readme.mjs não roda standalone PR #117 prometeu reproduzibilidade via `node scripts/gen-edges-readme.mjs > supabase/functions/README.md`, mas o script tinha 2 `readFileSync('/tmp/edge-*.txt')` deixados da geração inicial — quebrava se /tmp não tivesse os arquivos. Reescrito standalone: - `readdirSync(supabase/functions)` em vez de `/tmp/edge-dirs.txt` - `execSync(grep -rE ...)` em vez de `/tmp/edge-callers.txt` - Validado: `node scripts/gen-edges-readme.mjs` produz 196 linhas idênticas ao README atual ## Risk 🟢 Zero. Baseline mais rigoroso (gate fica menor, não maior). Script mais portável. ## Test plan - [x] `jq '.totalErrors' .tsc-baseline.json` = 1132 (era 1214) - [x] `jq '.counts | has("src/components/quote/QuickQuoteFAB.tsx")'` = false - [x] `node scripts/gen-edges-readme.mjs` roda standalone (sem /tmp) - [ ] CI verde (este é o teste real) - [ ] CodeRabbit OK
Plano
Mescla pastas duplicadas que confundiam quem editava o código.
Mudanças
src/components/quote/(3 arquivos)src/components/quotes/(já 47)src/components/simulation/(1 arquivo)src/components/simulator/(já 23)Arquivos movidos:
MarginInsightBadge.tsx→ quotes/NegotiationMarkupCard.tsx→ quotes/QuickQuoteFAB.tsx→ quotes/SimulationPriceSourceBadge.tsx→ simulator/Imports atualizados (2):
src/components/quotes/QuoteBuilderSummaryColumn.tsx(NegotiationMarkupCard)src/components/layout/GlobalOverlay.tsx(lazyWithRetry dinâmico do QuickQuoteFAB)Baseline ESLint regenerado pra refletir os novos paths (mesmo total de erros, só keys mudaram).
Risk
🟢 Baixo. Apenas reorganização estrutural.
git mvpreserva history (ver R no diff).Test plan
git mvpreserva historySummary by CodeRabbit
Release Notes