Skip to content

fix(frontend): restore profile analytics for all object types #797

Description

@Seme30

Part of #789.

Problem

Next.js profile analytics fail or mis-render depending on type. Term and collection profiles error. Report and user profiles load but show the wrong names and unformatted percents.

Related API work is in #788; this issue is the Next.js profile UI.

Current gaps

  • /profile?id=1&type=term and /profile?id=1&type=collection → Next.js "Unable to load profile". Razor shows an empty analytics shell.
  • /profile?id=16&type=report on Next.js shows 3 runs, 2 users, 42s, a chart, Top users, and Failures — but row titles are the section name (Top Users) and percents print as 0.3333333333333333%.
  • /users?id=2 analytics on Next.js has the same label/percent bug (Top Reports, raw floats).
  • Razor profile pages stayed on - Runs / - Users in this docker run even after waiting for network idle (likely Razor AJAX). Treat Razor empty charts as a separate host note, not a Next.js pass.

Frontend references

  • frontend/app/profile/page.tsx
  • frontend/components/profile/
  • GET /api/profile/chart|users|reports|fails|run-list|stars|subscriptions

Definition of done

  • Term and collection profiles render an analytics (or explicit unsupported) state instead of a generic error.
  • Top users / top reports rows show the seeded person or report name.
  • Percents are formatted (for example 33%), not raw floats.
  • Frontend tests cover term/collection load failure and the label/percent rendering.

Activity

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 working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions