From fb3311cb7f2e4b630d34b9493b93ee289c17392b Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sat, 28 Mar 2026 19:55:11 +0000 Subject: [PATCH 1/2] Initial plan From f7caa05c8ff7b1a4a39792bbe28c5eaf18195b45 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sat, 28 Mar 2026 20:03:19 +0000 Subject: [PATCH 2/2] Fix provider logos, improve Fetch button UX on mail accounts page Agent-Logs-Url: https://github.com/christianlouis/InboxConverge/sessions/058b6481-f8eb-43ed-8f5f-715c19c4a377 Co-authored-by: christianlouis <361235+christianlouis@users.noreply.github.com> --- CHANGELOG.md | 6 +++++ backend/app/api/v1/endpoints/mail_accounts.py | 1 + backend/app/models/schemas.py | 2 ++ docs/TODO.md | 3 +++ frontend/src/app/accounts/page.tsx | 26 ++++++++++++++++--- .../src/components/AddMailAccountModal.tsx | 4 ++- frontend/src/components/ProviderWizard.tsx | 2 ++ frontend/src/lib/api.ts | 2 ++ 8 files changed, 42 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index a222f96..97e6a42 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 +## [Unreleased] + +### Fixed +- Provider logos now appear on the Mail Accounts page: `provider_name` is correctly saved when creating accounts via the provider wizard and propagated through backend/frontend schemas. +- Fetch-emails button now shows a text label ("Fetch"), a descriptive tooltip, a "Fetching…" loading state, and a brief green "Queued!" confirmation after the action completes. + ## v0.3.2 (2026-03-28) ### Bug Fixes diff --git a/backend/app/api/v1/endpoints/mail_accounts.py b/backend/app/api/v1/endpoints/mail_accounts.py index 3d870f4..34174a2 100644 --- a/backend/app/api/v1/endpoints/mail_accounts.py +++ b/backend/app/api/v1/endpoints/mail_accounts.py @@ -104,6 +104,7 @@ async def create_mail_account( check_interval_minutes=account_in.check_interval_minutes, max_emails_per_check=account_in.max_emails_per_check, delete_after_forward=account_in.delete_after_forward, + provider_name=account_in.provider_name, ) db.add(account) diff --git a/backend/app/models/schemas.py b/backend/app/models/schemas.py index 51d6fff..f630f60 100644 --- a/backend/app/models/schemas.py +++ b/backend/app/models/schemas.py @@ -113,6 +113,7 @@ class MailAccountBase(BaseModel): check_interval_minutes: int = Field(default=5, gt=0, le=1440) max_emails_per_check: int = Field(default=50, gt=0, le=1000) delete_after_forward: bool = True + provider_name: Optional[str] = Field(None, max_length=100) class MailAccountCreate(MailAccountBase): @@ -135,6 +136,7 @@ class MailAccountUpdate(BaseModel): check_interval_minutes: Optional[int] = Field(None, gt=0, le=1440) max_emails_per_check: Optional[int] = Field(None, gt=0, le=1000) delete_after_forward: Optional[bool] = None + provider_name: Optional[str] = Field(None, max_length=100) class MailAccountResponse(MailAccountBase): diff --git a/docs/TODO.md b/docs/TODO.md index 82bca22..a8862f8 100644 --- a/docs/TODO.md +++ b/docs/TODO.md @@ -4,6 +4,9 @@ Comprehensive task breakdown for repository improvements and production readines ## ✅ Recently Completed +- [x] **Provider logos now saved on account creation**: `provider_name` field added to `MailAccountCreate` and `MailAccountUpdate` schemas (backend and frontend). `ProviderWizard` now passes `provider_name` in its `onSelect` callback; `AddMailAccountModal` stores it so logos are displayed correctly on the accounts page. +- [x] **Fetch button UX improvements**: The "fetch emails" button on the accounts page now shows a "Fetch" text label for clarity, a tooltip explaining its purpose, a spinning "Fetching…" state during the API call, and a brief green "Queued!" confirmation after success. + - [x] **Pull Now**: Added "Pull Now" button on Accounts page that immediately queues a `process_mail_account` Celery task via `POST /mail-accounts/{id}/pull-now`. Button shows spinner while in flight and is disabled for inactive accounts. - [x] Fixed 21 mypy type errors: `Column[T]` vs native type mismatches in `notification_service.py`, `mail_processor.py`, `auth.py`, `tasks.py`, `providers.py`, `mail_accounts.py`, and `main.py` (`lifespan` parameter rename). - [x] **Provider logos rework**: Logos now displayed as full-width banner strips at the top of each account card using `next/image fill + object-contain`. Handles all aspect ratios (1:1 square to 6:1 wordmark) without distortion. Proton Mail added. diff --git a/frontend/src/app/accounts/page.tsx b/frontend/src/app/accounts/page.tsx index 6e6aae5..714aa91 100644 --- a/frontend/src/app/accounts/page.tsx +++ b/frontend/src/app/accounts/page.tsx @@ -53,6 +53,7 @@ export default function AccountsPage() { const [isModalOpen, setIsModalOpen] = useState(false); const [editingAccount, setEditingAccount] = useState(null); const [pullingIds, setPullingIds] = useState>(new Set()); + const [successIds, setSuccessIds] = useState>(new Set()); const queryClient = useQueryClient(); const { data: accounts, isLoading } = useQuery({ @@ -101,6 +102,14 @@ export default function AccountsPage() { setPullingIds((prev) => new Set(prev).add(id)); try { await mailAccountsApi.pullNow(id); + setSuccessIds((prev) => new Set(prev).add(id)); + setTimeout(() => { + setSuccessIds((prev) => { + const next = new Set(prev); + next.delete(id); + return next; + }); + }, 2000); } catch { alert('Failed to queue pull'); } finally { @@ -227,11 +236,22 @@ export default function AccountsPage() {