Skip to content

bug(analytics): code smells export says no data while the section shows findings #20492

Closed

Description

@mrveiss

Problem

The code smells section shows findings, but its export answers "No data available for code-smells. Load the section first." Reported by the maintainer on the live install.

Evidence

On main at f88cd37:

  • CodebaseAnalytics.vue renders CodeSmellsSection from codeSmellsForPanel, and export calls exportSection('code-smells', fmt).
  • useCodebaseExport.ts reads deps.sectionData[section]?.value and warns when it's empty.

So the panel and the export appear to read different state. I haven't traced what fills sectionData['code-smells'], and whether other sections share this is not known.

Acceptance criteria

  • A test: with findings displayed, MD and JSON export return those findings.
  • Every section with an export button is checked for the same mismatch, and the class is fixed once.

Activity

  1. added
    needs-structureMissing goal milestone, matching phase label or native parent (#19522)
    on Nov 1, 2026
  2. github-actions commented on Nov 1, 2026

    @github-actions
    Contributor

    needs-structure cleared: goal milestone, matching phase label and native parent (or sub-issues) are all present (#19522).

  3. removed
    needs-structureMissing goal milestone, matching phase label or native parent (#19522)
    on Nov 1, 2026
  4. mrveiss commented on Nov 12, 2026

    @mrveiss
    OwnerAuthor

    Merged via #21397, in main as merge commit 650d062 (train #21398), 2026-11-12 ~21:30 Riga. Evidence read from origin/main.

    AC Status Evidence
    Test: with findings displayed, MD and JSON export return them Delivered composables/analytics/__tests__/exportPanelDerivation.test.ts: "MD and JSON of smellsExport return the findings smellsForPanel displays"; useCodebaseExport.test.ts: "code smells: MD and JSON both return the findings on display".
    Every exporting section checked, class fixed once Delivered exportPanelDerivation.test.ts "every section with a page export button has an entry above" and "no panel or page emits an export for a section outside the map"; five more mismatched generators fixed (declarations, API endpoints, cross-language, config duplicates, code intelligence), generators typed per section (sectionMarkdown.ts, codeIntelTypes.ts, declarationPanelRows.ts).

    The report came from the live install, which still runs pre-update code (#21343), so the fix has not been seen there. Both ACs are test-based, so the issue stays closed.

  5. added
    needs-ac-evidenceClosed by a merge keyword; awaits an AC evidence table comment (#19520)
    on Nov 12, 2026
  6. github-actions commented on Nov 12, 2026

    @github-actions
    Contributor

    Landed via the merge train (#21398, merge 650d06217f) via #21397

  7. mrveiss commented on Nov 12, 2026

    @mrveiss
    OwnerAuthor

    Closure evidence (acceptance criteria quoted verbatim)

    Closure evidence read from origin/main at 650d062. Gate 2 (check-issue-close-refs.sh) was not run in this read-only pass; instead a grep of origin/main for forward-tracking references (TODO / deferred to / tracked in / follow-up) naming this issue found none.

    Criterion Evidence on main Status
    "A test: with findings displayed, MD and JSON export return those findings." autobot-frontend/src/composables/analytics/__tests__/useCodebaseExport.test.ts:151 "code smells: MD and JSON both return the findings on display"; __tests__/exportPanelDerivation.test.ts:70 "MD and JSON of smellsExport return the findings smellsForPanel displays", :94 reload replaces the export. Source fixed: useCodeSmellProblems.ts:67 smellsForPanel and :81 smellsExport = buildSmellsExport(smellsForPanel.value, ...); components/analytics/CodebaseAnalytics.vue:161 panel bound to smellsForPanel, :804 'code-smells': smellsExport feeds the export. met
    "Every section with an export button is checked for the same mismatch, and the class is fixed once." useCodebaseExport.test.ts:162-230: per-section PANEL_PROP map asserting each panel's bound prop equals the source its export reads (:213 parametrized), :225 "every section with a page export button has an entry above", :198 "no panel or page emits an export for a section outside the map"; :128-160 per section the JSON equals the loaded data and the MD contains the panel marker with no undefined (the test comment lists declarations, api-endpoints, config-duplicates, cross-language, code-intelligence as failing before the fix). Generators are typed once per section: sectionMarkdown.ts:66-70 SectionDataMap and :355 generator map. Declarations derivation: exportPanelDerivation.test.ts:109,117. met

    Merged: PR #21397 via train #21398, main 650d062.
    CI on train PR #21398: 89 SUCCESS, 8 SKIPPED (the aggregate/duplicate-named skipped jobs), 1 NEUTRAL (CodeRabbit), 1 IN_PROGRESS (post-merge "Post landing notes on referenced issues"). python-suite shards 1/8 to 8/8: SUCCESS; python-suite aggregate: SUCCESS; frontend-tests: SUCCESS.
    Nothing left unchecked. The maintainer's report came from a live install; the fix was not observed there.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingfrontendneeds-ac-evidenceClosed by a merge keyword; awaits an AC evidence table comment (#19520)phase:M4.11Safety net: tests and analysers reach the whole treepriority: medium

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions