ux(diag): Gehirn-Kategorien standardmaessig eingeklappt
Beim ersten Aufruf (kein localStorage-Eintrag) sind alle Type-Sections collapsed. Stefan klappt gezielt auf was er sehen will, statt eine Wand of Text zu sehen. Sobald er einmal getoggelt hat, ueberschreibt sein persistiertes State den Default — also nicht aufdringlich. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -3486,9 +3486,12 @@
|
||||
};
|
||||
|
||||
// Welche Type-Headings sind eingeklappt? Persistiert in localStorage.
|
||||
// Default beim ersten Laden: alle bekannten Types eingeklappt — Stefan
|
||||
// klappt gezielt auf was er sehen will (sonst Wand of Text).
|
||||
let brainCollapsedTypes = (() => {
|
||||
try { return new Set(JSON.parse(localStorage.getItem('aria_brain_collapsed_types') || '[]')); }
|
||||
catch { return new Set(); }
|
||||
const raw = localStorage.getItem('aria_brain_collapsed_types');
|
||||
if (raw == null) return new Set(BRAIN_TYPE_ORDER);
|
||||
try { return new Set(JSON.parse(raw)); } catch { return new Set(BRAIN_TYPE_ORDER); }
|
||||
})();
|
||||
function persistCollapsedTypes() {
|
||||
try { localStorage.setItem('aria_brain_collapsed_types', JSON.stringify(Array.from(brainCollapsedTypes))); } catch {}
|
||||
|
||||
Reference in New Issue
Block a user