Skip to content

Conversation

HouseinIsProgramming
Copy link
Collaborator

@HouseinIsProgramming HouseinIsProgramming commented Aug 1, 2025

Description

Changes the name and Ids of the formerly named "Dashboard" nav menu item to "Insights"

Screenshots

image

Checklist

📌 Always:

  • I have set a clear title
  • My PR is small and contains a single feature
  • I have checked my own PR

👍 Most of the time:

  • I have added or updated test cases
  • I have updated the README if needed

Summary by CodeRabbit

  • Refactor

    • Updated all references of "Dashboard" to "Insights" across the dashboard interface, including page titles, navigation menu, and breadcrumb labels.
  • Tests

    • Adjusted automated tests to verify successful login by checking for "Insights" instead of "Dashboard".

Copy link

vercel bot commented Aug 1, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated (UTC)
docs ✅ Ready (Inspect) Visit Preview Aug 1, 2025 1:32pm

Copy link
Contributor

coderabbitai bot commented Aug 1, 2025

Walkthrough

The changes update the terminology across the dashboard application from "Dashboard" to "Insights." This includes modifying selectors, breadcrumb labels, component props, page titles, and navigation menu configurations to consistently use "Insights" instead of "Dashboard." No logic, control flow, or public API signatures were changed.

Changes

Cohort / File(s) Change Summary
Dashboard Test Script Selector Update
.github/workflows/scripts/dashboard-tests.js
Changed the login success selector from <h1>Dashboard</h1> to <h1>Insights</h1>.
Breadcrumb Label Update
packages/dashboard/src/app/routes/_authenticated.tsx
Updated breadcrumb label from "Dashboard" to "Insights" in the loader function.
Component and Page Title Update
packages/dashboard/src/app/routes/_authenticated/index.tsx
Changed Page prop and PageTitle content from "Dashboard" to "Insights".
Navigation Menu Update
packages/dashboard/src/lib/framework/defaults.ts
Updated navigation section ID and title from "dashboard" to "insights".

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~2 minutes


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
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Explain this complex logic.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai explain this code block.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and explain its main purpose.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai generate unit tests to generate unit tests for this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@HouseinIsProgramming HouseinIsProgramming marked this pull request as ready for review August 1, 2025 13:30
Copy link

sonarqubecloud bot commented Aug 1, 2025

Copy link
Contributor

@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.

Actionable comments posted: 1

🧹 Nitpick comments (3)
packages/dashboard/src/lib/framework/defaults.ts (1)

21-22: Icon still reflects “dashboard” concept

If the renaming intends to distinguish Insights from the former generic dashboard, consider swapping LayoutDashboardIcon for something analytics-oriented (e.g. BarChart3).
Purely cosmetic, but improves UX consistency.

packages/dashboard/src/app/routes/_authenticated.tsx (1)

18-19: Breadcrumb label is hard-coded, bypassing i18n guidelines

The dashboard package guideline requires user-visible strings to go through Trans/useLingui().
Existing code was already non-compliant, but updating the string is a good chance to fix it:

-    breadcrumb: 'Insights',
+    breadcrumb: i18n._(t`Insights`),

(if i18n is in scope).

packages/dashboard/src/app/routes/_authenticated/index.tsx (1)

170-173: Page title string bypasses i18n layer

Same remark as for the breadcrumb: wrap “Insights” with Trans or t to satisfy the localization rule.

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between ae7828f and e7fb167.

📒 Files selected for processing (4)
  • .github/workflows/scripts/dashboard-tests.js (1 hunks)
  • packages/dashboard/src/app/routes/_authenticated.tsx (1 hunks)
  • packages/dashboard/src/app/routes/_authenticated/index.tsx (1 hunks)
  • packages/dashboard/src/lib/framework/defaults.ts (1 hunks)
🧰 Additional context used
📓 Path-based instructions (5)
packages/dashboard/src/**/*.{tsx,jsx}

📄 CodeRabbit Inference Engine (.cursor/rules/dashboard.mdc)

packages/dashboard/src/**/*.{tsx,jsx}: Use React for all UI components in the dashboard package.
Prefer re-using components from /src/lib/components, especially Shadcn components from /src/lib/components/ui.
Prefer using the FormFieldWrapper component for forms over raw Shadcn components.
All labels or user-facing messages should use localization via the Trans component or useLingui().

Files:

  • packages/dashboard/src/app/routes/_authenticated.tsx
  • packages/dashboard/src/app/routes/_authenticated/index.tsx
packages/dashboard/src/**/*.{ts,tsx}

