fix: redirect /settings to /settings/preferences

Move Profile page to /settings/profile and add a 302 redirect from
/settings to /settings/preferences so the first settings tab is
Preferences, not Profile.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Frederic Cabassut
2026-03-10 15:10:31 +01:00
co-authored by Claude Opus 4.6
parent 1f3a8d1e36
commit ec4ab031ee
4 changed files with 10 additions and 5 deletions
+2 -2
View File
@@ -29,8 +29,8 @@
</li>
<li>
<a
href="/settings"
class="flex items-center gap-2 rounded-sm px-3 py-2 text-sm whitespace-nowrap transition-colors {pathname === '/settings' ? 'bg-[var(--primary)]/15 text-[var(--primary)] font-medium' : 'text-[var(--text)] hover:bg-[var(--bg-base)]'}"
href="/settings/profile"
class="flex items-center gap-2 rounded-sm px-3 py-2 text-sm whitespace-nowrap transition-colors {pathname === '/settings/profile' ? 'bg-[var(--primary)]/15 text-[var(--primary)] font-medium' : 'text-[var(--text)] hover:bg-[var(--bg-base)]'}"
>
<User size={16} />
Profile
@@ -0,0 +1,5 @@
import { redirect } from '@sveltejs/kit';
export function load() {
redirect(302, '/settings/preferences');
}
+3 -3
View File
@@ -114,8 +114,8 @@ test.describe('Settings — API Key Management', () => {
// When the user clicks the Settings link in the sidebar
await page.getByTestId('settings-link').click();
// Then the settings page is shown
await expect(page).toHaveURL('/settings');
// Then the settings page redirects to preferences
await expect(page).toHaveURL('/settings/preferences');
await expect(page.getByRole('heading', { name: 'Settings' })).toBeVisible();
});
@@ -134,6 +134,6 @@ test.describe('Settings — API Key Management', () => {
// When the user clicks back to Profile
await page.getByRole('link', { name: 'Profile' }).click();
await expect(page).toHaveURL('/settings');
await expect(page).toHaveURL('/settings/profile');
});
});