Skip to content

748: Renamed files w & w/o Client#742

Open
az2924 wants to merge 1 commit intomainfrom
748
Open

748: Renamed files w & w/o Client#742
az2924 wants to merge 1 commit intomainfrom
748

Conversation

@az2924
Copy link
Collaborator

@az2924 az2924 commented Feb 6, 2026

748

Description of changes

  • Updated OfficialCodebloomEmail to OfficialCodebloomEmailClient and GithubOAuthEmail⁩ to GithubOAuthEmail⁩Client and ReactEmailClient to ReactEmail

Checklist before review

  • I have done a thorough self-review of the PR
  • Copilot has reviewed my latest changes, and all comments have been fixed and/or closed.
  • If I have made database changes, I have made sure I followed all the db repo rules listed in the wiki here. (check if no db changes)
  • All tests have passed
  • I have successfully deployed this PR to staging
  • I have done manual QA in both dev (and staging if possible) and attached screenshots below.

Screenshots

Dev

  • No changes besides naming of files.

Staging

  • No changes besides naming of files.

@az2924
Copy link
Collaborator Author

az2924 commented Feb 6, 2026

/deploy

@github-actions
Copy link
Contributor

github-actions bot commented Feb 6, 2026

Available PR Commands

  • /ai - Triggers all AI review commands at once
  • /review - AI review of the PR changes
  • /describe - AI-powered description of the PR
  • /improve - AI-powered suggestions
  • /deploy - Deploy to staging

See: https://github.com/tahminator/codebloom/wiki/CI-Commands

@az2924
Copy link
Collaborator Author

az2924 commented Feb 6, 2026

/deploy

@az2924 az2924 changed the title 748: Renamed files w w/o Client 748: Renamed files w & w/o Client Feb 6, 2026
@github-actions
Copy link
Contributor

github-actions bot commented Feb 6, 2026

Title

748: Renamed files w w/o Client


PR Type

Enhancement, Tests


Description

  • Rename email client classes to Client suffix.

  • Rename ReactEmailClient to ReactEmail interface.

  • Update imports, injections, and constructor types.

  • Adjust tests and mock beans accordingly.


Diagram Walkthrough

flowchart LR
  a["OfficialCodebloomEmail"]
  b["OfficialCodebloomEmailClient"]
  c["GithubOAuthEmail"]
  d["GithubOAuthEmailClient"]
  e["ReactEmailClient"]
  f["ReactEmail"]
  g["ReactEmailClientImpl"]
  h["ReactEmailImpl"]
  i["AuthController imports"]
  j["PlaywrightClient imports"]
  k["Tests and mocks"]

  a -- "renamed to" --> b
  c -- "renamed to" --> d
  e -- "renamed to" --> f
  g -- "renamed to" --> h
  i -- "use new client types" --> b
  i -- "use new template interface" --> f
  j -- "use new Github client" --> d
  k -- "updated to new names" --> b
  k -- "updated to new names" --> d
  k -- "updated to new names" --> f
Loading

File Walkthrough

Relevant files
Enhancement
6 files
AuthController.java
Update imports and types to renamed clients                           
+6/-6     
OfficialCodebloomEmailClient.java
Rename class and bind new properties class                             
+4/-4     
GithubOAuthEmailClient.java
Rename GitHub OAuth client and properties binding               
+4/-4     
ReactEmail.java
Rename interface from ReactEmailClient to ReactEmail         
+1/-1     
ReactEmailImpl.java
Rename implementation and update implemented interface     
+1/-1     
PlaywrightClient.java
Use GithubOAuthEmailClient in constructor and import         
+2/-2     
Configuration changes
2 files
OfficialCodebloomEmailClientProperties.java
Rename properties class for Codebloom email                           
+1/-1     
GithubOAuthEmailClientProperties.java
Rename GitHub OAuth properties class                                         
+1/-1     
Tests
4 files
AuthControllerTest.java
Update mocks and types to new client names                             
+4/-4     
BaseRepositoryTest.java
Update Mockito beans to renamed client classes                     
+4/-4     
TestEmailClients.java
Adjust autowired fields and params to new names                   
+5/-5     
ReactEmailTest.java
Rename test class and use new interface                                   
+3/-3     

@github-actions
Copy link
Contributor

github-actions bot commented Feb 6, 2026

PR Reviewer Guide 🔍

Here are some key observations to aid the review process:

⏱️ Estimated effort to review: 2 🔵🔵⚪⚪⚪
🧪 PR contains tests
🔒 No security concerns identified
⚡ Recommended focus areas for review

Config Binding

Verify that the new OfficialCodebloomEmailClientProperties class is correctly bound at runtime (matching property prefixes in application configs) and that only the new properties class is enabled for this client.

@EnableConfigurationProperties(OfficialCodebloomEmailClientProperties.class)
@Timed(value = "email.client.execution")
public class OfficialCodebloomEmailClient extends Email {

    private final OfficialCodebloomEmailClientProperties emailProperties;
    private Session session;

    public OfficialCodebloomEmailClient(final OfficialCodebloomEmailClientProperties emailProperties) {
        this.emailProperties = emailProperties;
Bean Injection

After renaming ReactEmailClient to ReactEmail, confirm there is exactly one Spring bean (ReactEmailImpl) implementing the interface and that all injection points across the app were updated to avoid ambiguity.

private final OfficialCodebloomEmailClient emailClient;
private final ServerUrlUtils serverUrlUtils;
private final UserTagRepository userTagRepository;
private final Reporter reporter;
private final ReactEmail reactEmailClient;
private final SimpleRedis<Long> simpleRedis;

public AuthController(
        final SessionRepository sessionRepository,
        final Protector protector,
        final JWTClient jwtClient,
        final UserRepository userRepository,
        final OfficialCodebloomEmailClient emailClient,
        final ServerUrlUtils serverUrlUtils,
        final UserTagRepository userTagRepository,
        final Reporter reporter,
        final ReactEmail reactEmailClient,
        final SimpleRedisProvider simpleRedisProvider) {
Constructor Wiring

Ensure the context provides a GithubOAuthEmailClient bean wherever PlaywrightClient is constructed, and that no lingering references to the old GithubOAuthEmail remain in other modules.

public PlaywrightClient(final ServerUrlUtils serverUrlUtils, GithubOAuthEmailClient githubOAuthEmail) {
    this.serverUrlUtils = serverUrlUtils;
    this.email = githubOAuthEmail;
}

@github-actions
Copy link
Contributor

github-actions bot commented Feb 6, 2026

PR Code Suggestions ✨

No code suggestions found for the PR.

import java.io.IOException;

public interface ReactEmailClient {
public interface ReactEmail {
Copy link
Owner

Choose a reason for hiding this comment

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

ReactEmail should probably be called ReactEmailTemplater or something along those lines

Copy link
Owner

Choose a reason for hiding this comment

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

forgot to rename the actual variables itself

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants