Skip to content

Conversation

@PratiAmalden
Copy link

No description provided.

@PratiAmalden PratiAmalden added the Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. label Dec 7, 2025
@PratiAmalden PratiAmalden changed the title Feature/rebloom Glasgow | Prati Amalden | Module Legacy Code | New feature: ebloom Dec 7, 2025
@PratiAmalden PratiAmalden changed the title Glasgow | Prati Amalden | Module Legacy Code | New feature: ebloom Glasgow | Prati Amalden | Module Legacy Code | New feature: Rebloom Dec 7, 2025
Copy link
Member

@illicitonion illicitonion 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 generally looking good, but there's one big thing about the database structure to look at.

From a UX perspective - it's unclear when a rebloom should sort in a timeline - should it be at time of original post or time of original bloom?

Also on a bloom when it says "Rebloomed 1 times", it may be useful to be able to click to display which users rebloomed or similar.

But generally, this is looking really good, well done!

ALTER TABLE blooms
ADD COLUMN rebloom_from BIGINT REFERENCES blooms(id),
ADD COLUMN rebloom_by INT REFERENCES users(id),
ADD COLUMN rebloom_count INT DEFAULT 0;
Copy link
Member

Choose a reason for hiding this comment

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

Ideally you wouldn't need to track rebloom counts in the database - there is a race condition here where values can get out of date (e.g. if you create a rebloom but haven't updated this count yet).

Instead, use SQL relationships to compute this - in a query, you should be able to compute the count of blooms which have this ID as an rebloom_from

Your Python and JS code for querying a Bloom shouldn't have to change, but it removes the need for you to update the original bloom from the python side.

await apiService.postRebloom(bloom);

} catch (error) {
console.error("Rebloom failed:", error);
Copy link
Member

Choose a reason for hiding this comment

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

This isn't a user-facing error - how could you surface this to a user?

@illicitonion illicitonion added Reviewed Volunteer to add when completing a review with trainee action still to take. and removed Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. labels Jan 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Reviewed Volunteer to add when completing a review with trainee action still to take.

Projects

Status: Backlog

Development

Successfully merging this pull request may close these issues.

2 participants