feat: add support for running status in account run history and UI
- Enhanced account run history to include 'running' status with appropriate translations and summaries. - Updated logging status to handle new error message format. - Introduced new properties for task progress in create-plus-checkout step. - Modified fill-plus-checkout step to handle additional error details. - Updated account records manager to display running status and summary correctly. - Added CSS styles for running status in account records. - Implemented logic to refresh account run history based on auto-run state changes. - Added tests for running status and idle log restart functionality in auto-run steps. - Improved account records manager tests to validate running state display and failure details.
This commit is contained in:
@@ -2065,6 +2065,23 @@ function syncLatestState(nextState) {
|
||||
renderAccountRecords(latestState);
|
||||
}
|
||||
|
||||
let accountRunHistoryRefreshTimer = null;
|
||||
|
||||
function scheduleAccountRunHistoryRefresh(delayMs = 150) {
|
||||
if (accountRunHistoryRefreshTimer) {
|
||||
clearTimeout(accountRunHistoryRefreshTimer);
|
||||
}
|
||||
accountRunHistoryRefreshTimer = setTimeout(() => {
|
||||
accountRunHistoryRefreshTimer = null;
|
||||
chrome.runtime.sendMessage({ type: 'GET_STATE', source: 'sidepanel' }).then(state => {
|
||||
syncLatestState(state);
|
||||
syncAutoRunState(state);
|
||||
updateStatusDisplay(latestState);
|
||||
updateButtonStates();
|
||||
}).catch(() => { });
|
||||
}, Math.max(0, Number(delayMs) || 0));
|
||||
}
|
||||
|
||||
function normalizeOperationDelayEnabled(value) {
|
||||
return typeof value === 'boolean' ? value : true;
|
||||
}
|
||||
@@ -13380,6 +13397,7 @@ chrome.runtime.onMessage.addListener((message, _sender, sendResponse) => {
|
||||
appendLog(message.payload);
|
||||
if (message.payload.level === 'error') {
|
||||
showToast(message.payload.message, 'error');
|
||||
scheduleAccountRunHistoryRefresh();
|
||||
}
|
||||
break;
|
||||
|
||||
@@ -14135,6 +14153,9 @@ chrome.runtime.onMessage.addListener((message, _sender, sendResponse) => {
|
||||
applyAutoRunStatus(message.payload);
|
||||
updateStatusDisplay(latestState);
|
||||
updateButtonStates();
|
||||
if (!['scheduled', 'running', 'waiting_step', 'waiting_email', 'retrying', 'waiting_interval'].includes(message.payload.phase)) {
|
||||
scheduleAccountRunHistoryRefresh();
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user