Skip to content

feat: reconstrói comparador de renda fixa - #554

Open
marcelorodrigo wants to merge 5 commits into
masterfrom
feat/rebuild-investment-comparator
Open

feat: reconstrói comparador de renda fixa#554
marcelorodrigo wants to merge 5 commits into
masterfrom
feat/rebuild-investment-comparator

Conversation

@marcelorodrigo

Copy link
Copy Markdown
Member

Reconstrói o comparador de renda fixa para permitir a análise simultânea de múltiplos investimentos, com ranking por retorno líquido, gráficos, detalhamento mensal, compartilhamento de cenários e suporte responsivo para desktop e dispositivos móveis.

A implementação substitui a lógica financeira anterior por módulos tipados e testáveis para calendário, tributação, FGC, curvas de taxas e produtos prefixados, pós-fixados e indexados ao IPCA. Também adiciona páginas educacionais e de metodologia para tornar as premissas e fontes explícitas.

O pipeline de índices passa a produzir um snapshot validado com dados do BCB, Focus, calendário do Copom e feriados da ANBIMA. Isso corrige consultas SGS incompletas, o parser de datas da ANBIMA, falsos alertas de defasagem do IPCA e a possibilidade de gravar coberturas de feriados vazias ou invertidas. Falhas parciais agora preservam o último snapshot válido e são reportadas claramente.

A estrutura anterior de componentes, store e cálculos foi removida porque não acomodava comparação multiativo, projeções e validação uniforme sem duplicação significativa.

O conjunto foi validado com ESLint, 90 testes Vitest e geração estática completa via Nuxt.

Adiciona comparação de múltiplos investimentos, projeções, gráficos e conteúdo educacional.

Reestrutura o motor financeiro e o pipeline de índices para usar snapshots validados, fontes oficiais e fallback seguro.
@coderabbitai

coderabbitai Bot commented Aug 9, 2026

Copy link
Copy Markdown
Contributor

Important

Review skipped

Too many files!

This PR contains 125 files, which is 25 over the limit of 100.

To get a review, reduce the PR to 100 files or fewer by splitting it into smaller PRs or changing its base branch.

Upgrade to a paid plan to raise the limit.

This review couldn't start because sufficient usage credits or metered capacity aren't available. Add credits or update usage-based reviews in the billing tab, then retry.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: de4825a9-af19-4aaf-aee1-a6e3a068a42f

📥 Commits

Reviewing files that changed from the base of the PR and between 9697a0b and 297afb4.

⛔ Files ignored due to path filters (1)
  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
📒 Files selected for processing (125)
  • .github/workflows/ci.yml
  • .github/workflows/update-indexes.yml
  • PLAN.md
  • app/app.vue
  • app/assets/css/main.css
  • app/assets/indicadores.json
  • app/assets/market-data.json
  • app/components/ContentGradientBox.vue
  • app/components/InvestmentInput.vue
  • app/components/InvestmentResult.vue
  • app/components/InvestmentSimulation.vue
  • app/components/NavigationBar.vue
  • app/components/ThemeToggle.vue
  • app/components/calculator/CalculationNotes.vue
  • app/components/calculator/ChartSeriesControls.vue
  • app/components/calculator/ComparisonChart.client.vue
  • app/components/calculator/ComparisonSummary.vue
  • app/components/calculator/HolidayList.vue
  • app/components/calculator/InvestmentDesktopTable.vue
  • app/components/calculator/InvestmentEditorFields.vue
  • app/components/calculator/InvestmentMobileCard.vue
  • app/components/calculator/InvestmentMobileList.vue
  • app/components/calculator/InvestmentResultDetails.vue
  • app/components/calculator/MarketIndicators.vue
  • app/components/calculator/MonthlyYieldDetails.vue
  • app/components/calculator/ProjectionTables.vue
  • app/components/calculator/SimulationToolbar.vue
  • app/components/education/EducationArticleLayout.vue
  • app/components/education/FormulaExample.vue
  • app/components/education/OfficialSourceList.vue
  • app/components/investment/AmountInput.vue
  • app/components/investment/IndexCdbInput.vue
  • app/components/investment/IndexCdbPreInput.vue
  • app/components/investment/IndexDiInput.vue
  • app/components/investment/IndexLcxInput.vue
  • app/components/investment/IndexLcxPreInput.vue
  • app/components/investment/IndexSelicInput.vue
  • app/components/investment/PeriodInput.vue
  • app/components/investment/PeriodTypeInput.vue
  • app/composables/useComparisonCalculator.ts
  • app/composables/useShareSimulation.ts
  • app/composables/useSimulationWorker.ts
  • app/composables/useTheme.ts
  • app/layouts/default.vue
  • app/pages/aprenda/cdb-rdb-lc.vue
  • app/pages/aprenda/fgc.vue
  • app/pages/aprenda/impostos-ir-iof.vue
  • app/pages/aprenda/index.vue
  • app/pages/aprenda/indices-selic-cdi-ipca-tr.vue
  • app/pages/aprenda/lci-lca.vue
  • app/pages/aprenda/poupanca.vue
  • app/pages/aprenda/renda-fixa.vue
  • app/pages/aprenda/tesouro-direto.vue
  • app/pages/como-calcular-imposto-de-renda.vue
  • app/pages/como-calcular-juros-da-poupanca.vue
  • app/pages/index.vue
  • app/pages/metodologia.vue
  • app/pages/sobre.vue
  • app/src/calendar/business-days.ts
  • app/src/calendar/dates.ts
  • app/src/calendar/monthly-anniversary.ts
  • app/src/cdb.ts
  • app/src/contracts/errors.ts
  • app/src/contracts/investment.ts
  • app/src/contracts/market.ts
  • app/src/contracts/simulation.ts
  • app/src/finance.ts
  • app/src/finance/decimal.ts
  • app/src/finance/fgc.ts
  • app/src/finance/rate-curves.ts
  • app/src/finance/regulatory-constants.ts
  • app/src/finance/taxes.ts
  • app/src/lcx.ts
  • app/src/market/validate-snapshot.ts
  • app/src/poupanca.ts
  • app/src/prefixado.ts
  • app/src/products/cdi-linked.ts
  • app/src/products/fixed-rate.ts
  • app/src/products/ipca-linked.ts
  • app/src/products/registry.ts
  • app/src/products/savings.ts
  • app/src/products/treasury.ts
  • app/src/sharing/codec.ts
  • app/src/sharing/schema.ts
  • app/src/simulation/monthly-yield.ts
  • app/src/simulation/ranking.ts
  • app/src/simulation/simulate-comparison.ts
  • app/src/simulation/simulate-investment.ts
  • app/src/simulation/timeline.ts
  • app/stores/comparison.ts
  • app/stores/investment.ts
  • app/workers/simulation.worker.ts
  • nuxt.config.ts
  • package.json
  • scripts/market-data/fetch-anbima.mjs
  • scripts/market-data/fetch-bcb-sgs.mjs
  • scripts/market-data/fetch-copom.mjs
  • scripts/market-data/fetch-focus.mjs
  • scripts/market-data/normalize-market-data.mjs
  • scripts/market-data/validate-market-data.mjs
  • sonar-project.properties
  • test/fixtures/market-data/anbima-2026.html
  • test/fixtures/market-data/snapshot.ts
  • test/nuxt/AmountInput.test.ts
  • test/nuxt/CalculatorPage.test.ts
  • test/nuxt/ContentGradientBox.test.ts
  • test/nuxt/InvestmentStore.test.ts
  • test/nuxt/calculator.test.ts
  • test/unit/calendar/calendar.spec.ts
  • test/unit/finance/fgc.spec.ts
  • test/unit/finance/taxes.spec.ts
  • test/unit/market-data/update-indexes.spec.ts
  • test/unit/market-data/updater.spec.ts
  • test/unit/market-data/validate-snapshot.spec.ts
  • test/unit/products/products.spec.ts
  • test/unit/sharing/codec.spec.ts
  • test/unit/simulation/comparison.spec.ts
  • test/unit/simulation/worker.spec.ts
  • test/unit/src/cdb.spec.ts
  • test/unit/src/finance.spec.ts
  • test/unit/src/lcx.spec.ts
  • test/unit/src/prefixado.spec.ts
  • test/unit/update-indexes.spec.ts
  • update-indexes.mjs
  • vitest.config.ts

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


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

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

Comment thread app/workers/simulation.worker.ts Fixed
@marcelorodrigo
marcelorodrigo marked this pull request as ready for review August 9, 2026 19:52
Resolve os problemas de segurança, confiabilidade, acessibilidade e manutenção reportados pelo SonarCloud.

Restaura também o agendamento original do workflow de atualização dos índices.
Simplifica o formatter do gráfico, a validação do worker e a remoção de tags do parser ANBIMA.
@sonarqubecloud

Copy link
Copy Markdown

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