Skip to content

refactor(investor): rename sidebar nav items and routes#66

Merged
JoelVR17 merged 1 commit intoTrustless-Work:developfrom
andreMD287:develop
Mar 12, 2026
Merged

refactor(investor): rename sidebar nav items and routes#66
JoelVR17 merged 1 commit intoTrustless-Work:developfrom
andreMD287:develop

Conversation

@andreMD287
Copy link
Contributor

@andreMD287 andreMD287 commented Mar 12, 2026

Summary

  • Sidebar labels: "Manage Campaigns" → "Campaigns", "ROI" → "My investments"
  • Routes: /roi/my-investments
  • Structure: Removed app/roi/ and added app/my-investments/ with layout and page

Files changed

  • apps/investor-tokenization/src/features/roi/roi-dashboard-shell.tsx — Updated nav items (Campaigns, My investments) and route (/my-investments)
  • apps/investor-tokenization/src/components/shared/Sidebar.tsx — Updated labels and routes for consistency
  • apps/investor-tokenization/src/app/roi/ — Removed (layout, page)
  • apps/investor-tokenization/src/app/my-investments/ — Added (layout, page)

Summary by CodeRabbit

  • Navigation Updates
    • Refined sidebar menu labels for improved clarity.
    • Updated ROI navigation link to point to My Investments page.

@vercel
Copy link

vercel bot commented Mar 12, 2026

@andreMD287 is attempting to deploy a commit to the Trustless Work Team on Vercel.

A member of the Team first needs to authorize it.

@coderabbitai
Copy link

coderabbitai bot commented Mar 12, 2026

📝 Walkthrough

Walkthrough

Navigation labels and routes updated across sidebar and ROI dashboard components. "Manage Campaigns" label renamed to "Campaigns" in two files, and the ROI dashboard secondary navigation item redirected from "/roi" to "/my-investments" with label updated to "My investments".

Changes

Cohort / File(s) Summary
Navigation Updates
apps/investor-tokenization/src/components/shared/Sidebar.tsx, apps/investor-tokenization/src/features/roi/roi-dashboard-shell.tsx
Label "Manage Campaigns" changed to "Campaigns"; secondary nav item route and label updated from "/roi" (ROI) to "/my-investments" (My investments).

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related PRs

Suggested reviewers

  • armandocodecr
  • JoelVR17

Poem

🐰 A sidebar refresh, clear and bright,
Campaign labels shining light,
New routes guide the way,
My investments now have their say! ✨

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'refactor(investor): rename sidebar nav items and routes' directly aligns with the main changes: renaming sidebar labels and updating routes.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
📝 Coding Plan
  • Generate coding plan for human review comments

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
apps/investor-tokenization/src/components/shared/Sidebar.tsx (1)

15-24: ⚠️ Potential issue | 🟠 Major

Update the second sidebar item to the renamed route.

This array still points to /roi with label ROI, while the shell nav and the new app route use /my-investments. As written, this sidebar will send users to the removed route and never highlight the new page correctly.

🔧 Proposed fix
 const links: SidebarLink[] = [
   {
     href: "/campaigns",
     label: "Campaigns",
     icon: <Megaphone className="h-4 w-4" />,
   },
   {
-    href: "/roi",
-    label: "ROI",
+    href: "/my-investments",
+    label: "My investments",
     icon: <LineChart className="h-4 w-4" />,
   },
 ];
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@apps/investor-tokenization/src/components/shared/Sidebar.tsx` around lines 15
- 24, The second entry in the links array (type SidebarLink) still points to
href "/roi" with label "ROI" so update that object to use the new route and
label used by the shell and app: set href to "/my-investments" and change label
to "My Investments" (keep the existing LineChart icon if desired) so the sidebar
navigates to and highlights the new page correctly.
🧹 Nitpick comments (1)
apps/investor-tokenization/src/features/roi/roi-dashboard-shell.tsx (1)

13-16: Consider making the investor nav a single shared config.

ROI_NAV_ITEMS and apps/investor-tokenization/src/components/shared/Sidebar.tsx currently model the same navigation in parallel, and this PR already shows how easily they can drift. Moving the nav definition into one src/features/roi module and consuming it from both places would make future route/label renames much safer.

Based on learnings: Applies to apps/{backoffice-tokenization,investor-tokenization}/**/*.{ts,tsx} : Organize Next.js frontends using feature-based folder structure in src/features/.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@apps/investor-tokenization/src/features/roi/roi-dashboard-shell.tsx` around
lines 13 - 16, ROI_NAV_ITEMS is defined in roi-dashboard-shell.tsx but the same
navigation is duplicated in components/shared/Sidebar.tsx; extract a single
shared nav config (e.g., export const ROI_NAV_ITEMS or NAV_ITEMS) into a new
module under src/features/roi (for example index or nav.ts), update
roi-dashboard-shell.tsx to import that exported constant instead of defining it
locally, and update Sidebar.tsx to import the same constant so both components
consume the single source of truth; ensure the exported structure includes href,
label, and icon so existing usages (ROI_NAV_ITEMS, Sidebar) continue to work
without other code changes.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Outside diff comments:
In `@apps/investor-tokenization/src/components/shared/Sidebar.tsx`:
- Around line 15-24: The second entry in the links array (type SidebarLink)
still points to href "/roi" with label "ROI" so update that object to use the
new route and label used by the shell and app: set href to "/my-investments" and
change label to "My Investments" (keep the existing LineChart icon if desired)
so the sidebar navigates to and highlights the new page correctly.

---

Nitpick comments:
In `@apps/investor-tokenization/src/features/roi/roi-dashboard-shell.tsx`:
- Around line 13-16: ROI_NAV_ITEMS is defined in roi-dashboard-shell.tsx but the
same navigation is duplicated in components/shared/Sidebar.tsx; extract a single
shared nav config (e.g., export const ROI_NAV_ITEMS or NAV_ITEMS) into a new
module under src/features/roi (for example index or nav.ts), update
roi-dashboard-shell.tsx to import that exported constant instead of defining it
locally, and update Sidebar.tsx to import the same constant so both components
consume the single source of truth; ensure the exported structure includes href,
label, and icon so existing usages (ROI_NAV_ITEMS, Sidebar) continue to work
without other code changes.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: d50b726d-a342-41b8-babe-153f93d14f43

📥 Commits

Reviewing files that changed from the base of the PR and between d0fe1fa and 2df3c24.

📒 Files selected for processing (4)
  • apps/investor-tokenization/src/app/my-investments/layout.tsx
  • apps/investor-tokenization/src/app/my-investments/page.tsx
  • apps/investor-tokenization/src/components/shared/Sidebar.tsx
  • apps/investor-tokenization/src/features/roi/roi-dashboard-shell.tsx

@JoelVR17 JoelVR17 merged commit afe9f64 into Trustless-Work:develop Mar 12, 2026
1 of 2 checks passed
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