Skip to content

Replace toast with message title for Pulse beta tag#424

Merged
RanaBug merged 1 commit intostagingfrom
feat/PRO-3749/pulse-beta-tag
Oct 6, 2025
Merged

Replace toast with message title for Pulse beta tag#424
RanaBug merged 1 commit intostagingfrom
feat/PRO-3749/pulse-beta-tag

Conversation

@RanaBug
Copy link
Collaborator

@RanaBug RanaBug commented Oct 6, 2025

Description

  • Remove toast beta tag and add message title

How Has This Been Tested?

  • Existing Unit Tests and Manual Testing

Screenshots (if appropriate):

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Summary by CodeRabbit

  • New Features
    • Added an inline beta notice on the Home screen to inform users about the beta status.
  • Refactor
    • Simplified the app’s render flow to switch directly between Search and Home screens.
    • Removed the beta toast notification for a cleaner experience.
  • Tests
    • Updated test suite by removing tests related to the beta toast behavior.

@RanaBug RanaBug requested a review from IAmKio October 6, 2025 13:16
@RanaBug RanaBug self-assigned this Oct 6, 2025
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Oct 6, 2025

Walkthrough

Removed Pulse beta toast logic from AppWrapper and related tests, simplified AppWrapper render to a direct Search/HomeScreen ternary, and added a static beta notice paragraph in HomeScreen’s non-preview state.

Changes

Cohort / File(s) Summary of changes
Remove beta toast from AppWrapper
src/apps/pulse/components/App/AppWrapper.tsx
Deleted beta toast state/effect and PulseToast rendering; simplified render to a single ternary returning Search or HomeScreen.
Add beta notice text in HomeScreen
src/apps/pulse/components/App/HomeScreen.tsx
Inserted a beta notice paragraph in two spots within the non-preview render path; no logic changes elsewhere.
Update tests to reflect toast removal
src/apps/pulse/components/App/tests/AppWrapper.test.tsx
Removed tests asserting beta toast presence and close behavior; retained remaining tests unchanged.

Sequence Diagram(s)

sequenceDiagram
  autonumber
  participant U as User
  participant AW as AppWrapper
  participant S as Search
  participant H as HomeScreen
  %% Old vs New high-level flow (toast removed)
  rect rgb(245,245,255)
    note over AW: New flow
    U->>AW: Open Pulse
    AW-->>AW: isSearching?
    alt Searching
      AW->>S: Render Search
    else Not searching
      AW->>H: Render HomeScreen
    end
  end
  rect rgb(255,245,245)
    note over AW: Old flow (removed)
    U->>AW: Open Pulse
    AW-->>AW: init beta toast state/effect
    AW-->>U: Show PulseToast (beta)
    AW-->>AW: isSearching?
    alt Searching
      AW->>S: Render Search
    else Not searching
      AW->>H: Render HomeScreen
    end
  end
Loading

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related PRs

Suggested reviewers

  • IAmKio

Poem

A bunny taps keys with a gentle boast,
“No more pop-ups, we’ve toasted the toast!”
Now straight to Search or Home we hop,
With a beta whisper atop the crop.
Nose twitch, code switch—hip hop, don’t stop.
(_/)

( •_•)

/ >🍃

Pre-merge checks and finishing touches

❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.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 title clearly summarizes the primary change by stating that the beta toast is replaced with a message title for the Pulse beta tag, making it concise and specific to the main modifications in the pull request.
Description Check ✅ Passed The pull request description follows the repository template with a clear summary of changes in the Description section, specific testing details in the How Has This Been Tested section, an included Screenshots header, and a correctly marked Types of changes section, satisfying all required template elements.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch feat/PRO-3749/pulse-beta-tag

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.

@cloudflare-workers-and-pages
Copy link

Deploying x with  Cloudflare Pages  Cloudflare Pages

Latest commit: 2e2e8b1
Status: ✅  Deploy successful!
Preview URL: https://d46d0bf7.x-e62.pages.dev
Branch Preview URL: https://feat-pro-3749-pulse-beta-tag.x-e62.pages.dev

View logs

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: 0

🧹 Nitpick comments (1)
src/apps/pulse/components/App/HomeScreen.tsx (1)

823-826: Beta notice added successfully, but consider UX and styling improvements.

