Skip to content

Comments

assistant: add all rules disabled banner#1205

Merged
elie222 merged 5 commits intomainfrom
feat/all-rules-disabled-banner
Jan 5, 2026
Merged

assistant: add all rules disabled banner#1205
elie222 merged 5 commits intomainfrom
feat/all-rules-disabled-banner

Conversation

@elie222
Copy link
Owner

@elie222 elie222 commented Jan 5, 2026

User description

Add a banner to the AI Assistant page that appears when all rules are disabled, directing users to restart the onboarding process.

  • Created AllRulesDisabledBanner client component.
  • Added blue variant to ActionCard component.
  • Integrated banner into AutomationPage with proper spacing.
  • Added ActionCard examples to the components gallery.
  • Marked Alert component as deprecated.

Summary by CodeRabbit

  • New Features

    • Added a banner on the Automation page prompting setup when all automation rules are disabled.
  • UI Improvements

    • Extended ActionCard with new visual variants (blue and destructive).
    • Added loading feedback during onboarding step transitions.
  • Bug Fixes

    • Improved AI rate-limit detection and messaging to cover multiple AI providers (now labeled as AI quota issues).
  • Deprecation

    • Marked Alert components as deprecated in favor of ActionCard.

✏️ Tip: You can customize this high-level summary in your review settings.


Generated description

Below is a concise technical summary of the changes proposed in this PR:

graph LR
handleError_("handleError"):::modified
isAiQuotaExceededError_("isAiQuotaExceededError"):::added
checkCommonErrors_("checkCommonErrors"):::modified
AllRulesDisabledBanner_("AllRulesDisabledBanner"):::added
ActionCard_("ActionCard"):::modified
AutomationPage_("AutomationPage"):::modified
useRules_hook_call_("useRules (hook call)"):::added
useAccount_hook_call_("useAccount (hook call)"):::added
handleError_ -- "Detects AI quota errors instead of OpenAI retry; shows notification." --> isAiQuotaExceededError_
checkCommonErrors_ -- "Classifies RetryError as AI quota and returns 429." --> isAiQuotaExceededError_
AllRulesDisabledBanner_ -- "Renders blue ActionCard banner with setup action link." --> ActionCard_
AutomationPage_ -- "Inserts AllRulesDisabledBanner into AutomationPage above tabs." --> AllRulesDisabledBanner_
AllRulesDisabledBanner_ -- "Fetches user rules via useRules to detect all-disabled." --> useRules_hook_call_
AllRulesDisabledBanner_ -- "Uses useAccount to obtain emailAccountId for onboarding link." --> useAccount_hook_call_
classDef added stroke:#15AA7A
classDef removed stroke:#CD5270
classDef modified stroke:#EDAC4C
linkStyle default stroke:#CBD5E1,font-size:13px
Loading

Introduces an AllRulesDisabledBanner component on the AI Assistant page to inform users when all rules are disabled, guiding them to restart the onboarding process. Enhances the ActionCard component with new visual variants and refactors AI quota error handling for broader AI provider support.

TopicDetails
AI Assistant Onboarding Adds a banner to the AI Assistant page that appears when all rules are disabled, directing users to restart the onboarding process to enable rules. This includes the creation of the AllRulesDisabledBanner component and its integration into the AutomationPage, along with adding Suspense to the onboarding page for improved loading feedback.
Modified files (3)
  • apps/web/app/(app)/[emailAccountId]/assistant/AllRulesDisabledBanner.tsx
  • apps/web/app/(app)/[emailAccountId]/clean/onboarding/page.tsx
  • apps/web/app/(app)/[emailAccountId]/automation/page.tsx
Latest Contributors(2)
UserCommitDate
elie222fix-resolve-React-hook...January 05, 2026
mojkakec12345@gmail.comfix-all-commentsJuly 11, 2025
UI & Error Handling Extends the ActionCard component with new blue and destructive variants, adds examples for these new variants to the components gallery, and marks the Alert component as deprecated in favor of ActionCard. Additionally, refactors AI quota error detection to be more generic, changing OPENAI_RETRY_ERROR to AI_QUOTA_ERROR to cover multiple AI providers.
Modified files (7)
  • apps/web/utils/actions/settings.ts
  • apps/web/utils/error.ts
  • apps/web/utils/llms/index.ts
  • apps/web/app/(landing)/components/page.tsx
  • apps/web/components/ui/card.tsx
  • apps/web/utils/error-messages/index.ts
  • apps/web/components/ui/alert.tsx
Latest Contributors(2)
UserCommitDate
elie222fix-web-truncate-email...December 31, 2025
eliesteinbock@gmail.comMove-to-turbo-repoAugust 14, 2023
This pull request is reviewed by Baz. Review like a pro on (Baz).

@vercel
Copy link

vercel bot commented Jan 5, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Review Updated (UTC)
inbox-zero Ready Ready Preview Jan 5, 2026 10:19pm

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Jan 5, 2026

Note

Other AI code review bot(s) detected

CodeRabbit has detected other AI code review bot(s) in this pull request and will avoid duplicating their findings in the review comments. This may lead to a less comprehensive review.

📝 Walkthrough

Walkthrough

