-
-
Notifications
You must be signed in to change notification settings - Fork 4.7k
feat: persistent memories #15953
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: persistent memories #15953
Conversation
jrasm91
commented
Feb 7, 2025
- Generate "on this day" memories in the background
- Add the option to "favorite" memories, which prevents them from being deleted
- Add the option to delete a memory
- Add the option to remove an asset from a memory



etnoy
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is great, I've been hoping for this
14792c4 to
5793bba
Compare
refactor chore: use heart as favorite icon fix: linting
5793bba to
0f98625
Compare
| export type SystemFlags = { mountChecks: Record<StorageFolder, boolean> }; | ||
| export type MemoriesState = { | ||
| /** memories have already been created through this date */ | ||
| lastOnThisDayDate: string; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Matching the comment above something like generatedUntilDate sounds more intuitive to me. Idk, probably personal preference
| const userMap: Record<string, string[]> = {}; | ||
| for (const user of users) { | ||
| const partnerIds = await getMyPartnerIds({ | ||
| userId: user.id, | ||
| repository: this.partnerRepository, | ||
| timelineEnabled: true, | ||
| }); | ||
| userMap[user.id] = [user.id, ...partnerIds]; | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
AFAICT you aren't using the features of a record here at all. You could just users.map(async ({id}) => [id, ...await getMyPartnerIds(...)])
| // generate a memory +/- X days from today | ||
| for (let i = 0; i <= DAYS * 2 + 1; i++) { | ||
| const target = start.plus({ days: i }); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When you say ± you don't actually just want to do start.plus always, right? Isn't what you actually want for (let i = -DAYS; i <= DAYS + 1; i++)? Or am I misunderstanding something here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
3 days before and after today is 7 days total
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes I know. But you're always doing start.plus, so you basically end up at a date in 6 days, no? Also, my primary aspect was just that going from -3 to +3 is much more intuitive/better readable imo
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It doesn't start with today