Skip to content

Fix/smtp from fallback prod tweaks#36

Merged
LinMoQC merged 3 commits intomainfrom
fix/smtp-from-fallback-prod-tweaks
Mar 26, 2026
Merged

Fix/smtp from fallback prod tweaks#36
LinMoQC merged 3 commits intomainfrom
fix/smtp-from-fallback-prod-tweaks

Conversation

@LinMoQC
Copy link
Copy Markdown
Owner

@LinMoQC LinMoQC commented Mar 26, 2026

Summary

Type of change

  • Bug fix (non-breaking change that fixes an issue)
  • New feature (non-breaking change that adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Documentation update
  • Refactor / code cleanup
  • CI / tooling

Related issue

Closes #

Changes

How to test

Screenshots (if applicable)

Checklist

  • My code follows the project's coding conventions
  • I have run ./lyra lint and there are no type errors
  • I have added/updated tests for the changed functionality
  • I have updated the documentation if behavior changed
  • The PR title follows Conventional Commits format (feat:, fix:, etc.)
  • I have read the CONTRIBUTING.md

Summary by CodeRabbit

  • Bug Fixes

    • Prevented email sending with invalid From addresses.
  • Style

    • Improved layout spacing on desktop and tablet views.
    • Enhanced border styling in dark mode.
  • Improvements

    • Enhanced editor-notebook synchronization with real-time note title tracking and automatic cache refresh after saves.

LinMoQC added 3 commits March 27, 2026 03:57
Fall back to smtp_username when smtp_from is blank; reject send if From is still empty. Also tweak prod compose, nginx example, and web .gitignore.

Made-with: Cursor
Outer panel holds radius/border; inner scrolls to reduce corner blur. Portrait matches other workspace routes (dark:border).

Made-with: Cursor
Wire NoteEditor title changes and load to activeNoteTitle; invalidate notes query after save.

Made-with: Cursor
@vercel
Copy link
Copy Markdown

vercel bot commented Mar 26, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
lyra-note-web Ready Ready Preview, Comment Mar 27, 2026 1:58am

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai bot commented Mar 26, 2026

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 3fe0d222-c8fe-49f4-a70d-5c9e27c3f7d8

📥 Commits

Reviewing files that changed from the base of the PR and between 45b2077 and a817702.

📒 Files selected for processing (8)
  • apps/api/app/providers/email.py
  • apps/web/.gitignore
  • apps/web/src/components/layout/app-shell.tsx
  • apps/web/src/features/editor/note-editor.tsx
  • apps/web/src/features/notebook/notebook-workspace.tsx
  • apps/web/src/features/portrait/portrait-view.tsx
  • docker-compose.prod.yml
  • nginx.system.example.conf

📝 Walkthrough

Walkthrough

This PR updates email validation in the API, applies styling adjustments to web UI components, introduces a new callback system for synchronizing editor state with the workspace, and hardens API configuration by replacing dynamic values with fixed routing endpoints.

Changes

Cohort / File(s) Summary
Email Validation
apps/api/app/providers/email.py
Added validation for SMTP "From" address: logs error and returns False if from_addr is empty, preventing invalid message construction.
Editor Callback System
apps/web/src/features/editor/note-editor.tsx, apps/web/src/features/notebook/notebook-workspace.tsx
Extended NoteEditorProps with onActiveNoteTitleChange and onNoteSaved callbacks; added refs for stable invocation; updated note-loading, save, and title-edit flows to propagate state changes. NotebookWorkspace now uses these callbacks to update active note title and invalidate React Query cache after saves.
UI Styling Updates
apps/web/src/components/layout/app-shell.tsx, apps/web/src/features/portrait/portrait-view.tsx
Added spacing (md:gap-2), improved flex overflow behavior (min-h-0), and updated border/shadow emphasis across layout and portrait containers.
Configuration & Build
docker-compose.prod.yml, nginx.system.example.conf
Replaced configurable NEXT_PUBLIC_API_BASE_URL with fixed /api/v1 endpoint; simplified Nginx location match from ^~ to standard precedence; updated comments to reflect enforced same-origin routing.
Git Configuration
apps/web/.gitignore
Removed .env.prod from ignore list.

Sequence Diagram

sequenceDiagram
    actor User
    participant NoteEditor
    participant NotebookWorkspace
    participant ReactQuery as React Query Cache

    Note over User,ReactQuery: Title Change Flow
    User->>NoteEditor: Edit title
    NoteEditor->>NoteEditor: setTitle(new title)
    NoteEditor->>NoteEditor: onActiveNoteTitleChangeRef(new title)
    NoteEditor->>NotebookWorkspace: onActiveNoteTitleChange(new title)
    NotebookWorkspace->>NotebookWorkspace: setActiveNoteTitle(new title)

    Note over User,ReactQuery: Save Flow
    User->>NoteEditor: Trigger save
    NoteEditor->>NoteEditor: saveNote()
    rect rgba(100, 200, 100, 0.5)
        NoteEditor->>NoteEditor: onNoteSavedRef()
        NoteEditor->>NotebookWorkspace: onNoteSaved()
    end
    NotebookWorkspace->>ReactQuery: invalidateQueries(["notes", notebookId])
    ReactQuery->>NotebookWorkspace: Cache invalidated
    NoteEditor->>NoteEditor: setStatus("saved")
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~22 minutes

Poem

🐰 Hops through callbacks and configs we go,
Titles now whisper as edits flow,
Caches refresh when saved notes glow,
Styles refined and boundaries set—
The prettiest workspace yet!

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/smtp-from-fallback-prod-tweaks

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@LinMoQC LinMoQC merged commit ca9485a into main Mar 26, 2026
3 of 5 checks passed
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.

1 participant