feat(profile): migrate profile and report activity page to Next.js - #781
feat(profile): migrate profile and report activity page to Next.js#781vbeni30 wants to merge 4 commits into
Conversation
Migrates the legacy Razor /profile route to a native Next.js page, fully utilizing the App Router #769
Seme30
left a comment
There was a problem hiding this comment.
Review findings
I reviewed this against issue #769. The current implementation has blockers:
-
P1 —
/profileresolves to the wrong profile:frontend/app/profile/page.tsx:48-54redirects the bare/profileroute to the signed-in user withtype=user. The legacy Report Activity route usestype=reportandid=-1;/usersis the separate personal-profile route. This changes the route semantics and hides the Report Runs, Stars, and Subscriptions sections. -
P1 — The required filter sidebar is empty:
frontend/components/profile/profile-filter-sidebar.tsx:20-32now 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. -
P2 — Real API failures do not reach the tested error state:
frontend/app/profile/actions.ts:60-79returns a populateddataobject witherror: nullfor forbidden, not-found, server-error, and service-unavailable responses, converting failed sections tonullor empty arrays. Consequently, the error branch infrontend/app/profile/page.tsx:70is 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
left a comment
There was a problem hiding this comment.
The latest commit resolves the API error-propagation issue, but two blockers from the previous review remain:
-
P1 — Bare
/profilestill resolves to the wrong profile.frontend/app/profile/page.tsxstill redirects to the signed-in user withtype=user. The legacy Report Activity route requirestype=reportandid=-1;/usersis the personal-profile route. This continues to hide Report Runs, Stars, and Subscriptions for the bare route. -
P1 — Required profile filters are still missing.
frontend/components/profile/profile-filter-sidebar.tsxremains 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.
What does this PR do?
Migrates the legacy Razor
/profileroute to a native Next.js page, fully utilizing the App Router.frontend/app/profile/page.tsxusing server-side data fetching for the initial load./profilerewrite rule fromnext.config.ts.ProfileFullViewas the main layout, wiring up the filter sidebar, date range dropdown, chart, and data tables.-) and an empty UI state, matching the old Razor layout perfectly.profile-full-view.test.tsxto handle loading, error, and empty states gracefully.Testing
npm run frontend:dev, and visit/profileto check out the migrated Next.js UI.Sceenshot