Skip to content

feat: add last updated timestamp#2128

Draft
ashchen738 wants to merge 1 commit intoferdium:developfrom
ashchen738:last-updated-timestamp
Draft

feat: add last updated timestamp#2128
ashchen738 wants to merge 1 commit intoferdium:developfrom
ashchen738:last-updated-timestamp

Conversation

@ashchen738
Copy link

@ashchen738 ashchen738 commented Apr 24, 2025

Pre-flight Checklist

Please ensure you've completed all of the following.

Description of Change

  • Adding a timestamp to keep track of the last time checks for updates was run

Motivation and Context

Screenshots

https://drive.google.com/file/d/1hO7g2_ZA92I5Ls5mg1CaHssa5X_VqSM-/view?usp=sharing

Checklist

  • My pull request is properly named
  • The changes respect the code style of the project (pnpm prepare-code)
  • pnpm test passes
  • I tested/previewed my changes locally

Release Notes

@ashchen738 ashchen738 changed the title add last updated timestamp feat: add last updated timestamp Apr 25, 2025
@SpecialAro SpecialAro requested a review from Copilot May 14, 2025 18:10
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

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;
Copy link

Copilot AI May 14, 2025

Choose a reason for hiding this comment

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

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.

Copilot uses AI. Check for mistakes.
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