feat: show the last account check time

Carry session-local check timestamps through bulk, single, OTP, and save validation paths, terminate missing responses cleanly, and render localized checked times on account cards.
This commit is contained in:
Sucukdeluxe
2026-08-21 01:30:00 +02:00
parent 3c863d6623
commit d58854c6c9
4 changed files with 41 additions and 17 deletions
+5
View File
@@ -16,6 +16,11 @@ test('translates the remaining upload size label', () => {
assert.equal(translateText('Remaining size', 'de'), 'Verbleibende Größe');
});
test('translates the account check timestamp label', () => {
assert.equal(translateText('geprüft', 'en'), 'checked');
assert.equal(translateText('checked', 'de'), 'geprüft');
});
test('English is the fallback language and German remains selectable', () => {
assert.equal(normalizeLanguage(), 'en');
assert.equal(normalizeLanguage('fr'), 'en');
+3 -3
View File
@@ -1152,9 +1152,9 @@ setTimeout(async () => {
check('Account sidebar exposes exactly one pressed filter', accountFilterState.error.pressed.join('|') === 'error' && accountFilterState.error.active.join('|') === 'error' && accountFilterState.all.pressed.join('|') === 'all' && accountFilterState.all.active.join('|') === 'all');
ipcMain.removeHandler('run-health-check');
ipcMain.handle('run-health-check', (_event, payload) => ({ results: (payload.hosters || []).map(item => ({ accountId: item.accountId, status: 'ok', message: 'Ready' })) }));
const completedAccountCheckState = await wc.executeJavaScript(\`checkSingleAccount('ui-filter-ready').then(() => ({ status: accountStatuses['ui-filter-ready']?.status, generations: accountStatusGenerations.size }))\`);
check('Completed account checks release their generation tokens', completedAccountCheckState.status === 'ok' && completedAccountCheckState.generations === 0);
ipcMain.handle('run-health-check', (_event, payload) => ({ checkedAt: '2026-08-20T12:34:00.000Z', results: (payload.hosters || []).map(item => ({ accountId: item.accountId, status: 'ok', message: 'Ready' })) }));
const completedAccountCheckState = await wc.executeJavaScript(\`checkSingleAccount('ui-filter-ready').then(() => ({ status: accountStatuses['ui-filter-ready']?.status, checkedAt: accountStatuses['ui-filter-ready']?.checkedAt, subtitle: document.querySelector('[data-account-id="ui-filter-ready"] .account-card-subtitle')?.textContent, generations: accountStatusGenerations.size }))\`);
check('Completed account checks expose their timestamp and release generation tokens', completedAccountCheckState.status === 'ok' && completedAccountCheckState.checkedAt === '2026-08-20T12:34:00.000Z' && completedAccountCheckState.subtitle.includes('geprüft') && completedAccountCheckState.generations === 0);
restoreInitialIpcHandler('run-health-check');
let resolveStaleAccountCheck = null;