Skip to content

Conversation

@google-labs-jules
Copy link
Contributor

@google-labs-jules google-labs-jules bot commented Dec 26, 2025

This PR enhances the UX by adding a visual loading state to the Button component. This provides immediate feedback to users during async actions (like form submission) and prevents double-submission by disabling the button. The Auth page has been updated to utilize this new capability. The change includes a new Spinner component that respects the application's design themes.


PR created automatically by Jules for task 16559603669677337140 started by @Devasy23

Summary by CodeRabbit

  • New Features
    • Button component now includes integrated loading state with a spinning indicator
    • Auth form buttons display visual feedback during submission instead of becoming disabled
    • Loading spinner provides users with clear indication when actions are processing
    • Improved visual feedback across forms and interactive elements

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

…dded an `isLoading` prop to `Button.tsx` to display a spinner and disable the button, and created a `Spinner.tsx` component with Neobrutalism/Glassmorphism styling support. Additionally, I updated `Auth.tsx` to use the new prop on the authentication button and cleaned up the manual loading text handling in favor of the standardized component state.
@google-labs-jules
Copy link
Contributor Author

👋 Jules, reporting for duty! I'm here to lend a hand with this pull request.

When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down.

I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job!

For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with @jules. You can find this option in the Pull Request section of your global Jules UI settings. You can always switch back!


For security, I will only act on instructions from the user who triggered this task.

New to Jules? Learn more at jules.google/docs.

@netlify
Copy link

netlify bot commented Dec 26, 2025

Deploy Preview for split-but-wiser ready!

Name Link
🔨 Latest commit 2cc4b71
🔍 Latest deploy log https://app.netlify.com/projects/split-but-wiser/deploys/694ec4a5fe3ec1000878f94b
😎 Deploy Preview https://deploy-preview-218--split-but-wiser.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

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

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Dec 26, 2025

Important

Review skipped

Bot user detected.

To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Walkthrough

Adds isLoading prop to Button component with a new Spinner component for loading state visualization. Creates reusable Spinner component using lucide-react's Loader2 icon. Updates Auth page to use Button's isLoading prop instead of managing loading text inline.

Changes

Cohort / File(s) Summary
UI Components
web/components/ui/Button.tsx, web/components/ui/Spinner.tsx
Button extended with isLoading prop that displays Spinner and disables button; new Spinner component created with lucide-react Loader2 animation
Page Integration
web/pages/Auth.tsx
Updated submit button to use isLoading={loading} prop instead of disabled={loading} with inline "Processing..." text; icon now conditionally rendered

Suggested reviewers

  • vrajpatelll

Pre-merge checks

✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly describes the main change: adding a loading state capability to the Button component, which is the central feature of this PR.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

Comment @coderabbitai help to get the list of available commands and usage tips.

@codecov
Copy link

codecov bot commented Dec 26, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 74.42%. Comparing base (22f39f1) to head (2cc4b71).
✅ All tests successful. No failed tests found.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #218   +/-   ##
=======================================
  Coverage   74.42%   74.42%           
=======================================
  Files          17       17           
  Lines        1693     1693           
  Branches      158      158           
=======================================
  Hits         1260     1260           
  Misses        381      381           
  Partials       52       52           
Components Coverage Δ
Authentication System 75.45% <ø> (ø)
Expense Management 70.64% <ø> (ø)
Group Management 76.20% <ø> (ø)
User Management 97.16% <ø> (ø)
Backend Core 69.41% <ø> (ø)
🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@Devasy
Copy link
Owner

Devasy commented Dec 26, 2025

@coderabbitai review

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Dec 26, 2025

✅ Actions performed

Review triggered.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@Devasy Devasy marked this pull request as ready for review December 26, 2025 17:20
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

📜 Review details

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 22f39f1 and 13fec4e.

⛔ Files ignored due to path filters (1)
  • web/pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
📒 Files selected for processing (3)
  • web/components/ui/Button.tsx
  • web/components/ui/Spinner.tsx
  • web/pages/Auth.tsx
🧰 Additional context used
📓 Path-based instructions (1)
web/pages/**/*.{ts,tsx}

📄 CodeRabbit inference engine (.github/copilot-instructions.md)

Web pages should be created as components in web/pages/ and added to routing configuration

Files:

  • web/pages/Auth.tsx
🧬 Code graph analysis (2)
web/pages/Auth.tsx (2)
web/components/ui/Button.tsx (1)
  • Button (12-60)
mobile/screens/GroupSettingsScreen.js (1)
  • loading (43-43)
web/components/ui/Button.tsx (1)
web/components/ui/Spinner.tsx (1)
  • Spinner (9-17)
🔇 Additional comments (5)
web/pages/Auth.tsx (1)

254-255: LGTM! Clean adoption of the new loading state pattern.

The implementation correctly uses the isLoading prop to delegate loading visuals to the Button component, and conditionally renders the ArrowRight icon only when not loading. This provides clear visual feedback during form submission and prevents double submissions.

web/components/ui/Spinner.tsx (1)

1-17: LGTM! Well-structured, reusable Spinner component.

The implementation is clean and follows best practices:

  • Simple, focused API with sensible defaults
  • Good accessibility with aria-label="Loading"
  • Leverages lucide-react's Loader2 icon with animation
  • Flexible customization via className and size props
web/components/ui/Button.tsx (3)

4-4: LGTM! Spinner import is correct.

The import correctly references the Spinner component from the same directory.


9-9: LGTM! isLoading prop properly defined and integrated.

The optional isLoading prop is correctly typed in the interface and destructured with an appropriate default value of false.

Also applies to: 17-17


53-53: LGTM! Disabled logic correctly prevents interaction during loading.

The button is properly disabled when either isLoading is true or the explicit disabled prop is set, preventing double submissions during async operations.

disabled={isLoading || props.disabled}
{...props}
>
{isLoading && <Spinner className="mr-1" />}
Copy link
Contributor

Choose a reason for hiding this comment

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

🧹 Nitpick | 🔵 Trivial

Consider removing redundant margin on Spinner.

The className="mr-1" on the Spinner is redundant since baseStyles already includes gap-2 (line 22), which provides 8px spacing between flex items. The explicit mr-1 (4px) doesn't add value and could be removed for cleaner code.

🔎 Proposed simplification
-      {isLoading && <Spinner className="mr-1" />}
+      {isLoading && <Spinner />}
📝 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
{isLoading && <Spinner className="mr-1" />}
{isLoading && <Spinner />}
🤖 Prompt for AI Agents
In web/components/ui/Button.tsx around line 56, the Spinner is given a redundant
className="mr-1" while the container already uses gap-2 in baseStyles; remove
the explicit mr-1 from the Spinner JSX so spacing relies on gap-2 and the markup
stays clean and consistent.

- Updated `Button.tsx` to pass dynamic size to `Spinner` based on the button size (sm=16, md=20, lg=24).
- Ensures the spinner is proportional to the button text.
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