Skip to content
This repository was archived by the owner on Jun 7, 2025. It is now read-only.

Conversation

@Whyle
Copy link
Contributor

@Whyle Whyle commented May 16, 2025

No description provided.

@Whyle Whyle requested a review from Copilot May 16, 2025 00:20
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

Adds HTML-formatted emails with inline CSS to the user registration and password reset flows.

  • Switched email subtype to HTML in the email service
  • Introduced an inline style constant and replaced plain-text bodies with full HTML templates in register_user and reset_password

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.

File Description
app/service/email_service.py Changed email subtype from plain to HTML
app/routes/user.py Added inline CSS and HTML email bodies for registration and reset
Comments suppressed due to low confidence (3)

app/service/email_service.py:34

  • The switch to HTML emails isn't covered by existing tests. Add or update tests to verify that emails are sent with the HTML subtype and render correctly.
subject=subject, recipients=to, body=body, subtype=MessageType.html #or MessageType.plain

app/routes/user.py:26

  • [nitpick] The variable name style is very generic and could conflict with other CSS or templating code. Consider renaming to something more specific, like EMAIL_CSS_STYLE.
style = """<style>

app/routes/user.py:26

  • [nitpick] The multiline style string includes indentation that will be part of the output. Use a dedent helper (e.g., textwrap.dedent) or adjust the literal to avoid unexpected whitespace in the email.
style = """<style>

to=[user_data.email],
subject=f"[Suppl-AI] Registrazione utente",
body=f"Benvenuto in Suppl-AI!\nEcco la tua password temporanea\n\n{password}\n\n Accedi e cambiala subito!",
body=f"""
Copy link

Copilot AI May 16, 2025

Choose a reason for hiding this comment

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

[nitpick] The HTML bodies for registration and reset are nearly identical apart from some text. Consider extracting a shared template or helper function to avoid duplication.

Copilot uses AI. Check for mistakes.
Whyle and others added 2 commits May 16, 2025 02:22
@Whyle
Copy link
Contributor Author

Whyle commented May 16, 2025

image
image

@bazz333 bazz333 closed this pull request by merging all changes into main in c294c9a May 16, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants