Skip to content

Birmingham | 26-JUL-SDC | Merve Reis | Sprint 2 | Purple Forest: New Feature: Rebloom - #295

Open
mervereis wants to merge 6 commits into
CodeYourFuture:mainfrom
mervereis:sprint2-rebloom
Open

mervereis wants to merge 6 commits into
CodeYourFuture:mainfrom
mervereis:sprint2-rebloom

Conversation

@mervereis

@mervereis mervereis commented Oct 5, 2026 •

Copy link
Copy Markdown

Learners, PR Template

Self checklist

  • I have titled my PR with Region | Cohort | FirstName LastName | Sprint | Assignment Title
  • My changes meet the requirements of the task
  • I have tested my changes
  • My changes follow the style guide

Task code

CYF-1171

Changelist

Added a reblooms table storing which user re-bloomed which bloom and when.
Added an authenticated POST /rebloom/ endpoint.
Added a unique constraint on (bloom_id, user_id) so a user can't re-bloom the same bloom twice.
Added rebloom to the frontend apiService.
Added a Re-bloom button to blooms in the timeline, hidden when logged out and disabled while the request runs.
Updated the home timeline to include re-blooms by the current user and the people they follow.
Re-bloomed blooms keep their original author, content and original timestamp.
The timeline uses the re-bloom timestamp to position a re-bloom in the feed.
Added a banner showing who re-bloomed the original bloom, plus a purple border so re-blooms look different from normal blooms.
Added a re-bloom count, shown only when a bloom has been re-bloomed at least once.

@mervereis mervereis added the Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. label Oct 5, 2026

@LonMcGregor LonMcGregor left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Did you commit all the changes you intended here? When I try to test I get an error: "apiService.rebloom is not a function"

Comment thread backend/endpoints.py Outdated
# Get the current user's own blooms
own_blooms = blooms.get_blooms_for_user(current_user.username, limit=50)

# <-- DELETE from here down to the return line -->

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

What does this comment mean?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Thanks for flagging this. I’ve committed the missing rebloom changes, including exposing rebloom on apiService and registering the backend route. I also removed the stray “DELETE…” comment; the timeline code below it is required. Please apply the reblooms database migration before testing against an existing database. @LonMcGregor

@LonMcGregor LonMcGregor 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 Oct 13, 2026

@LonMcGregor LonMcGregor left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Good work, the rebloom functionality works well now. I have some questions about your submitted PR.

Comment thread SETUP-v2.md

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Did you mean to commit this file? I can't read the language. If it's just for your own use, and not intended for colleagues to read, you don't need to commit it.

Comment thread backend/data/blooms.py
username = %(sender_username)s
{before_clause}
ORDER BY send_timestamp DESC
f"""SELECT id, sender_username, content, sent_timestamp,

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

This query looks very complex. I have a few questions:

  1. Can you talk me through what it is doing at each stage?
  2. Do you think there are any efficiency considerations with your current approach?

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