📄 CodeRabbit Inference Engine (.cursor/rules/dashboard.mdc)

packages/dashboard/src/**/*.{ts,tsx}: Use TanStack Query (useQuery or useMutation) for data fetching; do not use Apollo Client.
When creating useQuery calls, follow the provided pattern: import { api } from '@/graphql/api.js'; import { graphql } from '@/graphql/graphql.js'; use useQuery with queryKey, staleTime, and queryFn using api.query.
When performing mutations, follow the provided useMutation pattern: use graphql() for the mutation document, api.mutate for mutationFn, and do not pass variables at declaration.

Files:

  • packages/dashboard/src/app/routes/_authenticated.tsx
  • packages/dashboard/src/lib/framework/defaults.ts
  • packages/dashboard/src/app/routes/_authenticated/index.tsx
packages/dashboard/src/app/routes/**/*.tsx

📄 CodeRabbit Inference Engine (.cursor/rules/dashboard.mdc)

Use TanStack Router for all routing and navigation in the dashboard app.

Files:

  • packages/dashboard/src/app/routes/_authenticated.tsx
  • packages/dashboard/src/app/routes/_authenticated/index.tsx
packages/dashboard/src/app/routes/**

📄 CodeRabbit Inference Engine (.cursor/rules/dashboard.mdc)

Do not create new directories or files in /src/app/routes/ that do not fit the pattern: route files (except those in /components, /hooks, or ending with .graphql.ts).

Files:

  • packages/dashboard/src/app/routes/_authenticated.tsx
  • packages/dashboard/src/app/routes/_authenticated/index.tsx
packages/dashboard/src/**/*.{tsx,ts}

📄 CodeRabbit Inference Engine (.cursor/rules/dashboard.mdc)

React component props objects should be typed as Readonly<...>.

Files:

  • packages/dashboard/src/app/routes/_authenticated.tsx
  • packages/dashboard/src/lib/framework/defaults.ts
  • packages/dashboard/src/app/routes/_authenticated/index.tsx
🧠 Learnings (11)
📓 Common learnings
Learnt from: CR
PR: vendure-ecommerce/vendure#0
File: .cursor/rules/dashboard.mdc:0-0
Timestamp: 2025-07-23T07:05:04.344Z
Learning: Applies to packages/dashboard/src/**/*.{tsx,jsx} : Use React for all UI components in the dashboard package.
Learnt from: CR
PR: vendure-ecommerce/vendure#0
File: .cursor/rules/dashboard.mdc:0-0
Timestamp: 2025-07-23T07:05:04.344Z
Learning: Applies to packages/dashboard/src/**/*.{tsx,jsx} : All labels or user-facing messages should use localization via the Trans component or useLingui().
Learnt from: CR
PR: vendure-ecommerce/vendure#0
File: .cursor/rules/dashboard.mdc:0-0
Timestamp: 2025-07-23T07:05:04.344Z
Learning: Applies to packages/dashboard/src/**/*.{tsx,jsx} : Prefer re-using components from /src/lib/components, especially Shadcn components from /src/lib/components/ui.
Learnt from: CR
PR: vendure-ecommerce/vendure#0
File: .cursor/rules/dashboard.mdc:0-0
Timestamp: 2025-07-23T07:05:04.344Z
Learning: Applies to packages/dashboard/src/lib/components/**/*.{tsx,jsx} : Use Shadcn UI and Tailwind CSS for UI components.
📚 Learning: applies to packages/dashboard/src/app/routes/**/*.tsx : use tanstack router for all routing and navi...
Learnt from: CR
PR: vendure-ecommerce/vendure#0
File: .cursor/rules/dashboard.mdc:0-0
Timestamp: 2025-07-23T07:05:04.344Z
Learning: Applies to packages/dashboard/src/app/routes/**/*.tsx : Use TanStack Router for all routing and navigation in the dashboard app.

Applied to files:

  • packages/dashboard/src/app/routes/_authenticated.tsx
  • packages/dashboard/src/lib/framework/defaults.ts
  • packages/dashboard/src/app/routes/_authenticated/index.tsx
📚 Learning: applies to packages/dashboard/src/**/*.{tsx,jsx} : all labels or user-facing messages should use loc...
Learnt from: CR
PR: vendure-ecommerce/vendure#0
File: .cursor/rules/dashboard.mdc:0-0
Timestamp: 2025-07-23T07:05:04.344Z
Learning: Applies to packages/dashboard/src/**/*.{tsx,jsx} : All labels or user-facing messages should use localization via the Trans component or useLingui().

