Add backend unit test framework and modularize settings UI

Introduced a Vitest-based backend unit testing framework with supporting scripts, helpers, and GitHub Actions integration. Refactored the admin settings page to a modular architecture, splitting monolithic logic into feature-specific tabs and hooks for improved maintainability and testability. Updated documentation to reflect the new testing setup and settings architecture, and added new dependencies for testing utilities.
This commit is contained in:
kikootwo
2026-01-15 16:49:59 -05:00
parent b3f89d67bb
commit 94dbaf073b
127 changed files with 23549 additions and 2868 deletions
@@ -191,9 +191,10 @@ async function authenticatedHandler(req: AuthenticatedRequest) {
if (!response.ok) {
const errorText = await response.text();
logger.error('Custom provider connection error', { error: errorText });
// Return 400 (not the external service's status) to prevent triggering logout on 401
return NextResponse.json(
{ error: `Failed to connect to custom provider: ${response.status} ${errorText}` },
{ status: response.status }
{ status: 400 }
);
}
@@ -382,9 +383,10 @@ async function unauthenticatedHandler(req: NextRequest) {
if (!response.ok) {
const errorText = await response.text();
logger.error('Custom provider connection error', { error: errorText });
// Return 400 (not the external service's status) to prevent triggering logout on 401
return NextResponse.json(
{ error: `Failed to connect to custom provider: ${response.status} ${errorText}` },
{ status: response.status }
{ status: 400 }
);
}