Skip to content

Project Analytics Config Page - #93

Merged
cursor[bot] merged 2 commits into
mainfrom
aishani/analytics-config-page
Sep 29, 2026
Merged

cursor[bot] merged 2 commits into
mainfrom
aishani/analytics-config-page

Conversation

@aishanibal

Copy link
Copy Markdown
Contributor
  • Add an Analytics entry to the project sidebar and a dedicated /proj…ects/[projectId]/analytics page for CRUD operations on project's analytics config only.
  • No Analytics Configuration card when none exist, matching the style of the file and email config pages.
  • getAnalyticsConfig returns null only on 404; throws 401 for auth failures and shows an error alert instead of looking like an empty state
  • Delete the config by the current projectId, not the table row id; only one config could be made which would always be row id = 0, passing 0 as the parameter in function that deletes configs by projectId (always deleted project 0 config id)
  • Move the analytics table out of Settings; point the project dashboard card at the new page; add the "Analytics" top bar title

@netlify

netlify Bot commented Sep 26, 2026 •

Copy link
Copy Markdown

✅ Deploy Preview for juno-dashboard ready!

Name Link
🔨 Latest commit 707cdad
🔍 Latest deploy log https://app.netlify.com/projects/juno-dashboard/deploys/6abc371a9f76e3000885108e
😎 Deploy Preview https://deploy-preview-93--juno-dashboard.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
🤖 Make changes Run an agent on this branch

To edit notification comments on pull requests, go to your Netlify project configuration.

@greptile-apps

greptile-apps Bot commented Sep 26, 2026 •

Copy link
Copy Markdown
Contributor

Disclaimer: This comment was AI-generated and is not necessarily completely accurate. Please take code comments with a grain of salt.

RetriggerConfidence Score: 4/5

[Medium risk] Moves analytics configuration to a dedicated page.

The PR appears safe to merge, with non-blocking mobile-layout, theme-color, and notification-lifecycle improvements recommended.

Findings

  1. P2 Empty card too narrow ▶
  2. P2 Alert colors bypass theme ▶
  3. P2 Error toast repeats ▶

Summary

The PR moves analytics configuration from project Settings to a dedicated Analytics page, adds navigation to it, and distinguishes missing configuration from an analytics API authorization error.

  • Checklist areas to improve: mobile empty-state sizing, theme-based alert colors, and error-toast lifecycle.
  • Review score: 82/100. Lint and build results were not verified.
Diagram
%%{init: {'theme': 'neutral'}}%%
flowchart LR
  A[Project dashboard or sidebar] --> B[Project Analytics page]
  B --> C[Fetch analytics config]
  C -->|404| D[Setup card]
  C -->|401 or other error| E[Error alert]
  C -->|Config found| F[Configuration table]
  D --> G[Create config]
  F --> H[Update or delete config]
Loading

Reviews (1) · Last reviewed commit: "- Add an Analytics entry to the project ..."

</Alert>
)}
{isError ? null : !isLoading && analyticsConfigRowData.length === 0 ? (
<Card className="max-w-[35%]">

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

P2 Empty card too narrow On a mobile screen, max-w-[35%] limits the card to roughly a third of the available width. That squeezes the explanation and setup button into a narrow column. Let the card use the available width on mobile and constrain it only on larger screens.

Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!

Comment on lines +163 to +164
<Alert className="border-red-500/20 bg-red-500/10">
<div className="flex items-center gap-2 text-red-400">

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

P2 Alert colors bypass theme The new error alert hardcodes red border, background, and text colors, so it will not follow changes to the configured destructive theme colors. Use the existing destructive alert styling instead.

Suggested change
<Alert className="border-red-500/20 bg-red-500/10">
<div className="flex items-center gap-2 text-red-400">
<Alert variant="destructive">
<div className="flex items-center gap-2">

Comment on lines +33 to +37
if (isError) {
toast.error("Error", {
description: `Failed to fetch project: ${JSON.stringify(error)}`,
});
}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

P2 Error toast repeats When the project query fails, this call runs on every render while the query remains in an error state. A refetch or unrelated rerender can therefore show duplicate error toasts. Trigger the notification when the error state changes instead.

…ects/[projectId]/analytics page for CRUD operations on project's analytics config only.

- No Analytics Configuration card when none exist, matching the style of the file and email config pages.
- getAnalyticsConfig returns null only on 404; throws 401 for auth failures and shows an error alert instead of looking like an empty state
- Delete the config by the current projectId, not the table row id; only one config could be made which would always be row id = 0, passing 0 as the parameter in function that deletes configs by projectId (always deleted project 0 config id)
- Move the analytics table out of Settings; point the project dashboard card at the new page; add the "Analytics" top bar title
@cursor
cursor Bot force-pushed the aishani/analytics-config-page branch from a36be6c to 5a80410 Compare September 29, 2026 22:07
- Move toast.error calls from render path to useEffect hooks in analytics page and table
- Use Alert variant='destructive' instead of hardcoded red colors
- Improve delete dialog copy to clarify it deletes this project's config
- Make empty-state card responsive (full width on mobile, max-w-md on larger screens)

Co-authored-by: Rohan Godha <hi@rohangodha.com>
@cursor
cursor Bot force-pushed the aishani/analytics-config-page branch from 5a80410 to 707cdad Compare September 29, 2026 22:09
@cursor
cursor Bot merged commit e63f509 into main Sep 29, 2026
5 checks passed
@cursor
cursor Bot deleted the aishani/analytics-config-page branch September 29, 2026 22:11
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.

2 participants