Skip to content

fix(desktop): show spinner on install update button while pending#3561

Merged
Kitenite merged 1 commit into
mainfrom
snowy-hide
Apr 18, 2026
Merged

fix(desktop): show spinner on install update button while pending#3561
Kitenite merged 1 commit into
mainfrom
snowy-hide

Conversation

@Kitenite
Copy link
Copy Markdown
Collaborator

@Kitenite Kitenite commented Apr 18, 2026

Summary

  • Install update buttons in UpdateToast and UpdateRequiredPage now show a spinning HiArrowPath icon while the mutation is pending, alongside the existing disabled (dimmed) state and "Installing..." label
  • Disabled state alone didn't feel responsive — click registered without obvious acknowledgement

Test plan

  • Trigger update flow, click Install in the toast — verify the button dims and shows a spinning icon until the app restarts
  • On the Update Required page, click Install & Restart — verify the same visual feedback

Summary by cubic

Show a spinning icon on the update Install buttons while the install mutation is pending to acknowledge the click and improve feedback. Applies to the Install button in the update toast and the Install & Restart button on the Update Required page, alongside the existing disabled state and "Installing..." label.

Written for commit 035437b. Summary will update on new commits.

Summary by CodeRabbit

  • New Features
    • Introduced animated loading indicators on install buttons during software update installation
    • Spinning icon now visible on both update notification toasts and the update dialog screens
    • Enhanced button spacing and visual alignment when updates are being installed
    • Clearer visual state indicators when the system is actively processing updates

Disabled state alone didn't feel responsive — click registered without
obvious acknowledgement. Adds a spinning icon alongside the existing
"Installing..." label so users see the action was received.
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Apr 18, 2026

📝 Walkthrough

Walkthrough

Two desktop UI components are enhanced to display visual feedback during update installation. Both the UpdateRequiredPage and UpdateToast components now conditionally render an animated spinning icon when the install mutation is pending, providing clearer user indication of the installation process.

Changes

Cohort / File(s) Summary
Update Installation UI
apps/desktop/src/renderer/components/UpdateRequiredPage/UpdateRequiredPage.tsx, apps/desktop/src/renderer/components/UpdateToast/UpdateToast.tsx
Add animated HiArrowPath icon rendering during update installation. UpdateRequiredPage applies gap-2 spacing class; both components conditionally display spinning icon when installMutation.isPending is true.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Poem

🐰 A spinning wheel of hope so bright,
Twirls with grace through install's night,
Two buttons blessed with motion's dance,
HiArrowPath gives users a glance!
That updates churn with visual delight! 🌀

🚥 Pre-merge checks | ✅ 2 | ❌ 1

❌ 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%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (2 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and concisely describes the main change: adding a spinner icon to install update buttons during the pending state.
Description check ✅ Passed The description covers the main change, includes a test plan, and provides context about why the change improves UX; template sections are adequately addressed.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch snowy-hide

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.

@greptile-apps
Copy link
Copy Markdown

greptile-apps Bot commented Apr 18, 2026

Greptile Summary

This PR improves the install update UX in both UpdateToast and UpdateRequiredPage by adding a spinning HiArrowPath icon alongside the "Installing…" label while the install mutation is pending, giving users immediate visual feedback after clicking the button (previously only the disabled/dimmed state indicated activity).

Key changes:

  • UpdateToast.tsx — Install button now conditionally renders a spinning icon and changes text to "Installing…" while installMutation.isPending is true
  • UpdateRequiredPage.tsx — Same pattern applied to the "Install & Restart" button, with gap-2 correctly applied for icon/text spacing
  • One minor inconsistency: the UpdateToast button is missing gap-2, causing the icon and label to touch when the spinner appears (the UpdateRequiredPage button handles this correctly)

Confidence Score: 4/5

Safe to merge after adding the missing gap-2 class on the toast Install button for consistent spacing

The logic is correct and well-implemented — disabled state, pending text, and spinning icon all work together as expected. The only issue is a minor style inconsistency (missing gap-2 in UpdateToast) that causes the spinner and label to render without spacing.

apps/desktop/src/renderer/components/UpdateToast/UpdateToast.tsx — missing gap-2 on the Install button

Important Files Changed

Filename Overview
apps/desktop/src/renderer/components/UpdateToast/UpdateToast.tsx Adds spinning HiArrowPath icon and "Installing…" label when installMutation is pending; missing gap-2 class causes icon/text to render without spacing
apps/desktop/src/renderer/components/UpdateRequiredPage/UpdateRequiredPage.tsx Adds spinning HiArrowPath icon and "Installing…" label when installMutation is pending; correctly includes gap-2 for icon/text spacing

Sequence Diagram

sequenceDiagram
    participant U as User
    participant B as Install Button
    participant M as installMutation
    participant E as Electron IPC

    U->>B: Click Install / Install & Restart
    B->>M: mutate()
    M-->>B: isPending = true
    B->>B: disabled=true, show spinner + "Installing..."
    M->>E: autoUpdate.install()
    E-->>M: resolve / reject
    note over E: On success, app restarts
    M-->>B: isPending = false (if no restart)
    B->>B: re-enable, show normal state
Loading

Comments Outside Diff (1)

  1. apps/desktop/src/renderer/components/UpdateToast/UpdateToast.tsx, line 91-100 (link)

    P2 Missing gap-2 on Install button

    When installMutation.isPending is true, the spinning HiArrowPath icon and the "Installing…" label are rendered as sibling flex children inside <Button>, but unlike the equivalent button in UpdateRequiredPage.tsx (line 93), this button has no className="gap-2". Without a gap, the icon and text will be jammed together with no visual separation.

    Prompt To Fix With AI
    This is a comment left during a code review.
    Path: apps/desktop/src/renderer/components/UpdateToast/UpdateToast.tsx
    Line: 91-100
    
    Comment:
    **Missing `gap-2` on Install button**
    
    When `installMutation.isPending` is `true`, the spinning `HiArrowPath` icon and the "Installing…" label are rendered as sibling flex children inside `<Button>`, but unlike the equivalent button in `UpdateRequiredPage.tsx` (line 93), this button has no `className="gap-2"`. Without a gap, the icon and text will be jammed together with no visual separation.
    
    
    
    How can I resolve this? If you propose a fix, please make it concise.

    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!

Prompt To Fix All With AI
This is a comment left during a code review.
Path: apps/desktop/src/renderer/components/UpdateToast/UpdateToast.tsx
Line: 91-100

Comment:
**Missing `gap-2` on Install button**

When `installMutation.isPending` is `true`, the spinning `HiArrowPath` icon and the "Installing…" label are rendered as sibling flex children inside `<Button>`, but unlike the equivalent button in `UpdateRequiredPage.tsx` (line 93), this button has no `className="gap-2"`. Without a gap, the icon and text will be jammed together with no visual separation.

```suggestion
					<Button
						size="sm"
						onClick={handleInstall}
						disabled={installMutation.isPending}
						className="gap-2"
					>
```

How can I resolve this? If you propose a fix, please make it concise.

Reviews (1): Last reviewed commit: "fix(desktop): show spinner on install up..." | Re-trigger Greptile

Copy link
Copy Markdown
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.

🧹 Nitpick comments (1)
apps/desktop/src/renderer/components/UpdateToast/UpdateToast.tsx (1)

91-100: Add the same icon/text spacing used by the required-page button.

This toast button now renders an icon next to text, but unlike UpdateRequiredPage, it does not add gap-2, so the spinner can sit too close to the label depending on the shared Button styles.

Proposed spacing tweak
 					<Button
 						size="sm"
 						onClick={handleInstall}
 						disabled={installMutation.isPending}
+						className="gap-2"
 					>
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@apps/desktop/src/renderer/components/UpdateToast/UpdateToast.tsx` around
lines 91 - 100, In UpdateToast's install Button (the Button rendering inside
UpdateToast that uses handleInstall and installMutation), add the same
horizontal spacing used in UpdateRequiredPage by applying the gap-2 utility when
an icon is present; e.g. pass a className (or merge with existing className)
that includes "gap-2" conditionally when installMutation.isPending is true so
the spinner and label have consistent spacing.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Nitpick comments:
In `@apps/desktop/src/renderer/components/UpdateToast/UpdateToast.tsx`:
- Around line 91-100: In UpdateToast's install Button (the Button rendering
inside UpdateToast that uses handleInstall and installMutation), add the same
horizontal spacing used in UpdateRequiredPage by applying the gap-2 utility when
an icon is present; e.g. pass a className (or merge with existing className)
that includes "gap-2" conditionally when installMutation.isPending is true so
the spinner and label have consistent spacing.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 97355f34-26e3-4e1d-a988-5595414678df

📥 Commits

Reviewing files that changed from the base of the PR and between 33848ba and 035437b.

📒 Files selected for processing (2)
  • apps/desktop/src/renderer/components/UpdateRequiredPage/UpdateRequiredPage.tsx
  • apps/desktop/src/renderer/components/UpdateToast/UpdateToast.tsx

Copy link
Copy Markdown
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.

No issues found across 2 files

@Kitenite Kitenite merged commit 872361c into main Apr 18, 2026
7 checks passed
@Kitenite Kitenite deleted the snowy-hide branch April 18, 2026 18:51
@github-actions
Copy link
Copy Markdown
Contributor

🧹 Preview Cleanup Complete

The following preview resources have been cleaned up:

  • ⚠️ Neon database branch
  • ⚠️ Electric Fly.io app

Thank you for your contribution! 🎉

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