@enigmax/dashboard 0.1.52 → 0.1.53

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.
Files changed (2) hide show
  1. package/assets/index.html +10 -13
  2. package/package.json +1 -1
package/assets/index.html CHANGED
@@ -632,6 +632,11 @@
632
632
  <div class="set-cat-h">Skill settings</div>
633
633
  <div id="skillSettings" class="set-grid"></div>
634
634
  </div>
635
+ <div class="panel" id="memPanel">
636
+ <div class="set-cat-h">Agent memory</div>
637
+ <div class="set-cat-b">Customize the instruction files enigma deploys to each agent (CLAUDE.md / AGENTS.md). Your edits follow the Customized-skill updates policy on the next sync: overwrite restores the managed version, keep preserves them.</div>
638
+ <div id="memBody" class="set-grid"><div class="empty" style="padding:12px 0">Loading...</div></div>
639
+ </div>
635
640
  <div class="panel">
636
641
  <div id="skillsBody"><div class="empty" style="padding:24px 0">Loading skills...</div></div>
637
642
  <div id="skillsNote" class="set-note"></div>
@@ -664,11 +669,6 @@
664
669
  </div>
665
670
  </div>
666
671
  </div>
667
- <div class="panel" id="memPanel">
668
- <div class="set-cat-h">Agent memory</div>
669
- <div class="set-cat-b">Customize the instruction files enigma deploys to each agent (CLAUDE.md / AGENTS.md). Your edits follow the Customized-skill updates policy on the next sync: overwrite restores the managed version, keep preserves them.</div>
670
- <div id="memBody" class="set-grid"><div class="empty" style="padding:12px 0">Loading...</div></div>
671
- </div>
672
672
  </section>
673
673
 
674
674
  <section id="view-resources" style="display:none">
