Skip to content

Conversation

@aviv926
Copy link
Collaborator

@aviv926 aviv926 commented Nov 5, 2025

Description

This PR allows the system administrator to know when an asset was last uploaded by the user.
This helps in situations where the operating system or an unknown problem causes the backup to stop.
By adding this, the system administrator can see if a user has not uploaded an asset for a long time and try to help them resolve the problem.

How Has This Been Tested?

Experiment A:
Uploading an asset
Result:
Last uploaded today

Experiment B:
Delete the asset I uploaded
Result:
Last uploaded 2 days ago

Screenshots (if appropriate)

Experiment A:
image

Experiment B:

image

Checklist:

  • I have performed a self-review of my own code
  • I have made corresponding changes to the documentation if applicable
  • I have no unrelated changes in the PR.
  • I have confirmed that any new dependencies are strictly necessary.
  • I have written tests for new code (if applicable)
  • I have followed naming conventions/patterns in the surrounding code
  • All code in src/services/ uses repositories implementations for database calls, filesystem operations, etc.
  • All code in src/repositories/ is pretty basic/simple and does not have any immich specific logic (that belongs in src/services/)

Please describe to which degree, if any, an LLM was used in creating this pull request.

yes
for luxon $derived part and also for web/src/routes/admin/users/[id]/+page.ts
...

@aviv926 aviv926 changed the title feat(web):add last asset upload date to user admin details feat(web): add last asset upload date to user admin details Nov 5, 2025
@aviv926
Copy link
Collaborator Author

aviv926 commented Nov 5, 2025

Btw if we merge this, we'll need to change the title Storage Quota to Storage Info.

let canResetPassword = $derived($authUser.id !== user.id);
let newPassword = $state<string>('');
let lastUploadText = $derived(
Copy link
Collaborator Author

@aviv926 aviv926 Nov 5, 2025

Choose a reason for hiding this comment

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

We can also use this option which is even more accurate in terms of time (even to the minute level) and it also uses the local language for the hour and time.
Let me know what you think

Suggested change
let lastUploadText = $derived(
let lastUploadText = $derived(
user.lastAssetUploadedAt
? (DateTime.fromISO(user.lastAssetUploadedAt).toRelative({ locale: $locale }) ?? $t('unknown_time'))
: $t('never_uploaded'),
);

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant