ui(uxp): v2.1.9 — visible version chip + diagnose multi-version install

UPIA stacks every install in its own
  C:\Program Files\...\UXP\Plugins\External\net.wilddragon.dragonflight.uxp_<version>\
folder without removing prior versions. After 10 deploys today there are
11 of them coexisting, and Premiere's loader can pick the wrong one,
which is why v2.1.8 didn't appear to land.

This change makes the running version visible at a glance:

- main.js reads manifest.json at runtime via require('uxp').storage
  .localFileSystem.getPluginFolder() so the displayed version is
  whatever Premiere actually loaded — never a hand-edited constant
  that could drift.
- index.html adds #panel-version inside the status strip (between
  host and ⋯) and #brand-version below the brand tag on connect.
- styles.css: small mono chip in --text-4, low key but readable.

If the chip ever shows the wrong version we know the loader picked
a stale dir; if it shows nothing the manifest read itself failed.

The install script needs to remove old _<version> dirs going forward;
the next commit will add that cleanup step to the deploy.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
Claude 2026-05-28 12:00:50 -04:00
parent c2a6c1557b
commit c3b087020d
4 changed files with 41 additions and 1 deletions

View file

@ -18,6 +18,7 @@
</div>
<div class="brand-title">Dragonflight</div>
<div class="brand-tag">Wild Dragon Broadcast</div>
<div class="brand-version" id="brand-version"></div>
</div>
<label class="field-label" for="server-url">Server URL</label>
<input id="server-url" type="text" placeholder="https://dragonflight.live" />
@ -35,6 +36,7 @@
<header class="status-strip">
<span class="signal-dot"></span>
<span id="connected-host" class="connected-host"></span>
<span id="panel-version" class="panel-version" title="Plugin version"></span>
<button id="menu-btn" class="btn-ghost" title="More" aria-label="More"></button>
<div id="status-menu" class="menu hidden" role="menu">
<button id="disconnect-btn" class="menu-item" role="menuitem">Disconnect</button>

View file

@ -2,7 +2,7 @@
"manifestVersion": 5,
"id": "net.wilddragon.dragonflight.uxp",
"name": "Dragonflight MAM",
"version": "2.1.8",
"version": "2.1.9",
"main": "index.html",
"host": {
"app": "premierepro",

View file

@ -345,9 +345,29 @@
});
}
// Read the plugin version from manifest.json at runtime — the canonical
// source of truth. Display it on both the connect-pane brand and the
// library-pane status strip so we can verify which build is actually
// running (UPIA stacks every install in its own _<version> dir, so the
// "highest in folder" picker has historically loaded stale copies).
async function showVersion() {
let v = '';
try {
const lfs = require('uxp').storage.localFileSystem;
const folder = await lfs.getPluginFolder();
const entry = await folder.getEntry('manifest.json');
const text = await entry.read();
const m = JSON.parse(text);
v = m && m.version ? ('v' + m.version) : '';
} catch (_) { /* leave blank — the absence itself signals a bad load */ }
const a = $('panel-version'); if (a) a.textContent = v;
const b = $('brand-version'); if (b) b.textContent = v;
}
function init() {
wireConnectPane(); wireLibraryPane();
wireExportPanel(); wireConformPanel(); wireRelinkPanel();
showVersion();
if (API.state.serverUrl && API.state.apiToken) tryConnect(API.state.serverUrl, API.state.apiToken);
else UI.showPane('connect');
}

View file

@ -240,6 +240,24 @@ input[type="search"]::-webkit-search-cancel-button { display: none; }
}
.menu-item:hover { background: var(--hover-strong); }
/* Tiny version chip verifies which build is actually running. Lives in
the status strip (between host and ) and on the connect-pane brand. */
.panel-version {
font-family: var(--font-mono);
font-size: 9.5px;
color: var(--text-4);
letter-spacing: 0.04em;
flex-shrink: 0;
padding-right: 2px;
}
.brand-version {
font-family: var(--font-mono);
font-size: 9.5px;
color: var(--text-4);
margin-top: 6px;
letter-spacing: 0.04em;
}
/* ── tabs ────────────────────────────────────────────────────────── */
.tab-nav {
display: flex;