You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -400,18 +408,66 @@ function renderPreviewPanel(sprite) {
400
408
setDisabled(elements.replace,false);
401
409
}
402
410
411
+
functionrenderReferencePanel(sprite){
412
+
if(!elements.referencePanel){
413
+
return;
414
+
}
415
+
elements.referencePanel.replaceChildren();
416
+
if(!sprite){
417
+
setText(elements.referenceStatus,"Select a sprite to review API-provided usage references.");
418
+
elements.referencePanel.append(createParagraph("No sprite selected for reference review.","status"));
419
+
return;
420
+
}
421
+
constreferences=referencesFor(sprite);
422
+
constusageCount=numericUsageCount(sprite);
423
+
setText(
424
+
elements.referenceStatus,
425
+
usageCount>0
426
+
? `${usageCount} usage reference${usageCount===1 ? "" : "s"} reported by the Sprites API.`
427
+
: "No usage references reported by the Sprites API."
428
+
);
429
+
if(!references.length){
430
+
elements.referencePanel.append(createParagraph("No references reported yet. Future Objects and Worlds references will appear here when the API supplies them.","status"));
- Added reference viewer for API-provided usage references.
28
+
- Displays source type, source key, and label for each usage reference.
29
+
- Shows empty reference state when the API reports no references.
30
+
- Keeps usage count visible in table and details.
31
+
- Destructive delete remains disabled when usage count is greater than zero.
32
+
- Referenced sprites show `Archive Safely` to make the safe action explicit.
33
+
- No fake Objects or Worlds references were added.
34
+
35
+
## Reference Contract
36
+
37
+
The UI consumes the existing Sprites API `references` array. Future Objects/Worlds integrations should supply real usage rows through the API/database reference contract rather than browser-local inference.
38
+
39
+
## Validation
40
+
41
+
- PASS: `git diff --check`
42
+
- PASS: inline CSS/script/handler scan for Sprites files found no matches.
43
+
- PASS: browser storage and forbidden local data pattern scan found no matches.
44
+
- PASS: no `start_of_day` files changed.
45
+
- PASS: `node ./node_modules/@playwright/test/cli.js test tests/playwright/tools/SpritesToolShell.spec.mjs --project=playwright --workers=1 --reporter=list`
0 commit comments