Applied to files:

  • packages/dashboard/src/app/routes/_authenticated.tsx
  • packages/dashboard/src/lib/framework/defaults.ts
  • packages/dashboard/src/app/routes/_authenticated/index.tsx
📚 Learning: applies to packages/dashboard/src/app/routes/** : do not create new directories or files in /src/app...
Learnt from: CR
PR: vendure-ecommerce/vendure#0
File: .cursor/rules/dashboard.mdc:0-0
Timestamp: 2025-07-23T07:05:04.344Z
Learning: Applies to packages/dashboard/src/app/routes/** : Do not create new directories or files in /src/app/routes/ that do not fit the pattern: route files (except those in /components, /hooks, or ending with .graphql.ts).

Applied to files:

  • packages/dashboard/src/app/routes/_authenticated.tsx
  • packages/dashboard/src/app/routes/_authenticated/index.tsx
📚 Learning: applies to packages/dashboard/src/**/*.{tsx,jsx} : use react for all ui components in the dashboard ...
Learnt from: CR
PR: vendure-ecommerce/vendure#0
File: .cursor/rules/dashboard.mdc:0-0
Timestamp: 2025-07-23T07:05:04.344Z
Learning: Applies to packages/dashboard/src/**/*.{tsx,jsx} : Use React for all UI components in the dashboard package.

Applied to files:

  • packages/dashboard/src/app/routes/_authenticated.tsx
  • packages/dashboard/src/lib/framework/defaults.ts
  • packages/dashboard/src/app/routes/_authenticated/index.tsx
📚 Learning: applies to packages/dashboard/src/**/*.{ts,tsx} : use tanstack query (usequery or usemutation) for d...
Learnt from: CR
PR: vendure-ecommerce/vendure#0
File: .cursor/rules/dashboard.mdc:0-0
Timestamp: 2025-07-23T07:05:04.344Z
Learning: Applies to packages/dashboard/src/**/*.{ts,tsx} : Use TanStack Query (useQuery or useMutation) for data fetching; do not use Apollo Client.

Applied to files:

  • packages/dashboard/src/app/routes/_authenticated.tsx
  • packages/dashboard/src/app/routes/_authenticated/index.tsx
📚 Learning: applies to packages/dashboard/src/**/*.{tsx,jsx} : prefer re-using components from /src/lib/componen...
Learnt from: CR
PR: vendure-ecommerce/vendure#0
File: .cursor/rules/dashboard.mdc:0-0
Timestamp: 2025-07-23T07:05:04.344Z
Learning: Applies to packages/dashboard/src/**/*.{tsx,jsx} : Prefer re-using components from /src/lib/components, especially Shadcn components from /src/lib/components/ui.

Applied to files:

  • packages/dashboard/src/app/routes/_authenticated.tsx
  • packages/dashboard/src/lib/framework/defaults.ts
  • packages/dashboard/src/app/routes/_authenticated/index.tsx
📚 Learning: applies to packages/dashboard/src/lib/components/**/*.{tsx,jsx} : use shadcn ui and tailwind css for...
Learnt from: CR
PR: vendure-ecommerce/vendure#0
File: .cursor/rules/dashboard.mdc:0-0
Timestamp: 2025-07-23T07:05:04.344Z
Learning: Applies to packages/dashboard/src/lib/components/**/*.{tsx,jsx} : Use Shadcn UI and Tailwind CSS for UI components.

Applied to files:

  • packages/dashboard/src/app/routes/_authenticated.tsx
  • packages/dashboard/src/lib/framework/defaults.ts
  • packages/dashboard/src/app/routes/_authenticated/index.tsx
📚 Learning: applies to packages/dashboard/src/**/*.{tsx,ts} : react component props objects should be typed as r...
Learnt from: CR
PR: vendure-ecommerce/vendure#0
File: .cursor/rules/dashboard.mdc:0-0
Timestamp: 2025-07-23T07:05:04.344Z
Learning: Applies to packages/dashboard/src/**/*.{tsx,ts} : React component props objects should be typed as Readonly<...>.

Applied to files:

  • packages/dashboard/src/app/routes/_authenticated.tsx
  • packages/dashboard/src/app/routes/_authenticated/index.tsx
📚 Learning: applies to packages/dashboard/src/**/*.{ts,tsx} : when performing mutations, follow the provided use...
Learnt from: CR
PR: vendure-ecommerce/vendure#0
File: .cursor/rules/dashboard.mdc:0-0
Timestamp: 2025-07-23T07:05:04.344Z
Learning: Applies to packages/dashboard/src/**/*.{ts,tsx} : When performing mutations, follow the provided useMutation pattern: use graphql() for the mutation document, api.mutate for mutationFn, and do not pass variables at declaration.