Adds a new AllRulesDisabledBanner component to the automation UI, extends ActionCard with blue/destructive variants and richer description typing, marks Alert components as deprecated, wraps onboarding step rendering in a Suspense boundary, and renames/refactors OpenAI-specific quota errors to generic AI quota handling across utilities.

Changes

Cohort / File(s) Summary
Banner & Page Integration
apps/web/app/(app)/[emailAccountId]/assistant/AllRulesDisabledBanner.tsx, apps/web/app/(app)/[emailAccountId]/automation/page.tsx
New exported AllRulesDisabledBanner component (client-side) that queries rules and shows an ActionCard when every rule is disabled. Banner is rendered on the Automation page.
ActionCard / Card Variants
apps/web/components/ui/card.tsx, apps/web/app/(landing)/components/page.tsx
Adds CardBlue and CardRed exports, extends ActionCard with `variant?: "green"
Deprecations
apps/web/components/ui/alert.tsx
Adds deprecation comments to Alert, AlertTitle, and AlertDescription recommending ActionCard instead. No runtime API changes.
Onboarding Rendering
apps/web/app/(app)/[emailAccountId]/clean/onboarding/page.tsx
Wraps step content in React Suspense with a loading fallback and centralizes searchParams/step computation.
AI Quota / Error Handling
apps/web/utils/error-messages/index.ts, apps/web/utils/error.ts, apps/web/utils/llms/index.ts, apps/web/utils/actions/settings.ts
Replaces OPENAI_RETRY_ERRORAI_QUOTA_ERROR; removes isOpenAIRetryError and adds isAiQuotaExceededError with broader detection; updates messaging/labels from OpenAI-specific to generic AI quota wording; adjusts imports and call sites accordingly.

Sequence Diagram(s)

(Skipped — changes are UI additions and utility refactors that do not introduce a new multi-component control flow warranting a sequence diagram.)

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

Suggested reviewers

  • baz-reviewer

Poem

🐰 A little banner hops on view,
Blue cards and green now share the dew,
OpenAI names fade away,
AI quotas guide the day,
Suspense holds steps till they’re ready to chew. ✨

Pre-merge checks and finishing touches

❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 20.00% which is insufficient. The required threshold is 80.00%. You can run @coderabbitai generate docstrings to improve docstring coverage.
✅ Passed checks (2 passed)
Check name Status Explanation
Title check ✅ Passed The PR title 'assistant: add all rules disabled banner' directly describes the main change - adding a new AllRulesDisabledBanner component to the assistant/automation page. It is concise, specific, and matches the primary objective of the changeset.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
✨ Finishing touches
  • 📝 Generate docstrings

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.

@macroscopeapp
Copy link
Contributor

macroscopeapp bot commented Jan 5, 2026

Add an AllRulesDisabledBanner to the Automation page to prompt onboarding when all rules are disabled

Introduce AllRulesDisabledBanner that checks rule states and conditionally renders an ActionCard on the Automation page; extend ActionCard with variants and richer descriptions; update AI quota/rate-limit error detection and messaging to provider-agnostic types across utilities.

📍Where to Start

Start with AllRulesDisabledBanner in AllRulesDisabledBanner.tsx, then see its usage in page.tsx.


Macroscope summarized 49455ba.

Copy link
Contributor

@cubic-dev-ai cubic-dev-ai bot left a comment

Choose a reason for hiding this comment

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

1 issue found across 10 files

Prompt for AI agents (all issues)

Check if these issues are valid — if so, understand the root cause of each and fix them.


<file name="apps/web/utils/llms/index.ts">

<violation number="1" location="apps/web/utils/llms/index.ts:326">
P2: Error message may mislead users when the underlying error is quota exceeded (not rate limiting). The `isAiQuotaExceededError` function catches both quota exceeded AND rate limit errors, but this message suggests all such errors are temporary rate limits. For quota exceeded errors, users need to take action (add credits), and it&#39;s not temporary. Consider a more accurate message like: &quot;Your AI provider has rejected requests due to rate limits or quota. Please check your provider account if this persists.&quot;</violation>
</file>

Reply with feedback, questions, or to request a fix. Tag @cubic-dev-ai to re-run a review.

Copy link
Contributor

@cubic-dev-ai cubic-dev-ai bot left a comment

Choose a reason for hiding this comment

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

1 issue found across 2 files (changes from recent commits).

Prompt for AI agents (all issues)

Check if these issues are valid — if so, understand the root cause of each and fix them.


<file name="apps/web/components/ui/card.tsx">

<violation number="1" location="apps/web/components/ui/card.tsx:144">
P2: The `description` prop now accepts `React.ReactNode`, but it&#39;s rendered inside a `&lt;p&gt;` tag which only allows phrasing (inline) content. If block-level elements are passed as description, this will create invalid HTML and may cause React hydration warnings. Consider changing the wrapper from `&lt;p&gt;` to `&lt;div&gt;` to safely accommodate React nodes.</violation>
</file>

Reply with feedback, questions, or to request a fix. Tag @cubic-dev-ai to re-run a review.

@elie222 elie222 merged commit 6ea5266 into main Jan 5, 2026
34 checks passed
@elie222 elie222 deleted the feat/all-rules-disabled-banner branch January 5, 2026 22:28
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.

1 participant