feat(overview): open the board on Needs action by default
The board landed on "Everything", so the rows that want a decision were mixed in with the healthy one-liners on arrival. Default to the "Needs action" chip instead, falling back to "Everything" when nothing is pending (that view would otherwise be empty). An explicit chip click still sticks for the session. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
parent
98c919879a
commit
48075d0551
@ -37,7 +37,7 @@ class OverviewManager {
|
||||
this.backup = null; // /data/backup/generated/dashboard.json
|
||||
this.tabs = null; // TabController (show/hide only)
|
||||
this.filter = 'all'; // Updates-tab chip: all | updates | security
|
||||
this.board = 'all'; // Overview-tab chip: all | action
|
||||
this.board = null; // Overview-tab chip: null = auto | all | action
|
||||
this.current = null;
|
||||
}
|
||||
|
||||
@ -361,9 +361,13 @@ class OverviewManager {
|
||||
} else {
|
||||
sub = 'The first automatic scan runs within a couple of minutes.';
|
||||
}
|
||||
// Open on the decisions, not the full list — but "Needs action" is an empty
|
||||
// pane when nothing is pending, so the auto default (board === null) falls
|
||||
// back to Everything until the admin picks a chip, which then sticks.
|
||||
const board = this.board || (warn.length ? 'action' : 'all');
|
||||
const chip = (id, label, n) =>
|
||||
`<button class="ov-chip${this.board === id ? ' active' : ''}" data-overview-action="board" data-board="${id}">${label}${n ? ` <span class="ov-chip-n">${n}</span>` : ''}</button>`;
|
||||
const shown = this.board === 'action' ? warn : rows;
|
||||
`<button class="ov-chip${board === id ? ' active' : ''}" data-overview-action="board" data-board="${id}">${label}${n ? ` <span class="ov-chip-n">${n}</span>` : ''}</button>`;
|
||||
const shown = board === 'action' ? warn : rows;
|
||||
const list = shown.length
|
||||
? `<div class="ov-board">${shown.map((r) => this.boardRow(r)).join('')}</div>`
|
||||
: `<div class="ov-allclear">Nothing needs action right now.</div>`;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user