@cccarv82/freya 1.0.26 → 1.0.27
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/cli/web-ui.js +19 -3
- package/cli/web.js +13 -0
- package/package.json +1 -1
package/cli/web-ui.js
CHANGED
|
@@ -545,9 +545,25 @@
|
|
|
545
545
|
setOut(header + (r.plan || ''));
|
|
546
546
|
ta.value = '';
|
|
547
547
|
|
|
548
|
-
if (r.ok === false)
|
|
549
|
-
|
|
550
|
-
|
|
548
|
+
if (r.ok === false) {
|
|
549
|
+
setPill('err', 'planner off');
|
|
550
|
+
setTimeout(() => setPill('ok', 'idle'), 800);
|
|
551
|
+
return;
|
|
552
|
+
}
|
|
553
|
+
|
|
554
|
+
if (state.autoApply) {
|
|
555
|
+
setPill('run', 'applying…');
|
|
556
|
+
await applyPlan();
|
|
557
|
+
const a = state.lastApplied || {};
|
|
558
|
+
setPill('ok', `applied (${a.tasks || 0}t, ${a.blockers || 0}b)`);
|
|
559
|
+
if (state.autoRunReports) {
|
|
560
|
+
await runSuggestedReports();
|
|
561
|
+
}
|
|
562
|
+
} else {
|
|
563
|
+
setPill('ok', 'planned');
|
|
564
|
+
}
|
|
565
|
+
|
|
566
|
+
setTimeout(() => setPill('ok', 'idle'), 1200);
|
|
551
567
|
} catch (e) {
|
|
552
568
|
setPill('err', 'plan failed');
|
|
553
569
|
}
|
package/cli/web.js
CHANGED
|
@@ -1279,6 +1279,19 @@ async function cmdWeb({ port, dir, open, dev }) {
|
|
|
1279
1279
|
}
|
|
1280
1280
|
}
|
|
1281
1281
|
|
|
1282
|
+
// Auto-suggest reports when planner didn't include any
|
|
1283
|
+
// (keeps UX consistent: if you created a blocker, at least suggest blockers)
|
|
1284
|
+
if (!applied.reportsSuggested.length) {
|
|
1285
|
+
const sug = [];
|
|
1286
|
+
sug.push('daily');
|
|
1287
|
+
if (applied.blockers > 0) sug.push('blockers');
|
|
1288
|
+
if ((applied.tasks > 0 || applied.blockers > 0) && applyMode !== 'blockers') sug.push('status');
|
|
1289
|
+
applied.reportsSuggested = Array.from(new Set(sug));
|
|
1290
|
+
} else {
|
|
1291
|
+
// Dedup
|
|
1292
|
+
applied.reportsSuggested = Array.from(new Set(applied.reportsSuggested.map((s) => String(s).trim()).filter(Boolean)));
|
|
1293
|
+
}
|
|
1294
|
+
|
|
1282
1295
|
// Persist
|
|
1283
1296
|
writeJson(taskFile, taskLog);
|
|
1284
1297
|
writeJson(blockerFile, blockerLog);
|