@@ -2596,12 +2596,10 @@ export {
2596
2596
  async function loadSettings() {
2597
2597
  if (isProjectScope()) return loadProjectSettings();
2598
2598
  const port = $("dashPortPanel"); if (port) port.style.display = ""; // global-only panel
2599
- const mp = $("memPanel"); if (mp) mp.style.display = "";
2600
2599
  try {
2601
2600
  const data = await (await fetch("/api/settings", { cache: "no-store" })).json();
2602
2601
  renderSettings(data.categories || []);
2603
2602
  renderDashPort(data);
2604
- loadMemory();
2605
2603
  } catch { $("settingsBody").innerHTML = '<div class="empty" style="padding:24px 0">Settings unavailable.</div>'; }
2606
2604
  }
2607
2605
 
@@ -2650,7 +2648,7 @@ export {
2650
2648
  }
2651
2649
 
2652
2650
  async function loadMemory(project) {
2653
- const el = project ? $("projMemBody") : $("memBody");
2651
+ const el = $("memBody"); // global + project share this panel (one scope shown at a time)
2654
2652
  if (!el) return;
2655
2653
  try {
2656
2654
  const q = project ? "/api/memory?path=" + encodeURIComponent(project) : "/api/memory";
@@ -2703,8 +2701,8 @@ export {
2703
2701
  } catch { toast("Could not reach the server.", "err"); }
2704
2702
  }
2705
2703
 
2706
- // Edit/reset buttons live in both the global panel (#memBody) and the project view
2707
- // (#projMemBody, mutually exclusive by scope); one document-level delegate covers both.
2704
+ // The memory editor lives in the Skills tab (#memBody, scope-aware via memProject());
2705
+ // a document-level delegate handles its edit/reset buttons in global and project scope.
2708
2706
  document.addEventListener("click", (e) => {
2709
2707
  const ed = e.target.closest && e.target.closest("[data-mem-edit]");
2710
2708
  if (ed) { openMemoryEditor(ed.dataset.memEdit, memProject()); return; }
@@ -3069,6 +3067,7 @@ export {
3069
3067
  if (isProjectScope()) return loadProjectSkills();
3070
3068
  skillScope = "global";
3071
3069
  loadSkillSettings();
3070
+ loadMemory();
3072
3071
  try {
3073
3072
  const res = await fetch("/api/skills", { cache: "no-store" });
3074
3073
  renderSkills((await res.json()).skills || []);
@@ -3434,7 +3433,6 @@ export {
3434
3433
  async function loadProjectSettings() {
3435
3434
  const el = $("settingsBody");
3436
3435
  const port = $("dashPortPanel"); if (port) port.style.display = "none"; // global-only
3437
- const mp = $("memPanel"); if (mp) mp.style.display = "none"; // global panel; project memory is rendered inline below
3438
3436
  el.innerHTML = '<div class="empty" style="padding:24px 0">Loading...</div>';
3439
3437
  let d; try { d = await fetchProjectDetail(); } catch { el.innerHTML = '<div class="empty" style="padding:24px 0">Project unavailable.</div>'; return; }
3440
3438
  if (d.error) { el.innerHTML = '<div class="empty" style="padding:24px 0">' + esc(d.error) + "</div>"; return; }
@@ -3449,13 +3447,11 @@ export {
3449
3447
  + '<div class="set-row"><div class="set-meta"><div class="set-name">Git hooks</div><div class="set-hint">commit secret guard for this repo</div></div><div class="set-ctl">' + hooks + "</div></div>"
3450
3448
  + '<div class="set-row"><div class="set-meta"><div class="set-name">AI quality gate</div><div class="set-hint">validate changes through the gate pipeline before push (needs the gate feature enabled)</div></div><div class="set-ctl">' + gate + "</div></div></div></div>"
3451
3449
  + '<div class="panel"><div class="set-cat-h">Project config</div><div class="set-cat-b">applies only to this project (its .enigma.json). Settings not shown here are global-only - switch Scope to Global for those.</div><div class="set-grid">' + cfg + "</div></div>"
3452
- + '<div class="panel"><div class="set-cat-h">Agent memory</div><div class="set-cat-b">Customize this project\'s instruction files (CLAUDE.md / AGENTS.md). Edits follow the Customized-skill updates policy on the next sync.</div><div id="projMemBody" class="set-grid"><div class="empty" style="padding:12px 0">Loading...</div></div></div>'
3453
3450
  + '<div class="panel"><div class="set-cat-h">Manage</div><div class="set-grid">'
3454
3451
  + '<div class="set-row"><div class="set-meta"><div class="set-name">Name</div><div class="set-hint">display name for this project (must be unique)</div></div><div class="set-ctl"><input class="linput" data-proj-name value="' + esc(d.label) + '" spellcheck="false" style="width:200px"></div></div>'
3455
3452
  + '<div class="set-row"><div class="set-meta"><div class="set-name">Description</div><div class="set-hint">optional note shown in the header</div></div><div class="set-ctl ladd" style="align-items:center"><input class="linput" data-proj-desc value="' + esc(d.description || "") + '" placeholder="optional" style="flex:none;width:240px"><button type="button" class="toggle on" data-proj-save-meta>Save</button></div></div>'
3456
3453
  + '<div class="set-row"><div class="set-meta"><div class="set-name">Forget project</div><div class="set-hint">remove it from the dashboard list - its files are not touched</div></div><div class="set-ctl"><button type="button" class="toggle" data-proj-forget>Forget</button></div></div>'
3457
3454
  + "</div></div>";
3458
- loadMemory(currentScope);
3459
3455
  }
3460
3456
  async function saveProjectMeta() {
3461
3457
  if (!isProjectScope()) return;
@@ -3474,6 +3470,7 @@ export {
3474
3470
  skillScope = "project";
3475
3471
  const el = $("skillsBody");
3476
3472
  const ss = $("skillSettings"); if (ss) ss.innerHTML = '<div class="set-cat-b" style="padding:0 0 4px">Skill settings are global - switch Scope to Global to change them.</div>';
3473
+ loadMemory(currentScope);
3477
3474
  el.innerHTML = '<div class="empty" style="padding:24px 0">Loading...</div>';
3478
3475
  let d; try { d = await fetchProjectDetail(); } catch { el.innerHTML = '<div class="empty" style="padding:24px 0">Project unavailable.</div>'; return; }
3479
3476
  if (d.error) { el.innerHTML = '<div class="empty" style="padding:24px 0">' + esc(d.error) + "</div>"; return; }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@enigmax/dashboard",
3
- "version": "0.1.52",
3
+ "version": "0.1.53",
4
4
  "description": "Local browser dashboard UI for enigma: the static page and chart assets enigma serves on its loopback dashboard (savings, real tool usage, in-browser settings). Installed on demand by enigma-cli; not a runtime dependency.",
5
5
  "type": "module",
6
6
  "files": [