Skip to content

Combine /user and /profile pages#2547

Merged
Aibono1225 merged 6 commits intomainfrom
combine-user-and-profile-pages
Mar 27, 2026
Merged

Combine /user and /profile pages#2547
Aibono1225 merged 6 commits intomainfrom
combine-user-and-profile-pages

Conversation

@jakebayliss
Copy link
Copy Markdown
Member

@jakebayliss jakebayliss commented Mar 25, 2026

Description

We have very similar pages for the /profile and /user?author= routes. To clean this up and reduce code we want to combine these pages as differences between then were very small. Clicking the 'Last updated by ' will take user to the /user page instead of directly their GitHub profile.

Screenshot (optional)

Logged out - View user profile
image

Logged in - View own profile (includes Bookmarks)
image

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Consolidates the existing /profile and /user?author=<user> experiences into a single /user route, so the same page can render either a public user profile (by author) or the signed-in user’s own profile (including bookmarks).

Changes:

  • Removes the /profile route and migrates its UI (bookmarks/profile header) into app/user/client-page.tsx.
  • Updates internal navigation to point to /user (dropdown, “last updated by”, latest rules table).
  • Adjusts /user page metadata and server-side wrapper.

Reviewed changes

Copilot reviewed 7 out of 8 changed files in this pull request and generated 10 comments.

Show a summary per file
File Description
tina/tina-lock.json Updates Tina lockfile contents/version (appears unrelated to the routing consolidation).
components/last-updated-by/index.tsx Changes “Last updated by” link to point to the internal /user?author=... page.
components/auth/UserDropdown.tsx Repoints “SSW.Rules Profile” menu item from /profile to /user.
components/LatestRulesTable.tsx Changes author links from GitHub to internal /user?author=... navigation.
app/user/page.tsx Keeps /user as the wrapper page; updates metadata/title and continues passing ruleCount to the client page.
app/user/client-page.tsx Expands the /user client page to render profile header + bookmarks (own profile) and unify behavior with author-based profiles.
app/profile/page.tsx Deleted (profile functionality moved to /user).
app/profile/client-page.tsx Deleted (bookmark/profile UI moved to /user).
Comments suppressed due to low confidence (1)

app/user/client-page.tsx:92

  • This client-side fetch uses a relative URL (./api/...). Depending on whether the current URL ends with a trailing slash, this can resolve to /user/api/... instead of /api/... (and it also ignores the configured Next basePath). Prefer an absolute path prefixed with BASE_PATH (or a shared withBase helper) for API calls.
    const res = await fetch(`./api/crm/employees?query=${encodeURIComponent(queryStringRulesAuthor)}`);
    if (!res.ok) throw new Error("Failed to resolve author");
    const profile = await res.json();

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@Aibono1225
Copy link
Copy Markdown
Member

/deploy

@github-actions
Copy link
Copy Markdown
Contributor

PR Preview Deployed

Preview URL https://app-sswrules-staging-pr-2547.azurewebsites.net/rules
Slot Name pr-2547
Branch combine-user-and-profile-pages
Commit f275375c34ad3a77eff41d14154a3573717a8af9

This preview will be automatically deleted when the PR is closed.

@Aibono1225 Aibono1225 merged commit 343c25f into main Mar 27, 2026
@Aibono1225 Aibono1225 deleted the combine-user-and-profile-pages branch March 27, 2026 14:57
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.

3 participants