ServerKit is a lightweight, modern server control panel for managing web applications, databases, and services on your VPS or dedicated server. Built with Python/Flask backend and React frontend.
Python astracloudflarecontrol-panelcyberpaneldnsfablehosting-control-panelhosting-panelkimi-k3server-managementserverkitubuntu-web-panelwebserver
fix(settings): restore table surfaces and improve access review
Juan Denisc62358de7329
diff --git a/.github/workflows/frontend-ci.yml b/.github/workflows/frontend-ci.ymlindex 513c349f..7c92f965 100644--- a/.github/workflows/frontend-ci.yml+++ b/.github/workflows/frontend-ci.yml@@ -63,3 +63,16 @@ jobs:# node --test over src/**/__tests__ — pure-logic modules, no jsdom.working-directory: frontendrun: npm test+ - name: Install browser for Settings regressions+ working-directory: frontend+ run: npx playwright install --with-deps chromium+ - name: Settings browser regressions+ working-directory: frontend+ run: npm run test:browser+ - name: Upload Settings screenshots+ if: always()+ uses: actions/upload-artifact@v4+ with:+ name: settings-browser-screenshots+ path: frontend/test-results/+ if-no-files-found: ignorediff --git a/.gitignore b/.gitignoreindex aeefdab7..065d10bf 100644--- a/.gitignore+++ b/.gitignore@@ -222,3 +222,6 @@ frontend/src/plugins/serverkit-wordpress/# Extension release signing keys (private halves — never commit; see scripts/sign-extension.mjs)scripts/keys/++# Local/CI browser regression screenshots+frontend/test-results/diff --git a/frontend/package-lock.json b/frontend/package-lock.jsonindex f1dd467f..44461b32 100644--- a/frontend/package-lock.json+++ b/frontend/package-lock.json@@ -53,6 +53,7 @@"eslint-plugin-react-refresh": "^0.4.9","espree": "^11.2.0","globals": "^15.9.0",+ "playwright": "1.61.1","sass": "^1.86.0","vite": "^8.1.4"},diff --git a/frontend/package.json b/frontend/package.jsonindex 360c790a..610f1f89 100644--- a/frontend/package.json+++ b/frontend/package.json@@ -7,6 +7,7 @@"dev": "vite","build": "vite build","test": "node --test",+ "test:browser": "node scripts/settings-browser.mjs","lint": "eslint . && node scripts/check-font-integrity.mjs && node scripts/check-settings-index.mjs && node scripts/check-theme-tokens.mjs && node scripts/check-frontend-boundaries.mjs && node scripts/check-style-ownership.mjs && node scripts/check-status-one-door.mjs && node scripts/check-status-scss.mjs && node scripts/check-i18n-literals.mjs && node scripts/check-intl-door.mjs && node scripts/extract-i18n.mjs --check && node scripts/check-i18n.mjs && node scripts/check-logical-properties.mjs && node scripts/generate-vendor-shims.mjs --check && node ../scripts/check-html-sinks.mjs","lint:settings-index": "node scripts/check-settings-index.mjs","lint:fonts": "node scripts/check-font-integrity.mjs",@@ -72,6 +73,7 @@"eslint-plugin-react-refresh": "^0.4.9","espree": "^11.2.0","globals": "^15.9.0",+ "playwright": "1.61.1","sass": "^1.86.0","vite": "^8.1.4"},diff --git a/frontend/scripts/settings-browser.mjs b/frontend/scripts/settings-browser.mjsnew file mode 100644index 00000000..7de36389--- /dev/null+++ b/frontend/scripts/settings-browser.mjs@@ -0,0 +1,135 @@+// Render actual Settings components with synthetic responses; no backend needed.+import assert from 'node:assert/strict';+import { createServer } from 'vite';+import { chromium } from 'playwright';+import { mkdir } from 'node:fs/promises';++async function withinDeadline(signal) {+ let timer;+ try {+ return await Promise.race([+ signal,+ new Promise((_, reject) => {+ timer = setTimeout(() => reject(new Error('Expected API request was not sent within 10 seconds')), 10000);+ }),+ ]);+ } finally {+ clearTimeout(timer);+ }+}++const users = [+ { id: 1, username: 'operator', email: '[email protected]', role: 'admin', is_active: true, totp_enabled: true, passkey_enabled: true },+ { id: 2, username: 'needs-mfa', email: '[email protected]', role: 'admin', is_active: true, totp_enabled: false },+ { id: 3, username: 'disabled-admin', email: '[email protected]', role: 'admin', is_active: false, totp_enabled: false },+].map((user) => ({ ...user, auth_provider: 'local', permissions: {}, created_at: '2026-08-15T14:30:00Z' }));+const invitations = [{ id: 1, email: '[email protected]', role: 'viewer', status: 'pending', token: 'synthetic', created_at: '2026-08-15T14:30:00Z', expires_at: '2099-01-01T00:00:00Z', is_expired: false }];++const server = await createServer({ server: { host: '127.0.0.1', port: 0, strictPort: false, open: false } });+let browser;+try {+ await server.listen();+ const base = server.resolvedUrls.local[0];+ browser = await chromium.launch({ headless: true });+ await mkdir('test-results', { recursive: true });+ for (const theme of ['dark', 'light']) {+ const context = await browser.newContext({ viewport: { width: 1440, height: 1000 } });+ await context.addInitScript((value) => {+ localStorage.setItem('access_token', 'synthetic-browser-fixture');+ document.addEventListener('DOMContentLoaded', () => {+ document.documentElement.setAttribute('data-theme', value);+ }, { once: true });+ }, theme);+ const page = await context.newPage();+ const errors = [];+ page.on('pageerror', (error) => errors.push(error.message));+ let resolveUsers;+ const ready = new Promise((resolve) => { resolveUsers = resolve; });+ let empty = false;+ let fail = false;+ let deletes = 0;+ let releaseDelete;+ let notifyDelete;+ const deleteStarted = new Promise((resolve) => { notifyDelete = resolve; });+ let revokes = 0;+ let releaseRevoke;+ let notifyRevoke;+ const revokeStarted = new Promise((resolve) => { notifyRevoke = resolve; });+ await page.route('**/api/v1/**', async (route) => {+ const url = new URL(route.request().url());+ let payload = {};+ if (url.pathname.endsWith('/admin/users') && route.request().method() === 'GET') {+ await ready;+ if (fail) return route.fulfill({ status: 500, json: { error: 'Synthetic users failure' } });+ payload = { users: empty ? [] : users };+ } else if (/\/admin\/users\/\d+$/.test(url.pathname) && route.request().method() === 'DELETE') {+ deletes += 1;+ await new Promise((resolve) => { releaseDelete = resolve; notifyDelete(); });+ return route.fulfill({ json: { message: 'Deleted' } });+ } else if (url.pathname.endsWith('/auth/setup-status')) payload = { needs_setup: false };+ else if (url.pathname.endsWith('/auth/me')) payload = { user: users[0] };+ else if (url.pathname.includes('/admin/invitations') && route.request().method() === 'DELETE') {+ revokes += 1;+ await new Promise((resolve) => { releaseRevoke = resolve; notifyRevoke(); });+ return route.fulfill({ status: 500, json: { error: 'Synthetic revoke failure' } });+ }+ else if (url.pathname.includes('/admin/invitations')) payload = { invitations };+ else if (url.pathname.endsWith('/auth/login-links')) payload = { links: [] };+ else if (url.pathname.endsWith('/views')) payload = { views: [] };+ await route.fulfill({ json: payload });+ });+ await page.goto(`${base}tests/browser/settings.html`);+ await page.getByText('Loading users…', { exact: true }).waitFor();+ resolveUsers();+ await page.locator('.users-table').first().getByText('needs-mfa', { exact: true }).waitFor();+ await page.getByText('[email protected]', { exact: true }).waitFor();+ const surfaces = await page.locator('.users-table-container').evaluateAll((nodes) => nodes.map((node) => {+ const style = getComputedStyle(node);+ return { color: style.backgroundColor, surface: style.getPropertyValue('--surface').trim() };+ }));+ assert.equal(surfaces.length, 2);+ for (const surface of surfaces) assert.notEqual(surface.color, 'rgba(0, 0, 0, 0)', `${theme} table has no resting surface`);+ await page.screenshot({ path: `test-results/settings-${theme}.png`, fullPage: true });+ assert.equal(await page.getByRole('columnheader', { name: /^MFA\b/ }).count(), 1);+ assert.equal(await page.getByRole('columnheader', { name: /^Passkey\b/ }).count(), 1);++ await page.getByRole('button', { name: 'All users', exact: true }).click();+ await page.getByRole('button', { name: 'Admins without MFA', exact: true }).click();+ await page.locator('.users-table').first().getByText('needs-mfa', { exact: true }).waitFor();+ assert.equal(await page.locator('.users-table').first().locator('tbody tr').count(), 1);+ assert.equal(await page.locator('.users-table').first().getByText('disabled-admin', { exact: true }).count(), 0);++ await page.getByRole('button', { name: 'Delete user', exact: true }).click();+ await page.getByRole('alertdialog').waitFor();+ await page.getByRole('alertdialog').getByRole('button', { name: 'Delete User', exact: true }).click();+ await withinDeadline(deleteStarted);+ await page.waitForFunction(() => document.querySelector('.users-table button[aria-busy="true"]'));+ assert.equal(await page.locator('.users-table').first().locator('tbody button:not(:disabled)').count(), 0);+ assert.equal(deletes, 1);+ releaseDelete();+ await page.locator('.users-table').first().getByText('needs-mfa', { exact: true }).waitFor();++ const inviteSection = page.locator('.invitations-section');+ await inviteSection.getByRole('button', { name: 'Revoke', exact: true }).click();+ await withinDeadline(revokeStarted);+ assert.equal(await inviteSection.getByRole('button', { name: 'Revoke', exact: true }).isDisabled(), true);+ assert.equal(await inviteSection.getByRole('button', { name: 'Resend', exact: true }).isDisabled(), true);+ assert.equal(revokes, 1);+ releaseRevoke();+ await inviteSection.getByRole('alert').filter({ hasText: 'Synthetic revoke failure' }).waitFor();+ assert.equal(await inviteSection.getByRole('button', { name: 'Revoke', exact: true }).isEnabled(), true);++ empty = true;+ await page.reload();+ await page.locator('.users-tab .empty-state').first().waitFor();+ fail = true;+ await page.reload();+ await page.getByRole('alert').filter({ hasText: 'Synthetic users failure' }).waitFor();+ assert.deepEqual(errors, []);+ await context.close();+ console.log(`Settings ${theme}: surfaces, MFA view, guarded delete/revoke, loading, empty and error states passed`);+ }+} finally {+ await browser?.close();+ await server.close();+}diff --git a/frontend/src/components/settings/InvitationsTab.jsx b/frontend/src/components/settings/InvitationsTab.jsxindex cf01d96b..8c237b78 100644--- a/frontend/src/components/settings/InvitationsTab.jsx+++ b/frontend/src/components/settings/InvitationsTab.jsx@@ -1,4 +1,4 @@-import { useState, useEffect } from 'react';+import { useState, useEffect, useCallback, useRef } from 'react';import api from '../../services/api';import InviteModal from './InviteModal';import { Button } from '@/components/ui/button';@@ -14,6 +14,7 @@ import EmptyState from '../EmptyState';import { copyToClipboard } from '@/utils/clipboard';import { useTranslation } from 'react-i18next';import useFocusParam from '@/hooks/useFocusParam';+import useFormat from '@/hooks/useFormat';// A pending invite whose window has closed still carries status 'pending' in// the database — the row only becomes 'expired' on screen. One accessor for@@ -72,6 +73,10 @@ const InvitationsTab = () => {const [loading, setLoading] = useState(true);const [showInviteModal, setShowInviteModal] = useState(false);const [copied, setCopied] = useState(null);+ const [error, setError] = useState('');+ const [pendingId, setPendingId] = useState(null);+ const actionInFlight = useRef(false);+ const { formatDate: formatLocaleDate } = useFormat();useFocusParam('create', (target) => {if (target === 'invitation') setShowInviteModal(true);@@ -87,36 +92,48 @@ const InvitationsTab = () => {storageKey: 'serverkit-table-settings-invitations-cols',});- useEffect(() => {- loadInvitations();- }, []);-- async function loadInvitations() {+ const loadInvitations = useCallback(async () => {try {setLoading(true);const data = await api.getInvitations();setInvitations(data.invitations || []);- } catch {- // Silently handle+ setError('');+ } catch (err) {+ setError(err.message || t('app.invitationsTab.loadFailed', 'Failed to load invitations'));} finally {setLoading(false);}- }+ }, [t]);++ useEffect(() => { loadInvitations(); }, [loadInvitations]);async function handleRevoke(id) {+ if (actionInFlight.current) return;+ actionInFlight.current = true;+ setPendingId(id);try {await api.revokeInvitation(id);await loadInvitations();- } catch {- // Silently handle+ } catch (err) {+ setError(err.message || t('app.invitationsTab.revokeFailed', 'Failed to revoke invitation'));+ } finally {+ actionInFlight.current = false;+ setPendingId(null);}}async function handleResend(id) {+ if (actionInFlight.current) return;+ actionInFlight.current = true;+ setPendingId(id);try {await api.resendInvitation(id);- } catch {- // Silently handle+ setError('');+ } catch (err) {+ setError(err.message || t('app.invitationsTab.resendFailed', 'Failed to resend invitation'));+ } finally {+ actionInFlight.current = false;+ setPendingId(null);}}@@ -128,10 +145,7 @@ const InvitationsTab = () => {}function formatDate(dateString) {- if (!dateString) return 'Never';- return new Date(dateString).toLocaleDateString('en-US', {- year: 'numeric', month: 'short', day: 'numeric'- });+ return formatLocaleDate(dateString, { fallback: t('app.invitationsTab.never', 'Never') });}function getRoleBadgeVariant(role) {@@ -240,6 +254,8 @@ const InvitationsTab = () => {variant="ghost"size="sm"onClick={() => handleResend(inv.id)}+ disabled={pendingId !== null}+ aria-busy={pendingId === inv.id}title={t('app.invitationsTab.resendEmail', 'Resend email')}>{t('app.invitationsTab.resend', 'Resend')}@@ -249,8 +265,10 @@ const InvitationsTab = () => {variant="ghost"size="sm"onClick={() => handleRevoke(inv.id)}+ disabled={pendingId !== null}+ aria-busy={pendingId === inv.id}title={t('app.invitationsTab.revokeInvitation', 'Revoke invitation')}- className="text-destructive hover:text-destructive"+ className="users-action--danger">{t('app.invitationsTab.revoke', 'Revoke')}</Button>@@ -311,9 +329,11 @@ const InvitationsTab = () => {<GridChips {...chrome.chipProps} />+ {error && <div className="error-message" role="alert">{error}</div>}+{loading ? (<div className="loading-state">{t('app.invitationsTab.loadingInvitations', 'Loading invitations…')}</div>- ) : invitations.length === 0 ? (+ ) : invitations.length === 0 && !error ? (<EmptyState title={t('app.invitationsTab.noInvitationsYet', 'No invitations yet')} />) : (<div className="users-table-container">diff --git a/frontend/src/components/settings/UsersTab.jsx b/frontend/src/components/settings/UsersTab.jsxindex 0b89aeb0..0c2c5030 100644--- a/frontend/src/components/settings/UsersTab.jsx+++ b/frontend/src/components/settings/UsersTab.jsx@@ -1,10 +1,11 @@-import { useState, useEffect } from 'react';+import { useState, useEffect, useCallback, useRef } from 'react';import api from '../../services/api';import { useAuth } from '../../contexts/AuthContext';import UserModal from './UserModal';import InvitationsTab from './InvitationsTab';import LoginLinksSection from './LoginLinksSection';-import Modal from '../Modal';+import { useConfirm } from '../../hooks/useConfirm';+import useFormat from '../../hooks/useFormat';import { Button } from '@/components/ui/button';import { Badge } from '@/components/ui/badge';import { DataTable } from '@/components/ds';@@ -26,6 +27,22 @@ const statusLabel = (user) => (user.is_active ? 'Active' : 'Disabled');// strings here are the LABELS the cells render ('Disabled', 'admin') rather// than whatever the API happens to call the field.const USER_VIEWS = [+ {+ name: 'Admins without MFA',+ state: {+ sorts: [{ key: 'user', direction: 'asc' }],+ hiddenKeys: [],+ groupBy: null,+ columnFilters: {+ match: 'all',+ rules: [+ { id: 'uv-mfa-role', field: 'role', op: 'any', value: ['admin'] },+ { id: 'uv-mfa-active', field: 'status', op: 'any', value: ['Active'] },+ { id: 'uv-mfa-off', field: 'mfa', op: 'is', value: false },+ ],+ },+ },+ },{// Who can do anything on this panel. It is the first question of an// access review and the one a flat alphabetical list buries as soon as@@ -77,7 +94,10 @@ const UsersTab = () => {const [error, setError] = useState('');const [showModal, setShowModal] = useState(false);const [editingUser, setEditingUser] = useState(null);- const [deleteConfirm, setDeleteConfirm] = useState(null);+ const [pendingUserId, setPendingUserId] = useState(null);+ const actionInFlight = useRef(false);+ const { confirm } = useConfirm();+ const { formatDateTime } = useFormat();const { user: currentUser } = useAuth();// Lifted out of <DataTable> so a saved view can capture them. The storage@@ -92,22 +112,22 @@ const UsersTab = () => {// Not persisted on its own: a grouping worth keeping is a saved view.const [groupBy, setGroupBy] = useState(null);- useEffect(() => {- loadUsers();- }, []);-- async function loadUsers() {+ const loadUsers = useCallback(async () => {try {setLoading(true);const data = await api.getUsers();- setUsers(data.users);+ setUsers(data.users || []);setError('');} catch (err) {- setError(err.message || 'Failed to load users');+ setError(err.message || t('app.usersTab.loadFailed', 'Failed to load users'));} finally {setLoading(false);}- }+ }, [t]);++ useEffect(() => {+ loadUsers();+ }, [loadUsers]);function handleAddUser() {setEditingUser(null);@@ -135,21 +155,38 @@ const UsersTab = () => {}async function handleDeleteUser(user) {+ if (actionInFlight.current) return;+ actionInFlight.current = true;+ setPendingUserId(user.id);try {+ if (!await confirm({+ title: t('app.usersTab.deleteUser2', 'Delete User'),+ message: t('app.usersTab.confirmDeleteUser', 'Delete {{username}}? This action cannot be undone.', { username: user.username }),+ confirmText: t('app.usersTab.deleteUser2', 'Delete User'),+ variant: 'danger',+ })) return;await api.deleteUser(user.id);- setDeleteConfirm(null);await loadUsers();} catch (err) {- setError(err.message || 'Failed to delete user');+ setError(err.message || t('app.usersTab.deleteFailed', 'Failed to delete user'));+ } finally {+ actionInFlight.current = false;+ setPendingUserId(null);}}async function handleToggleActive(user) {+ if (actionInFlight.current) return;+ actionInFlight.current = true;+ setPendingUserId(user.id);try {await api.updateUser(user.id, { is_active: !user.is_active });await loadUsers();} catch (err) {- setError(err.message || 'Failed to update user status');+ setError(err.message || t('app.usersTab.updateFailed', 'Failed to update user status'));+ } finally {+ actionInFlight.current = false;+ setPendingUserId(null);}}@@ -162,13 +199,8 @@ const UsersTab = () => {}function formatDate(dateString) {- if (!dateString) return 'Never';- return new Date(dateString).toLocaleDateString('en-US', {- year: 'numeric',- month: 'short',- day: 'numeric',- hour: '2-digit',- minute: '2-digit'+ return formatDateTime(dateString, {+ fallback: t('app.usersTab.never', 'Never'),});}@@ -235,10 +267,38 @@ const UsersTab = () => {value: statusLabel,render: (user) => (<span className={`status-badge ${user.is_active ? 'active' : 'inactive'}`}>- {statusLabel(user)}+ {user.is_active ? t('app.usersTab.active', 'Active') : t('app.usersTab.disabled', 'Disabled')}</span>),},+ {+ key: 'mfa',+ headerKey: 'app.usersTab.mfa', header: 'MFA',+ type: 'bool',+ sortable: true,+ value: (user) => Boolean(user.totp_enabled),+ render: (user) => (+ <Badge variant={user.totp_enabled ? 'success' : 'warning'}>+ {user.totp_enabled ? t('app.usersTab.enabled', 'Enabled') : t('app.usersTab.notEnabled', 'Not enabled')}+ </Badge>+ ),+ },+ {+ key: 'passkey',+ headerKey: 'app.usersTab.passkey', header: 'Passkey',+ type: 'bool',+ value: (user) => Boolean(user.passkey_enabled),+ render: (user) => user.passkey_enabled+ ? t('app.usersTab.enrolled', 'Enrolled') : t('app.usersTab.notEnrolled', 'Not enrolled'),+ },+ {+ key: 'authProvider',+ headerKey: 'app.usersTab.signInMethod', header: 'Sign-in provider',+ type: 'enum',+ value: (user) => user.auth_provider || 'local',+ render: (user) => (!user.auth_provider || user.auth_provider === 'local')+ ? t('app.usersTab.local', 'Local') : user.auth_provider,+ },{// Sortable and typed rather than render-only: "when did this person// last sign in" is the access-review question, and without an@@ -277,6 +337,7 @@ const UsersTab = () => {variant="ghost"size="sm"onClick={() => handleEditUser(user)}+ disabled={pendingUserId !== null}title={t('app.usersTab.editUser', 'Edit user')}><svg viewBox="0 0 24 24" width="16" height="16" stroke="currentColor" fill="none" strokeWidth="2">@@ -290,8 +351,10 @@ const UsersTab = () => {variant="ghost"size="sm"onClick={() => handleToggleActive(user)}+ disabled={pendingUserId !== null}+ aria-busy={pendingUserId === user.id}title={user.is_active ? t('app.usersTab.disableUser', 'Disable user') : t('app.usersTab.enableUser', 'Enable user')}- className={user.is_active ? 'text-warning' : 'text-success'}+ className={user.is_active ? 'users-action--warning' : 'users-action--success'}>{user.is_active ? (<svg viewBox="0 0 24 24" width="16" height="16" stroke="currentColor" fill="none" strokeWidth="2">@@ -308,9 +371,11 @@ const UsersTab = () => {<Buttonvariant="ghost"size="sm"- onClick={() => setDeleteConfirm(user)}+ onClick={() => handleDeleteUser(user)}+ disabled={pendingUserId !== null}+ aria-busy={pendingUserId === user.id}title={t('app.usersTab.deleteUser', 'Delete user')}- className="text-destructive hover:text-destructive"+ className="users-action--danger"><svg viewBox="0 0 24 24" width="16" height="16" stroke="currentColor" fill="none" strokeWidth="2"><polyline points="3 6 5 6 21 6"/>@@ -369,7 +434,7 @@ const UsersTab = () => {its own: that bar held one button, and a table getsONE row of chrome. Primary action first, then theicons that act on what you are looking at. */}- <Button variant="default" size="sm" onClick={handleAddUser}>+ <Button variant="default" size="sm" onClick={handleAddUser} disabled={pendingUserId !== null}><svg viewBox="0 0 24 24" width="14" height="14" stroke="currentColor" fill="none" strokeWidth="2"><line x1="12" y1="5" x2="12" y2="19"/><line x1="5" y1="12" x2="19" y2="12"/>@@ -387,7 +452,7 @@ const UsersTab = () => {<GridChips {...chrome.chipProps} />- {error && <div className="error-message">{error}</div>}+ {error && <div className="error-message" role="alert">{error}</div>}<div {...register('users-management', 'users-table-container')}><DataTable@@ -412,21 +477,6 @@ const UsersTab = () => {/>)}- {deleteConfirm && (- <Modal open={true} onClose={() => setDeleteConfirm(null)} title={t('app.usersTab.deleteUser2', 'Delete User')} size="sm">- <p>{t('app.usersTab.areYouSureYouWantTo', 'Are you sure you want to delete')} <strong>{deleteConfirm.username}</strong>?</p>- <p className="text-muted">{t('app.usersTab.thisActionCannotBeUndone', 'This action cannot be undone.')}</p>- <div className="modal-footer">- <Button variant="ghost" onClick={() => setDeleteConfirm(null)}>- {t('common.actions.cancel', 'Cancel')}- </Button>- <Button variant="destructive" onClick={() => handleDeleteUser(deleteConfirm)}>- {t('app.usersTab.deleteUser2', 'Delete User')}- </Button>- </div>- </Modal>- )}-<LoginLinksSection users={users} currentUserId={currentUser?.id} /><InvitationsTab />diff --git a/frontend/src/i18n/locales/ar.json b/frontend/src/i18n/locales/ar.jsonindex 8a72ea65..65b880de 100644--- a/frontend/src/i18n/locales/ar.json+++ b/frontend/src/i18n/locales/ar.json@@ -6210,7 +6210,6 @@},"usersTab": {"addUser": "إضافة مستخدم",- "areYouSureYouWantTo": "هل أنت متأكد أنك تريد الحذف","deleteUser": "حذف المستخدم","deleteUser2": "حذف المستخدم","disableUser": "تعطيل المستخدم",@@ -6219,7 +6218,6 @@"lastLogin": "تسجيل الدخول الأخير","loadingUsers": "جارٍ تحميل المستخدمين...","role": "دور",- "thisActionCannotBeUndone": "لا يمكن التراجع عن هذا الإجراء.","you": "أنت"},"vaults": {diff --git a/frontend/src/i18n/locales/bn.json b/frontend/src/i18n/locales/bn.jsonindex aa33177f..348fc94f 100644--- a/frontend/src/i18n/locales/bn.json+++ b/frontend/src/i18n/locales/bn.json@@ -6210,7 +6210,6 @@},"usersTab": {"addUser": "ব্যবহারকারী যোগ করুন",- "areYouSureYouWantTo": "আপনি কি নিশ্চিত আপনি মুছে দিতে চান","deleteUser": "ব্যবহারকারী মুছুন","deleteUser2": "ব্যবহারকারী মুছুন","disableUser": "ব্যবহারকারী অক্ষম করুন",@@ -6219,7 +6218,6 @@"lastLogin": "শেষ লগইন","loadingUsers": "ব্যবহারকারী লোড হচ্ছে...","role": "ভূমিকা",- "thisActionCannotBeUndone": "এই ক্রিয়াটি পূর্বাবস্থায় ফেরানো যাবে না৷","you": "আপনি"},"vaults": {diff --git a/frontend/src/i18n/locales/de.json b/frontend/src/i18n/locales/de.jsonindex b2f0f69d..2282bd8d 100644--- a/frontend/src/i18n/locales/de.json+++ b/frontend/src/i18n/locales/de.json@@ -6210,7 +6210,6 @@},"usersTab": {"addUser": "Benutzer hinzufügen",- "areYouSureYouWantTo": "Sind Sie sicher, dass Sie löschen möchten?","deleteUser": "Benutzer löschen","deleteUser2": "Benutzer löschen","disableUser": "Benutzer deaktivieren",@@ -6219,7 +6218,6 @@"lastLogin": "Letzte Anmeldung","loadingUsers": "Benutzer werden geladen...","role": "Rolle",- "thisActionCannotBeUndone": "Diese Aktion kann nicht rückgängig gemacht werden.","you": "Du"},"vaults": {diff --git a/frontend/src/i18n/locales/en.json b/frontend/src/i18n/locales/en.jsonindex 45725390..39a2f44a 100644--- a/frontend/src/i18n/locales/en.json+++ b/frontend/src/i18n/locales/en.json@@ -2662,12 +2662,16 @@"expires": "Expires","inviteUser": "Invite User","linkOnly": "Link only",+ "loadFailed": "Failed to load invitations","loadingInvitations": "Loading invitations…",+ "never": "Never","noInvitationsYet": "No invitations yet","recipient": "Recipient","resend": "Resend","resendEmail": "Resend email",+ "resendFailed": "Failed to resend invitation","revoke": "Revoke",+ "revokeFailed": "Failed to revoke invitation","revokeInvitation": "Revoke invitation","role": "Role"},@@ -6210,17 +6214,30 @@"youCannotDeactivateYourOwnAccount": "You cannot deactivate your own account"},"usersTab": {+ "active": "Active","addUser": "Add User",- "areYouSureYouWantTo": "Are you sure you want to delete",+ "confirmDeleteUser": "Delete {{username}}? This action cannot be undone.",+ "deleteFailed": "Failed to delete user","deleteUser": "Delete user","deleteUser2": "Delete User","disableUser": "Disable user",+ "disabled": "Disabled","editUser": "Edit user","enableUser": "Enable user",+ "enabled": "Enabled",+ "enrolled": "Enrolled","lastLogin": "Last Login",+ "loadFailed": "Failed to load users","loadingUsers": "Loading users…",+ "local": "Local",+ "mfa": "MFA",+ "never": "Never",+ "notEnabled": "Not enabled",+ "notEnrolled": "Not enrolled",+ "passkey": "Passkey","role": "Role",- "thisActionCannotBeUndone": "This action cannot be undone.",+ "signInMethod": "Sign-in provider",+ "updateFailed": "Failed to update user status","you": "You"},"vaults": {diff --git a/frontend/src/i18n/locales/es.json b/frontend/src/i18n/locales/es.jsonindex 09261b44..ac4f4e1c 100644--- a/frontend/src/i18n/locales/es.json+++ b/frontend/src/i18n/locales/es.json@@ -6210,7 +6210,6 @@},"usersTab": {"addUser": "Añadir usuario",- "areYouSureYouWantTo": "¿Seguro que quieres eliminar a","deleteUser": "Eliminar usuario","deleteUser2": "Eliminar usuario","disableUser": "Desactivar usuario",@@ -6219,7 +6218,6 @@"lastLogin": "Último inicio de sesión","loadingUsers": "Cargando usuarios…","role": "Rol",- "thisActionCannotBeUndone": "Esta acción no se puede deshacer.","you": "Tú"},"vaults": {diff --git a/frontend/src/i18n/locales/fr.json b/frontend/src/i18n/locales/fr.jsonindex 11ff3893..34718f5f 100644--- a/frontend/src/i18n/locales/fr.json+++ b/frontend/src/i18n/locales/fr.json@@ -6210,7 +6210,6 @@},"usersTab": {"addUser": "Ajouter un utilisateur",- "areYouSureYouWantTo": "Etes-vous sûr de vouloir supprimer","deleteUser": "Supprimer un utilisateur","deleteUser2": "Supprimer un utilisateur","disableUser": "Désactiver l'utilisateur",@@ -6219,7 +6218,6 @@"lastLogin": "Dernière connexion","loadingUsers": "Chargement des utilisateurs...","role": "Rôle",- "thisActionCannotBeUndone": "Cette action ne peut pas être annulée.","you": "Toi"},"vaults": {diff --git a/frontend/src/i18n/locales/id.json b/frontend/src/i18n/locales/id.jsonindex ff59da71..c61aebac 100644--- a/frontend/src/i18n/locales/id.json+++ b/frontend/src/i18n/locales/id.json@@ -6210,7 +6210,6 @@},"usersTab": {"addUser": "Tambahkan Pengguna",- "areYouSureYouWantTo": "Apakah Anda yakin ingin menghapus","deleteUser": "Hapus pengguna","deleteUser2": "Hapus Pengguna","disableUser": "Nonaktifkan pengguna",@@ -6219,7 +6218,6 @@"lastLogin": "Masuk Terakhir","loadingUsers": "Memuat pengguna...","role": "Peran",- "thisActionCannotBeUndone": "Tindakan ini tidak dapat dibatalkan.","you": "Anda"},"vaults": {diff --git a/frontend/src/i18n/locales/it.json b/frontend/src/i18n/locales/it.jsonindex 6a2eabd2..d4d143e2 100644--- a/frontend/src/i18n/locales/it.json+++ b/frontend/src/i18n/locales/it.json@@ -6210,7 +6210,6 @@},"usersTab": {"addUser": "Aggiungi utente",- "areYouSureYouWantTo": "Sei sicuro di voler eliminare?","deleteUser": "Elimina utente","deleteUser2": "Elimina utente","disableUser": "Disabilita utente",@@ -6219,7 +6218,6 @@"lastLogin": "Ultimo accesso","loadingUsers": "Caricamento utenti...","role": "Ruolo",- "thisActionCannotBeUndone": "Questa azione non può essere annullata.","you": "Voi"},"vaults": {diff --git a/frontend/src/i18n/locales/ko.json b/frontend/src/i18n/locales/ko.jsonindex fffff8e5..1f2e3291 100644--- a/frontend/src/i18n/locales/ko.json+++ b/frontend/src/i18n/locales/ko.json@@ -6210,7 +6210,6 @@},"usersTab": {"addUser": "사용자 추가",- "areYouSureYouWantTo": "삭제하시겠습니까?","deleteUser": "사용자 삭제","deleteUser2": "사용자 삭제","disableUser": "사용자 비활성화",@@ -6219,7 +6218,6 @@"lastLogin": "마지막 로그인","loadingUsers": "사용자 로드 중...","role": "역할",- "thisActionCannotBeUndone": "이 작업은 취소할 수 없습니다.","you": "당신"},"vaults": {diff --git a/frontend/src/i18n/locales/pl.json b/frontend/src/i18n/locales/pl.jsonindex ca6afc09..4f8a1852 100644--- a/frontend/src/i18n/locales/pl.json+++ b/frontend/src/i18n/locales/pl.json@@ -6210,7 +6210,6 @@},"usersTab": {"addUser": "Dodaj użytkownika",- "areYouSureYouWantTo": "Czy na pewno chcesz usunąć","deleteUser": "Usuń użytkownika","deleteUser2": "Usuń użytkownika","disableUser": "Wyłącz użytkownika",@@ -6219,7 +6218,6 @@"lastLogin": "Ostatnie logowanie","loadingUsers": "Ładowanie użytkowników...","role": "Rola",- "thisActionCannotBeUndone": "Tej akcji nie można cofnąć.","you": "Ty"},"vaults": {diff --git a/frontend/src/i18n/locales/pt.json b/frontend/src/i18n/locales/pt.jsonindex 94ef2186..4288da5f 100644--- a/frontend/src/i18n/locales/pt.json+++ b/frontend/src/i18n/locales/pt.json@@ -6210,7 +6210,6 @@},"usersTab": {"addUser": "Adicionar usuário",- "areYouSureYouWantTo": "Tem certeza de que deseja excluir","deleteUser": "Excluir usuário","deleteUser2": "Excluir usuário","disableUser": "Desativar usuário",@@ -6219,7 +6218,6 @@"lastLogin": "Último login","loadingUsers": "Carregando usuários...","role": "Função",- "thisActionCannotBeUndone": "Esta ação não pode ser desfeita.","you": "Você"},"vaults": {diff --git a/frontend/src/i18n/locales/ru.json b/frontend/src/i18n/locales/ru.jsonindex 64203681..1a85d6fa 100644--- a/frontend/src/i18n/locales/ru.json+++ b/frontend/src/i18n/locales/ru.json@@ -6210,7 +6210,6 @@},"usersTab": {"addUser": "Добавить пользователя",- "areYouSureYouWantTo": "Вы уверены, что хотите удалить","deleteUser": "Удалить пользователя","deleteUser2": "Удалить пользователя","disableUser": "Отключить пользователя",@@ -6219,7 +6218,6 @@"lastLogin": "Последний вход","loadingUsers": "Загрузка пользователей...","role": "Роль",- "thisActionCannotBeUndone": "Это действие невозможно отменить.","you": "Ты"},"vaults": {diff --git a/frontend/src/i18n/locales/th.json b/frontend/src/i18n/locales/th.jsonindex f0fec66b..7a61680b 100644--- a/frontend/src/i18n/locales/th.json+++ b/frontend/src/i18n/locales/th.json@@ -6210,7 +6210,6 @@},"usersTab": {"addUser": "เพิ่มผู้ใช้",- "areYouSureYouWantTo": "คุณแน่ใจหรือไม่ว่าต้องการลบ","deleteUser": "ลบผู้ใช้","deleteUser2": "ลบผู้ใช้","disableUser": "ปิดการใช้งานผู้ใช้",@@ -6219,7 +6218,6 @@"lastLogin": "เข้าสู่ระบบครั้งล่าสุด","loadingUsers": "กำลังโหลดผู้ใช้...","role": "บทบาท",- "thisActionCannotBeUndone": "การดำเนินการนี้ไม่สามารถยกเลิกได้","you": "คุณ"},"vaults": {diff --git a/frontend/src/i18n/locales/tr.json b/frontend/src/i18n/locales/tr.jsonindex 86decb4e..d140fee8 100644--- a/frontend/src/i18n/locales/tr.json+++ b/frontend/src/i18n/locales/tr.json@@ -6210,7 +6210,6 @@},"usersTab": {"addUser": "Kullanıcı Ekle",- "areYouSureYouWantTo": "Silmek istediğinizden emin misiniz?","deleteUser": "Kullanıcıyı sil","deleteUser2": "Kullanıcıyı Sil","disableUser": "Kullanıcıyı devre dışı bırak",@@ -6219,7 +6218,6 @@"lastLogin": "Son Giriş","loadingUsers": "Kullanıcılar yükleniyor...","role": "Rol",- "thisActionCannotBeUndone": "Bu eylem geri alınamaz.","you": "Sen"},"vaults": {diff --git a/frontend/src/i18n/locales/vi.json b/frontend/src/i18n/locales/vi.jsonindex 9b3a61a8..3c2f0cc8 100644--- a/frontend/src/i18n/locales/vi.json+++ b/frontend/src/i18n/locales/vi.json@@ -6210,7 +6210,6 @@},"usersTab": {"addUser": "Thêm người dùng",- "areYouSureYouWantTo": "Bạn có chắc chắn muốn xóa","deleteUser": "Xóa người dùng","deleteUser2": "Xóa người dùng","disableUser": "Vô hiệu hóa người dùng",@@ -6219,7 +6218,6 @@"lastLogin": "Đăng nhập lần cuối","loadingUsers": "Đang tải người dùng...","role": "Vai trò",- "thisActionCannotBeUndone": "Không thể hoàn tác hành động này.","you": "Bạn"},"vaults": {diff --git a/frontend/src/i18n/locales/zh-Hans.json b/frontend/src/i18n/locales/zh-Hans.jsonindex 8c434624..c00ae91a 100644--- a/frontend/src/i18n/locales/zh-Hans.json+++ b/frontend/src/i18n/locales/zh-Hans.json@@ -6210,7 +6210,6 @@},"usersTab": {"addUser": "添加用户",- "areYouSureYouWantTo": "您确定要删除吗","deleteUser": "删除用户","deleteUser2": "删除用户","disableUser": "禁用用户",@@ -6219,7 +6218,6 @@"lastLogin": "上次登录","loadingUsers": "正在加载用户...","role": "角色",- "thisActionCannotBeUndone": "此操作无法撤消。","you": "你"},"vaults": {diff --git a/frontend/src/i18n/locales/zh-Hant.json b/frontend/src/i18n/locales/zh-Hant.jsonindex 3df4f12e..7b08226e 100644--- a/frontend/src/i18n/locales/zh-Hant.json+++ b/frontend/src/i18n/locales/zh-Hant.json@@ -6210,7 +6210,6 @@},"usersTab": {"addUser": "新增用戶",- "areYouSureYouWantTo": "您確定要刪除嗎","deleteUser": "刪除用戶","deleteUser2": "刪除用戶","disableUser": "停用用戶",@@ -6219,7 +6218,6 @@"lastLogin": "上次登入","loadingUsers": "正在載入用戶...","role": "角色",- "thisActionCannotBeUndone": "此操作無法撤銷。","you": "你"},"vaults": {diff --git a/frontend/src/styles/components/_users.scss b/frontend/src/styles/components/_users.scssindex bd846515..a2d57854 100644--- a/frontend/src/styles/components/_users.scss+++ b/frontend/src/styles/components/_users.scss@@ -74,10 +74,15 @@.users-table-container {overflow-x: auto;+ background: var(--surface);border: 1px solid $border-default;border-radius: $radius-md;}+.users-action--warning { color: $warning; }+.users-action--success { color: $success; }+.users-action--danger { color: $danger; }+.users-table {width: 100%;border-collapse: collapse;diff --git a/frontend/tests/browser/settings.html b/frontend/tests/browser/settings.htmlnew file mode 100644index 00000000..4ded7589--- /dev/null+++ b/frontend/tests/browser/settings.html@@ -0,0 +1,5 @@+<!doctype html>+<html lang="en">+ <head><meta charset="UTF-8" /><meta name="viewport" content="width=device-width, initial-scale=1" /><title>Settings regression fixture</title></head>+ <body><div id="root"></div><script type="module" src="./settings.jsx"></script></body>+</html>diff --git a/frontend/tests/browser/settings.jsx b/frontend/tests/browser/settings.jsxnew file mode 100644index 00000000..a4fd8fdc--- /dev/null+++ b/frontend/tests/browser/settings.jsx@@ -0,0 +1,18 @@+import { createRoot } from 'react-dom/client';+import { MemoryRouter } from 'react-router-dom';+import { AuthProvider } from '../../src/contexts/AuthContext';+import { LocaleProvider } from '../../src/contexts/LocaleContext';+import { ToastProvider } from '../../src/contexts/ToastContext';+import { ConfirmProvider } from '../../src/contexts/ConfirmContext';+import UsersTab from '../../src/components/settings/UsersTab';+import '../../src/styles/main.scss';++// Vite-only fixture: real components/providers and the complete SCSS cascade.+// Network responses are synthetic and intercepted by the browser regression.+createRoot(document.getElementById('root')).render(+ <MemoryRouter initialEntries={['/settings/users']}>+ <LocaleProvider><AuthProvider><ToastProvider><ConfirmProvider>+ <main className="settings-content"><UsersTab /></main>+ </ConfirmProvider></ToastProvider></AuthProvider></LocaleProvider>+ </MemoryRouter>,+);