Skip to content

Conversation

@andypols
Copy link
Contributor

@andypols andypols commented Nov 3, 2025

Summary

This PR addresses #1264, fixing broken user profile links and improving maintainability by centralising user navigation into a reusable component.

Problem:

User profile links across the application were pointing to /dashboard/user/:id, while the actual route was configured as /dashboard/admin/user/:id. This mismatch caused broken navigation in the Reviewers, Contributors, and Push Details sections.

Additionally, using the /dashboard/admin/user/:id route prevented non-admin users from accessing these links due to uiRouteAuth restrictions.

Solution

  • Fixed route mismatch: Updated the user detail route from /dashboard/admin/user/:id to /dashboard/user/:id to align with existing usage.
  • Introduced UserLink component: Added a reusable React component that uses React Router’s Link for client-side navigation, eliminating full page reloads and improving user experience.
  • Centralised user links: Replaced hardcoded user anchor tags in RepoDetails and PushDetails with the new UserLink component, ensuring future route changes require updates in only one place.

The UserLink component supports both simple usage (<UserLink username={user} />) and custom children for wrapping images or displaying alternate text.

@netlify
Copy link

netlify bot commented Nov 3, 2025

Deploy Preview for endearing-brigadeiros-63f9d0 canceled.

Name Link
🔨 Latest commit c445266
🔍 Latest deploy log https://app.netlify.com/projects/endearing-brigadeiros-63f9d0/deploys/6909cbede94d6a0008a24d0c

@github-actions github-actions bot added the fix label Nov 3, 2025
@andypols andypols requested a review from jescalada November 3, 2025 12:40
@andypols andypols changed the title fix: fix broken user links fix: broken user links Nov 3, 2025
@codecov
Copy link

codecov bot commented Nov 3, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 83.36%. Comparing base (6dc22e9) to head (c445266).
⚠️ Report is 6 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #1268   +/-   ##
=======================================
  Coverage   83.36%   83.36%           
=======================================
  Files          70       70           
  Lines        3005     3005           
  Branches      499      499           
=======================================
  Hits         2505     2505           
  Misses        397      397           
  Partials      103      103           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@jescalada
Copy link
Contributor

@andypols I fixed up some remaining user links, should be good to merge after a final check on your side!

Copy link
Contributor

@jescalada jescalada left a comment

Choose a reason for hiding this comment

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

LGTM after my fixes are reviewed!

I replaced the a tags in the AttestationView component to use UserLinks instead, and also adjusted a link on UserList which used the old format.

I'll be adding dynamic URLs for uiRouteAuth-defined admin routes down the line.

@andypols
Copy link
Contributor Author

andypols commented Nov 5, 2025

@jescalada Nice one. LGTM

@jescalada jescalada merged commit 97b6127 into finos:main Nov 5, 2025
14 checks passed
@andypols andypols deleted the fix-broken-user-links branch November 5, 2025 17:12
@kriswest kriswest linked an issue Nov 18, 2025 that may be closed by this pull request
@kriswest kriswest mentioned this pull request Nov 18, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Fix broken user links

2 participants