feat(config): persist config.patch updates atomically
This commit is contained in:
@@ -155,10 +155,18 @@ async function saveHooks() {
|
||||
|
||||
const applied = result.applied ?? [];
|
||||
const rejected = result.rejected ?? [];
|
||||
const persisted = result.persisted === true;
|
||||
const persistError = result.persistError;
|
||||
|
||||
if (rejected.length > 0) {
|
||||
status.textContent = `Partially saved. Rejected: ${rejected.join(', ')}`;
|
||||
status.className = 'text-sm text-error';
|
||||
} else if (persistError) {
|
||||
status.textContent = `Save failed: ${persistError}`;
|
||||
status.className = 'text-sm text-error';
|
||||
} else if (!persisted) {
|
||||
status.textContent = `Saved in runtime only (${applied.length} updated)`;
|
||||
status.className = 'text-sm text-muted';
|
||||
} else {
|
||||
status.textContent = `Saved (${applied.length} updated)`;
|
||||
status.className = 'text-sm text-success';
|
||||
|
||||
Reference in New Issue
Block a user