POP3 Forwarder
diff --git a/frontend/src/lib/api.ts b/frontend/src/lib/api.ts
index f96230d..68b913f 100644
--- a/frontend/src/lib/api.ts
+++ b/frontend/src/lib/api.ts
@@ -79,7 +79,7 @@ export interface MailAccount {
export interface MailAccountCreate {
name: string;
- email_address?: string;
+ email_address: string;
protocol: string;
host: string;
port: number;
@@ -87,7 +87,7 @@ export interface MailAccountCreate {
use_tls?: boolean;
username: string;
password: string;
- forward_to?: string;
+ forward_to: string;
delivery_method?: string;
is_enabled?: boolean;
check_interval_minutes?: number;
@@ -176,6 +176,11 @@ export const userApi = {
const response = await api.get("/users/me");
return response.data;
},
+
+ async updateProfile(data: { full_name?: string; email?: string }): Promise {
+ const response = await api.put("/users/me", data);
+ return response.data;
+ },
};
// ββ Mail Accounts API βββββββββββββββββββββββββββββββββββββββββββββββββββ
From eb76fe4a63b5374882a5ad71e5f317f38278e964 Mon Sep 17 00:00:00 2001
From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com>
Date: Wed, 25 Mar 2026 09:52:53 +0000
Subject: [PATCH 3/3] fix: resolve ESLint errors in login and settings pages
(CI failure)
- login/page.tsx: remove unused _setUser binding and useAuthStore import
- login/page.tsx: replace unused _err catch binding with bare catch {}
- settings/page.tsx: remove useEffect calling setProfileForm synchronously
(react-hooks/set-state-in-effect error); form already initialised from
user in useState so the effect was redundant
- npm run lint now exits 0 with no errors or warnings
Co-authored-by: christianlouis <361235+christianlouis@users.noreply.github.com>
Agent-Logs-Url: https://github.com/christianlouis/pop_puller_to_gmail/sessions/5140cd73-e2f0-41a8-ad3e-267d82d3700b
---
CHANGELOG.md | 1 +
frontend/src/app/login/page.tsx | 4 +---
frontend/src/app/settings/page.tsx | 12 +-----------
3 files changed, 3 insertions(+), 14 deletions(-)
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 52739a1..0482414 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -8,6 +8,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
## [Unreleased]
### Fixed
+- Fixed three ESLint errors that caused CI to fail: removed unused `_setUser` store binding and unused `useAuthStore` import from `login/page.tsx`; replaced unused `_err` catch binding with a bare `catch {}` in `login/page.tsx`; removed a `useEffect` in `settings/page.tsx` that called `setProfileForm` synchronously (flagged by `react-hooks/set-state-in-effect`) β the effect was redundant because `useState` already initialises the form from the auth store's `user` object, which is the same value passed as `initialData` to `useQuery`.
- Fixed wizard to create new mail accounts showing a big grey screen: `bg-opacity-75` was removed in Tailwind CSS v4; replaced with the `/75` opacity modifier syntax (`bg-gray-500/75`) in `AddMailAccountModal` and `DashboardLayout` mobile overlay. Restructured the modal from the deprecated `inline-block align-bottom` centering trick to a proper flexbox layout with `relative z-10` on the modal content.
- Fixed mail account creation always failing with a backend validation error: `email_address` and `forward_to` are required fields in the backend schema but were missing from the `AddMailAccountModal` form. Added both fields to the form β `email_address` is auto-synced from the username input, and `forward_to` (destination Gmail address) is a new explicit field pre-populated from the logged-in user's email. Also added `delivery_method` selector and `delete_after_forward` checkbox.
- Implemented the Settings page (was a placeholder showing "coming soon"): now includes a Profile section to update name and email via `PUT /users/me`, an Account Information section showing subscription tier/status and member-since date, and a Security section.
diff --git a/frontend/src/app/login/page.tsx b/frontend/src/app/login/page.tsx
index b7efa27..49d00ae 100644
--- a/frontend/src/app/login/page.tsx
+++ b/frontend/src/app/login/page.tsx
@@ -4,11 +4,9 @@ import { useState } from 'react';
import { useRouter } from 'next/navigation';
import Link from 'next/link';
import { authApi } from '@/lib/api';
-import { useAuthStore } from '@/store/authStore';
export default function LoginPage() {
const router = useRouter();
- const _setUser = useAuthStore((state) => state.setUser);
const [email, setEmail] = useState('');
const [password, setPassword] = useState('');
const [error, setError] = useState('');
@@ -38,7 +36,7 @@ export default function LoginPage() {
const redirectUri = `${window.location.origin}/auth/callback`;
const authUrl = await authApi.getGoogleAuthUrl(redirectUri);
window.location.href = authUrl;
- } catch (_err: unknown) {
+ } catch {
setError('Failed to initialize Google login');
}
};
diff --git a/frontend/src/app/settings/page.tsx b/frontend/src/app/settings/page.tsx
index 31d2454..f273ef0 100644
--- a/frontend/src/app/settings/page.tsx
+++ b/frontend/src/app/settings/page.tsx
@@ -1,6 +1,6 @@
'use client';
-import { useEffect, useState } from 'react';
+import { useState } from 'react';
import { useMutation, useQuery, useQueryClient } from '@tanstack/react-query';
import { AuthGuard } from '@/components/AuthGuard';
import { DashboardLayout } from '@/components/DashboardLayout';
@@ -35,16 +35,6 @@ function SettingsContent() {
initialData: user ?? undefined,
});
- // Sync form when server data arrives
- useEffect(() => {
- if (currentUser) {
- setProfileForm({
- full_name: currentUser.full_name || '',
- email: currentUser.email || '',
- });
- }
- }, [currentUser]);
-
const updateProfileMutation = useMutation({
mutationFn: (data: { full_name: string; email: string }) =>
userApi.updateProfile(data),