Applied to files:

  • packages/dashboard/src/app/routes/_authenticated/index.tsx
📚 Learning: applies to packages/dashboard/src/**/*.{ts,tsx} : when creating usequery calls, follow the provided ...
Learnt from: CR
PR: vendure-ecommerce/vendure#0
File: .cursor/rules/dashboard.mdc:0-0
Timestamp: 2025-07-23T07:05:04.344Z
Learning: Applies to packages/dashboard/src/**/*.{ts,tsx} : When creating useQuery calls, follow the provided pattern: import { api } from '@/graphql/api.js'; import { graphql } from '@/graphql/graphql.js'; use useQuery with queryKey, staleTime, and queryFn using api.query.

Applied to files:

  • packages/dashboard/src/app/routes/_authenticated/index.tsx
🧬 Code Graph Analysis (1)
packages/dashboard/src/app/routes/_authenticated/index.tsx (1)
packages/dashboard/src/lib/framework/layout-engine/page-layout.tsx (2)
  • Page (48-76)
  • PageTitle (258-260)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (5)
  • GitHub Check: publish_install (ubuntu-latest, 22.x)
  • GitHub Check: publish_install (windows-latest, 24.x)
  • GitHub Check: unit tests (20.x)
  • GitHub Check: unit tests (22.x)
  • GitHub Check: build (22.x)
🔇 Additional comments (2)
packages/dashboard/src/app/routes/_authenticated/index.tsx (1)

170-173: pageId change may orphan stored widget layouts

Widget positions are keyed by pageId.
Users who customised their dashboard will lose their layout when the key switches from "dashboard" to "insights".

Provide a migration (e.g. copy layouts where key === 'dashboard' to 'insights') or fall back to the old key if none found.

.github/workflows/scripts/dashboard-tests.js (1)

73-74: Selector array now only contains one option – keep the fallback pattern

You removed the "Dashboard" selector but left the helper logic that iterates over multiple selectors.
No action required, but note that dashboardSelectors can be simplified to a single waitForSelector call if no alternates are needed.

Comment on lines +21 to +22
id: 'insights',
title: 'Insights',
Copy link
Contributor

Choose a reason for hiding this comment

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

💡 Verification agent

🧩 Analysis chain

Changing the id from dashboard to insights may break 3rd-party extensions persisting menu-section IDs

Several plugins and saved user preferences (e.g. pinned items, collapsed state) reference the section by its id.
Renaming the ID is a silent breaking change because no migration path exists for persisted data or extension points that still look up dashboard.

Consider either:

 {
-    id: 'insights',
+    id: 'insights',
+    legacyIds: ['dashboard'], // ← allow lookup/migration

or adding a one-time migration that rewrites stored section IDs.


🏁 Script executed:

#!/usr/bin/env bash
# Find uses of the old section id in the repo – extension authors often hard-code it.
rg --no-heading --line-number $'"dashboard"' | head

Length of output: 883


Ensure backward-compatibility for the renamed menu-section ID

We searched the codebase for "dashboard" and only found translation keys—no code logic still references the old section ID. To prevent breaking third-party plugins and persisted user prefs (e.g. pinned items, collapsed state), please update the section definition in
packages/dashboard/src/lib/framework/defaults.ts (around lines 21–22):

 {
     id: 'insights',
+    legacyIds: ['dashboard'],   // ← support lookup/migration of the old ID
     title: 'Insights',

Alternatively, implement a one-time migration to rewrite stored section IDs from "dashboard" to "insights".

📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
id: 'insights',
title: 'Insights',
id: 'insights',
+ legacyIds: ['dashboard'], // ← support lookup/migration of the old ID
title: 'Insights',
🤖 Prompt for AI Agents
In packages/dashboard/src/lib/framework/defaults.ts around lines 21 to 22, the
menu-section ID was renamed from "dashboard" to "insights", which may break
third-party plugins and user preferences relying on the old ID. To fix this,
keep the new ID as "insights" but add backward-compatibility by either retaining
the old "dashboard" ID as an alias or implement a one-time migration script that
updates stored section IDs from "dashboard" to "insights" in user data. This
ensures existing references do not break while using the new ID going forward.

@michaelbromley michaelbromley merged commit d1e5da7 into minor Aug 1, 2025
36 of 39 checks passed
@michaelbromley michaelbromley deleted the change-dashboard-to-insights branch August 1, 2025 13:39
@github-actions github-actions bot locked and limited conversation to collaborators Aug 1, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants