From e2c2d1571de70079100f53ded51f03d229a3d915 Mon Sep 17 00:00:00 2001 From: ZDDC Date: Wed, 10 Jun 2026 13:56:09 -0500 Subject: [PATCH] ux(classifier): relabel the two JSON surfaces so their purpose is clear MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Two exports for two different consumers were both just "Export". Name them: - Classification (header, AI round-trip): "Export for editing" / "Import edits" — a filename-per-file JSON with no scanned tree, meant to be hand/AI-edited and re-imported. Download suffix is now .zddc-classification.json. - Workspace (welcome screen, transfer/backup): "Import workspace" + a row "Export" tooltip spelling out it carries the snapshot + classifications for moving between browsers. Download suffix stays .zddc-workspace.json. Each tooltip points at the other so they're not confused. Also wire workspace.activeName (referenced by the dataset export but never exported), so a classification file is named after its workspace. Co-Authored-By: Claude Opus 4.8 (1M context) --- classifier/js/app.js | 2 +- classifier/js/workspace.js | 6 ++++++ classifier/template.html | 6 +++--- 3 files changed, 10 insertions(+), 4 deletions(-) diff --git a/classifier/js/app.js b/classifier/js/app.js index ea0760f..f3ebfe9 100644 --- a/classifier/js/app.js +++ b/classifier/js/app.js @@ -259,7 +259,7 @@ var url = URL.createObjectURL(blob); var a = document.createElement('a'); a.href = url; - a.download = String(name).replace(/[^\w.-]+/g, '_') + '.json'; + a.download = String(name).replace(/[^\w.-]+/g, '_') + '.zddc-classification.json'; document.body.appendChild(a); a.click(); a.remove(); URL.revokeObjectURL(url); } diff --git a/classifier/js/workspace.js b/classifier/js/workspace.js index 107d141..5280ff1 100644 --- a/classifier/js/workspace.js +++ b/classifier/js/workspace.js @@ -108,10 +108,15 @@ var actions = document.createElement('div'); actions.className = 'ws-row__actions'; + var titles = { + export: 'Export this whole workspace (scanned snapshot + classifications) to transfer to another browser or back up', + delete: 'Delete this workspace — your source files are untouched', + }; [['open', 'Open'], ['rename', 'Rename'], ['export', 'Export'], ['delete', 'Delete']].forEach(function (a) { var b = document.createElement('button'); b.className = 'btn btn-sm ' + (a[0] === 'open' ? 'btn-primary' : 'btn-secondary'); b.dataset.act = a[0]; b.textContent = a[1]; + if (titles[a[0]]) b.title = titles[a[0]]; actions.appendChild(b); }); row.appendChild(main); row.appendChild(actions); @@ -374,5 +379,6 @@ onRescanned: onRescanned, renderList: renderList, activeId: function () { return activeId; }, + activeName: function () { return activeMeta ? activeMeta.name : null; }, }; })(); diff --git a/classifier/template.html b/classifier/template.html index f653e37..f5c63a8 100644 --- a/classifier/template.html +++ b/classifier/template.html @@ -162,8 +162,8 @@
| - - + + @@ -209,7 +209,7 @@

Your workspaces

- +