feat: add last updated timestamp#2128
Draft
ashchen738 wants to merge 1 commit intoferdium:developfrom
Draft
Conversation
There was a problem hiding this comment.
Pull Request Overview
This PR adds a “last updated timestamp” to track the time when update checks are executed. The key changes are:
- Adding a new observable (lastUpdateCheckTime) in the app store that is initialized from settings and updated on each update check.
- Passing and displaying the last update check timestamp in the settings screens.
- Adding a new action (setLastUpdateCheckTime) to update the settings with the current timestamp.
Reviewed Changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| src/stores/AppStore.ts | Adds the lastUpdateCheckTime observable and updates it during the update check routine. |
| src/containers/settings/EditSettingsScreen.tsx | Passes the lastUpdateCheckTime property to the settings view. |
| src/components/settings/settings/EditSettingsForm.tsx | Displays the last update check timestamp in the UI and updates its prop interface. |
| src/actions/app.ts | Introduces a new action for updating the last update check timestamp. |
Comments suppressed due to low confidence (1)
src/stores/AppStore.ts:564
- The debug message was changed from 'sending event' to 'ending event', which might be a typo. Please confirm whether this message accurately reflects the intended behavior.
debug('_checkForUpdates: ending event to autoUpdate:check');
| showServicesUpdatedInfoBar: boolean; | ||
| updateVersion: string; | ||
| serverURL: string; | ||
| lastUpdateCheckTime: string; |
There was a problem hiding this comment.
The prop type for lastUpdateCheckTime is defined as string, however it can be null in the AppStore. Consider updating the type to 'string | null' to more accurately reflect the possible values.
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.
Pre-flight Checklist
Please ensure you've completed all of the following.
Description of Change
Motivation and Context
Screenshots
https://drive.google.com/file/d/1hO7g2_ZA92I5Ls5mg1CaHssa5X_VqSM-/view?usp=sharing
Checklist
pnpm prepare-code)pnpm testpassesRelease Notes