The beta notice paragraph is now displayed in the home screen. However, there are a few considerations:

  1. Inconsistent Summary: The AI summary mentions the notice appears "in two places," but the code shows only one instance at lines 823-826. This suggests the summary may be inaccurate.

  2. User Experience: The notice displays every time users return to the home state, which could become repetitive for returning users. Consider showing it only once per session using localStorage or sessionStorage.

  3. Display Property: Using flex on a <p> element is unusual since paragraph elements are typically block-level. Consider using block instead or changing to a <div> if flex layout is needed for child elements.

Optional refactor to show the notice only once per session:

+import { useEffect, useState } from 'react';
+
+const BETA_NOTICE_KEY = 'pulse-beta-notice-seen';
+
 export default function HomeScreen(props: HomeScreenProps) {
+  const [showBetaNotice, setShowBetaNotice] = useState(() => {
+    return !sessionStorage.getItem(BETA_NOTICE_KEY);
+  });
+
+  useEffect(() => {
+    if (showBetaNotice) {
+      sessionStorage.setItem(BETA_NOTICE_KEY, 'true');
+    }
+  }, [showBetaNotice]);
   ...
   
   return (
     <>
-      <p className="flex text-base font-normal text-white/[.5] max-w-[442px] text-center mb-6">
-        You&apos;re trying out the beta version of Pulse: expect improvements
-        ahead. Thank you.
-      </p>
+      {showBetaNotice && (
+        <p className="block text-base font-normal text-white/[.5] max-w-[442px] text-center mb-6">
+          You&apos;re trying out the beta version of Pulse: expect improvements
+          ahead. Thank you.
+        </p>
+      )}
📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between d1a8986 and 2e2e8b1.

⛔ Files ignored due to path filters (2)
  • src/apps/pulse/components/App/tests/__snapshots__/AppWrapper.test.tsx.snap is excluded by !**/*.snap
  • src/apps/pulse/components/App/tests/__snapshots__/HomeScreen.test.tsx.snap is excluded by !**/*.snap
📒 Files selected for processing (3)
  • src/apps/pulse/components/App/AppWrapper.tsx (1 hunks)
  • src/apps/pulse/components/App/HomeScreen.tsx (1 hunks)
  • src/apps/pulse/components/App/tests/AppWrapper.test.tsx (0 hunks)
💤 Files with no reviewable changes (1)
  • src/apps/pulse/components/App/tests/AppWrapper.test.tsx
👮 Files not reviewed due to content moderation or server errors (2)
  • src/apps/pulse/components/App/HomeScreen.tsx
  • src/apps/pulse/components/App/AppWrapper.tsx
🧰 Additional context used
🧬 Code graph analysis (1)
src/apps/pulse/components/App/AppWrapper.tsx (2)
src/apps/pulse/components/Search/Search.tsx (1)
  • Search (64-451)
src/apps/pulse/components/App/HomeScreen.tsx (1)
  • HomeScreen (80-991)
⏰ 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). (3)
  • GitHub Check: lint
  • GitHub Check: unit-tests
  • GitHub Check: build
🔇 Additional comments (5)
src/apps/pulse/components/App/HomeScreen.tsx (2)

823-826: LGTM! Clean implementation of static beta notice.

The beta notice is well-positioned before the search button and provides clear messaging to users. The styling is appropriate with good visual hierarchy using semi-transparent text.


823-826: LGTM! Clean implementation of the beta notice.

The beta message is appropriately placed and styled. Note that it only appears in the default state (not during preview transactions or transaction status screens), which seems intentional to avoid cluttering those flows.

src/apps/pulse/components/App/AppWrapper.tsx (3)

62-87: LGTM! Excellent simplification.

Removing the toast wrapper and beta state management significantly simplifies the component logic. The direct ternary between Search and HomeScreen is clean and maintainable.


62-87: LGTM! Clean refactor that improves code clarity.

The simplified render logic with a direct ternary is more readable and maintainable than the previous fragment-wrapped conditional rendering with the toast wrapper. All component props are correctly passed through.


62-87: LGTM! Clean simplification of render logic.

The removal of the beta toast wrapper and simplification to a direct ternary operator improves code readability while maintaining all necessary functionality. All props are correctly passed to both the Search and HomeScreen components.

@RanaBug RanaBug merged commit 724a464 into staging Oct 6, 2025
6 checks passed
@coderabbitai coderabbitai bot mentioned this pull request Oct 14, 2025
3 tasks
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