-
-
Notifications
You must be signed in to change notification settings - Fork 704
Tooltip to explain dev schedules not counting towards your limit #2004
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. Weβll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
WalkthroughThe changes update the UI for displaying schedule usage limits within a specific project environment route. The header text indicating schedule usage is now wrapped in a styled header component and accompanied by an informational tooltip explaining that schedules created in the "Dev" environment do not count toward the usage limit. The "Upgrade" button's icon styling is also enhanced. No changes were made to the control flow or public API. Changes
Poem
β¨ Finishing Touches
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. πͺ§ TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed 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)
Other keywords and placeholders
CodeRabbit Configuration File (
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
π§Ή Nitpick comments (1)
apps/webapp/app/routes/_app.orgs.$organizationSlug.projects.$projectParam.env.$envParam.schedules/route.tsx (1)
290-290
: Use a semantic color token for the upgrade icon
Hardcoding"text-indigo-500"
ties the styling to a specific Tailwind color. Consider using a semantic or theme token (e.g.,text-primary
or a design-system variable) to keep theming consistent and maintainable.
π Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
π Files selected for processing (1)
apps/webapp/app/routes/_app.orgs.$organizationSlug.projects.$projectParam.env.$envParam.schedules/route.tsx
(2 hunks)
β° Context from checks skipped due to timeout of 90000ms (7)
- GitHub Check: e2e / π§ͺ CLI v3 tests (windows-latest - pnpm)
- GitHub Check: e2e / π§ͺ CLI v3 tests (windows-latest - npm)
- GitHub Check: e2e / π§ͺ CLI v3 tests (ubuntu-latest - pnpm)
- GitHub Check: e2e / π§ͺ CLI v3 tests (ubuntu-latest - npm)
- GitHub Check: typecheck / typecheck
- GitHub Check: units / π§ͺ Unit Tests
- GitHub Check: Analyze (javascript-typescript)
π Additional comments (2)
apps/webapp/app/routes/_app.orgs.$organizationSlug.projects.$projectParam.env.$envParam.schedules/route.tsx (2)
41-41
: Importing the new Tooltip component
The addition ofInfoIconTooltip
alongsideSimpleTooltip
is correct and aligns with the new UI requirement. Both imports are utilized in this file.
277-283
:β Verification inconclusive
Conditional Tooltip Display for Dev Environment
The tooltip textβ"Schedules created in Dev don't count towards your limit."βshould only appear when viewing the Dev environment. Currently it renders in all environments, which may confuse users in Production or other stages. Please guard this block by checking the environment slug (e.g.,environment.slug === 'dev'
) or the route param.Proposed diff:
- <div className="flex items-center gap-1"> - <Header3> - You've used {limits.used}/{limits.limit} of your schedules - </Header3> - <InfoIconTooltip content="Schedules created in Dev don't count towards your limit." /> - </div> + {environment.slug === 'dev' ? ( + <div className="flex items-center gap-1"> + <Header3> + You've used {limits.used}/{limits.limit} of your schedules + </Header3> + <InfoIconTooltip content="Schedules created in Dev don't count towards your limit." /> + </div> + ) : ( + <Header3> + You've used {limits.used}/{limits.limit} of your schedules + </Header3> + )}Please verify that
environment.slug
correctly identifies the Dev environment (e.g., equals"dev"
), or adjust to match your environment schema.
π Script executed:
#!/bin/bash set -e # Locate the schedules route.tsx file in the webapp routes FILE=$(fd -t f route.tsx apps/webapp/app/routes | grep schedules || true) if [ -z "$FILE" ]; then echo "No schedules route.tsx found" exit 0 fi echo "Found schedules route file: $FILE" # Display lines around where the tooltip appears for context (lines ~250β290) sed -n '250,290p' "$FILE"Length of output: 3750
π Script executed:
#!/bin/bash set -e # Locate the base schedules list route file under env.*.schedules FILE=$(fd route.tsx apps/webapp/app/routes -t f | grep '/env\.[^/]*\.schedules/route.tsx$' | head -n1) if [ -z "$FILE" ]; then echo "No base schedules route.tsx found under env.*.schedules" exit 1 fi echo "Using file: $FILE" echo echo "=== Snippet around InfoIconTooltip ===" grep -n "InfoIconTooltip" "$FILE" | while IFS=: read -r lineno _; do start=$((lineno-3>1?lineno-3:1)) end=$((lineno+3)) sed -n "${start},${end}p" "$FILE" done echo echo "=== References to environment.slug ===" grep -n "environment\.slug" "$FILE" || echo "No environment.slug references found"Length of output: 262
π Script executed:
#!/bin/bash set -e echo "Searching for schedules list route.tsx files..." rg "/schedules/route.tsx$" -l apps/webapp/app/routes | while read -r file; do echo "File: $file" echo "----- Snippet around InfoIconTooltip -----" grep -n "InfoIconTooltip" "$file" | while IFS=: read -r ln _; do start=$((ln-2>1?ln-2:1)) end=$((ln+2)) sed -n "${start},${end}p" "$file" done || echo "(no InfoIconTooltip in this file)" echo echo "----- Snippet around environment loader/definition -----" # Show first 100 lines to find environment loading sed -n '1,100p' "$file" | grep -nE "envParam|environment" echo doneLength of output: 183
π Script executed:
#!/bin/bash set -e echo "Locating Dev tooltip usage..." # Find files containing the exact tooltip text TOOLTIP_FILES=$(rg -l "Schedules created in Dev don't count" apps/webapp/app/routes) if [ -z "$TOOLTIP_FILES" ]; then echo "No occurrences of the Dev tooltip text found." exit 0 fi for file in $TOOLTIP_FILES; do echo "File: $file" echo "----- Snippet around tooltip -----" rg -n "Schedules created in Dev don't count" -C 3 "$file" echo doneLength of output: 1288
π Script executed:
#!/bin/bash set -e # Locate the base schedules list route.tsx (not edit/new) FILE=$(find apps/webapp/app/routes -type f | grep '/env\.[^/]*\.schedules/route\.tsx$' | head -n1) if [ -z "$FILE" ]; then echo "Error: Could not find the base schedules list route.tsx file." exit 1 fi echo "Using file: $FILE" echo echo "==== Lines 1-200 (loader and data fetching) ====" sed -n '1,200p' "$FILE" echo echo "==== References to envParam, environment, useLoaderData, loader ====" grep -nE "(envParam|environment|useLoaderData|loader)" "$FILE" || echo "(no matches found)"Length of output: 270
Conditional Dev Tooltip: Render InfoIconTooltip only for Dev environment
Currently the Dev-specific tooltip displays in all environments, which may confuse Production users. Wrap the tooltip (and its container) in a conditional that checks your environment identifier (e.g.environment.slug === 'dev'
or your route paramenvParam === 'dev'
). For example:- <div className="flex items-center gap-1"> - <Header3> - You've used {limits.used}/{limits.limit} of your schedules - </Header3> - <InfoIconTooltip content="Schedules created in Dev don't count towards your limit." /> - </div> + {environment.slug === 'dev' ? ( + <div className="flex items-center gap-1"> + <Header3> + You've used {limits.used}/{limits.limit} of your schedules + </Header3> + <InfoIconTooltip content="Schedules created in Dev don't count towards your limit." /> + </div> + ) : ( + <Header3> + You've used {limits.used}/{limits.limit} of your schedules + </Header3> + )}Please verify that
environment.slug
(or the equivalentenvParam
/params.envParam
) correctly represents your Dev environment in this route.
A small update to make it clear why it might say "You've used 0/x of your schedules" while you're in Dev, where you might have created some.
I've added a tooltip to explain schedules in Dev don't count towards your schedules limit.
Summary by CodeRabbit
New Features
Style