Skip to content

feat(profile): migrate profile and report activity page to Next.js - #781

Open
vbeni30 wants to merge 4 commits into
devfrom
issue-769-profile-migration
Open

feat(profile): migrate profile and report activity page to Next.js#781
vbeni30 wants to merge 4 commits into
devfrom
issue-769-profile-migration

Conversation

@vbeni30

@vbeni30 vbeni30 commented Aug 3, 2026

Copy link
Copy Markdown

What does this PR do?

Migrates the legacy Razor /profile route to a native Next.js page, fully utilizing the App Router.

  • Built the new Next.js route at frontend/app/profile/page.tsx using server-side data fetching for the initial load.
  • Removed the legacy /profile rewrite rule from next.config.ts.
  • Integrated ProfileFullView as the main layout, wiring up the filter sidebar, date range dropdown, chart, and data tables.
  • Fixed a layout bug in the empty states where stats and charts would completely disappear when a user had no activity data. It now correctly falls back to placeholders (-) and an empty UI state, matching the old Razor layout perfectly.
  • Added comprehensive unit tests in profile-full-view.test.tsx to handle loading, error, and empty states gracefully.

Testing

  • Tests are all passing locally.
  • You can pull down this branch, run npm run frontend:dev, and visit /profile to check out the migrated Next.js UI.

Sceenshot

image

Migrates the legacy Razor /profile route to a native Next.js page, fully utilizing the App Router

#769
@vbeni30
vbeni30 requested a review from Seme30 August 3, 2026 13:23

@Seme30 Seme30 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review findings

I reviewed this against issue #769. The current implementation has blockers:

  1. P1 — /profile resolves to the wrong profile: frontend/app/profile/page.tsx:48-54 redirects the bare /profile route to the signed-in user with type=user. The legacy Report Activity route uses type=report and id=-1; /users is the separate personal-profile route. This changes the route semantics and hides the Report Runs, Stars, and Subscriptions sections.

  2. P1 — The required filter sidebar is empty: frontend/components/profile/profile-filter-sidebar.tsx:20-32 now renders only the Filter Profile heading. The PR deletes its controls and does not implement the Razor-equivalent server, database, master-file, visibility, certification, availability, or report-type filters. The date-range selector elsewhere does not satisfy the profile filter acceptance criterion.

  3. P2 — Real API failures do not reach the tested error state: frontend/app/profile/actions.ts:60-79 returns a populated data object with error: null for forbidden, not-found, server-error, and service-unavailable responses, converting failed sections to null or empty arrays. Consequently, the error branch in frontend/app/profile/page.tsx:70 is normally unreachable for these failures. The new component test mocks { data: null, error: "service_unavailable" }, but the action does not produce that result.

The CI checks pass, but these acceptance-level behaviors are not covered. Please address them before merging.

@Seme30 Seme30 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The latest commit resolves the API error-propagation issue, but two blockers from the previous review remain:

  1. P1 — Bare /profile still resolves to the wrong profile. frontend/app/profile/page.tsx still redirects to the signed-in user with type=user. The legacy Report Activity route requires type=report and id=-1; /users is the personal-profile route. This continues to hide Report Runs, Stars, and Subscriptions for the bare route.

  2. P1 — Required profile filters are still missing. frontend/components/profile/profile-filter-sidebar.tsx remains effectively empty and does not provide the Razor-equivalent server, database, master-file, visibility, certification, availability, and report-type filters.

Please address these before merging.

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