← Back to Pull requests

fix: links internos quebrados (ADM-15) #390

Open
unknown opened this pull request with 214 lines diff across 2 files
View on GitHub
unknown unknown commented on Nov 20, 2026 20:25 UTC
Author

Causa


Três componentes navegavam para rotas/query strings inexistentes:

1. UpcomingDatesWidget.tsx:33 — navigate('/filtros?data=' + slug). A key data não existe em deserializeFilters (filters-page-helpers.ts l.62-102: só lê search/supplier/priceMin/priceMax/minStock/sortBy + ARRAY_FILTER_KEYS). A key correta de datas é datasComemorativas (ARRAY_FILTER_KEYS l.14, serialize l.397).
2. MyDiscountRequestsWidget.tsx:109 — navigate('/admin/descontos'). Rota inexistente; a rota real é /admin/limites-desconto (src/routes/config/admin.ts:58).
3. SmartSuggestions.tsx:52-104 — MOCK_SUGGESTIONS com url: '/produtos/1..5'. Rota real de produto é /produto/:id (singular, products.ts l.14); /produtos é a página de filtros. Produtos 1..5 não existem → redirecionamento para página errada/inexistente.

Verificação (real)


  • npm run typecheck (tsconfig.app + tsconfig.node): limpo.

  • npx eslint nos 3 arquivos: 0 erros (3 warnings max-lines-per-function pré-existentes da main, não tocados).

  • Deserialize confirmado lendo filters-page-helpers.ts (l.62-102) e rota em products.ts/admin.ts.

  • /filtros?datasComemorativas=<slug>, /filtros?search=<term> e /admin/limites-desconto são os destinos validados contra o código existente.
  • Diff


    3 arquivos, +7/-7.
    <!-- devin-review-badge-begin -->

    ---

    <a href="https://app.devin.ai/review/adm01-debug/brindes_sicoob_v2/pull/390" target="_blank"><picture><source media="(prefers-color-scheme: dark)" srcset="https://static.devin.ai/assets/gh-devin-review-dark.svg?v=4"><img src="https://static.devin.ai/assets/gh-devin-review-light.svg?v=4" alt="Devin Review"></picture></a>
    <!-- devin-review-badge-end -->

    Diff: 214 lines (+160 / -54) across 2 files Reviewer: adm01-debug Review duration: 29m
    All Vouch review confidence checks passed
    Residual risk 0.20 = Change Risk (0.37) × (1 − Review Confidence (0.47)). Review depth and reviewer attention state are adequate.
    Model 1 · Change Risk (XGBoost)
    Score: 0.37 · 214 lines diff across 2 files
    0.37
    Model 2 · Review Depth (DistilBERT)
    Depth Score: 0.02 · 1 substantive comment(s)
    0.02
    Model 3 · Review Timing & Attention
    Session adequacy: 100% · Reviewer familiarity: 35%
    46%
    Bedrock Claude 3 · Risk Narration
    (disconnected)
    Groq
    Groq Risk Narration
    AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
    Model 1 · Change Risk Attribution
    SHAP Weights
    Shallow Review Depth shallow_review_depth
    0.344
    Diff Size diff_size
    0.321
    Real PR Conversation Timeline
    1 comments
    "Review active on #390"
    general weight: 0.35
    Reviewers
    Assignees
    Unassigned
    Labels
    risk: low confidence: 46.7% reviewed
    Vouch Risk Breakdown
    AI-powered review risk analysis
    Change Risk
    Change Risk · Model 1 (XGBoost)
    Predicted defect probability (0.00–1.00) based on diff churn, modified sensitive files, and author risk history.
    Score: 36.6% (MEDIUM) · Higher = larger blast radius
    36.6%
    Review Confidence
    Review Confidence · Models 2 & 3
    Scrutiny score (0.00–1.00) combining DistilBERT semantic review depth with reviewer familiarity and session dwell time.
    Score: 46.7% · Lower = rushed or shallow review
    46.7%
    Residual Risk
    Residual Risk · Core Equation
    Residual = Change × (1 − Confidence)
    Unmitigated risk surviving review. ≥ 0.65 triggers an automated re-queue to protect production.
    Score: 19.5% · Safe to merge
    19.5%