Skip to content

Conversation

@jrasm91
Copy link
Member

@jrasm91 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

image
image
image

Copy link
Collaborator

@etnoy etnoy left a 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

@jrasm91 jrasm91 force-pushed the feat/memories branch 3 times, most recently from 14792c4 to 5793bba Compare February 18, 2025 14:21
refactor

chore: use heart as favorite icon

fix: linting
@jrasm91 jrasm91 marked this pull request as ready for review February 18, 2025 15:01
export type SystemFlags = { mountChecks: Record<StorageFolder, boolean> };
export type MemoriesState = {
/** memories have already been created through this date */
lastOnThisDayDate: string;
Copy link
Member

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

Comment on lines +20 to +28
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];
}
Copy link
Member

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(...)])

Comment on lines +35 to +37
// generate a memory +/- X days from today
for (let i = 0; i <= DAYS * 2 + 1; i++) {
const target = start.plus({ days: i });
Copy link
Member

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?

Copy link
Member Author

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

Copy link
Member

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

Copy link
Member Author

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

@alextran1502 alextran1502 merged commit d350022 into main Feb 21, 2025
39 checks passed
@alextran1502 alextran1502 deleted the feat/memories branch February 21, 2025 18:31
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.

5 participants