Enable UpdateEffect animation after successful app update#203
Merged
Enable UpdateEffect animation after successful app update#203
Conversation
The auto-update controller already detected when the app restarted after an update (via ephemeral datastore version comparison), but the hasUpdated flag was never exposed to the renderer. - Add hasUpdated() to FlowUpdatesAPI interface - Add updates:has-updated IPC handler - Add preload bridge for hasUpdated - Remove stale TODO comment in auto-update controller
Wire up the hasUpdated flag in the renderer to conditionally show the
UpdateEffect sweep animation when the app restarts after an update.
- Add hasUpdated to AppUpdatesProvider context, fetched on mount
- Replace disabled {false && <UpdateEffect />} with a memoized
ConditionalUpdateEffect component that renders only when hasUpdated
is true
Contributor
Build artifacts for all platforms are ready! 🚀Download the artifacts for: One-line installer (Unstable):bunx flow-debug-build --open 22531840648(execution 22531840648 / attempt 1) |
Greptile SummaryThis PR completes the auto-update UX by wiring up the previously disabled Implementation DetailsThe implementation follows a clean architecture pattern across the Electron IPC boundary:
The Confidence Score: 5/5
Important Files Changed
Sequence DiagramsequenceDiagram
participant AU as AutoUpdateController
participant IPC as IPC Handler
participant Preload as Preload Bridge
participant Provider as AppUpdatesProvider
participant UI as ConditionalUpdateEffect
Note over AU: App starts after update
AU->>AU: getVersionUpdatedFrom()
AU->>AU: Compare versions
AU->>AU: Set hasUpdated = true
Note over Provider: Component mounts
Provider->>Preload: hasUpdated()
Preload->>IPC: invoke('updates:has-updated')
IPC->>AU: Read hasUpdated flag
AU-->>IPC: Return true
IPC-->>Preload: Return true
Preload-->>Provider: Return true
Provider->>Provider: setHasUpdated(true)
Note over UI: Render cycle
UI->>Provider: useAppUpdates()
Provider-->>UI: { hasUpdated: true }
UI->>UI: Render UpdateEffect
Note over UI: After ~1.2s
UI->>UI: Animation completes
UI->>UI: Return null (dismiss)
Last reviewed commit: c8bfad5 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
hasUpdatedflag from the main process auto-update controller to the renderer via a newhasUpdated()IPC methodUpdateEffectsweep animation in the browser UI to play when the app restarts after a successful updateDetails
The auto-update controller already detected post-update restarts by persisting the pre-update version to an ephemeral datastore and comparing on launch (
autoUpdateController.hasUpdated), but this flag was never consumed (marked with a// TODO). This PR completes the pipeline:hasUpdated()toFlowUpdatesAPI, with an IPC handler and preload bridgehasUpdatedboolean toAppUpdatesProvidercontext (fetched once on mount), and replaces the disabled{false && <UpdateEffect />}with a memoizedConditionalUpdateEffectcomponent that renders only when the app has just been updatedThe
UpdateEffectcomponent auto-dismisses after ~1.2s (existing behavior).Files changed
src/shared/flow/interfaces/app/updates.ts— AddedhasUpdatedto API interfacesrc/main/controllers/auto-update-controller/index.ts— Removed stale TODO commentsrc/main/ipc/app/updates.ts— Addedupdates:has-updatedIPC handlersrc/preload/index.ts— Added preload bridgesrc/renderer/src/components/providers/app-updates-provider.tsx— AddedhasUpdatedto contextsrc/renderer/src/components/browser-ui/main.tsx— EnabledUpdateEffectviaConditionalUpdateEffect