Shell: a picker entry can name the older variant ids it stands for

Layouts saved before Timers 1.3.0 hold 'timer:<uuid>' and 'ltc' tiles.
An entry's aliases let those tiles get the entry's slim gear settings
instead of falling back to the module's full schema.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
This commit is contained in:
Waters Church
2026-09-14 15:40:36 -04:00
co-authored by Claude Fable 5.1
parent 3ceac9599b
commit 70134d6dfc
4 changed files with 18 additions and 4 deletions
+4 -2
View File
@@ -1094,8 +1094,10 @@ function colorHex(value, fallback) {
Same for the groups that arrange them. */
function tileSchema(tile, man) {
const own = (v) => (v && typeof v === 'object' ? v : null);
const entry = tile?.variant && Array.isArray(man?.tiles)
? man.tiles.find((e) => String(e.id) === String(tile.variant))
const variant = String(tile?.variant || '');
const entry = variant && Array.isArray(man?.tiles)
? man.tiles.find((e) => String(e.id) === variant)
|| man.tiles.find((e) => Array.isArray(e.aliases) && e.aliases.includes(variant))
: null;
return {
schema: own(entry?.instanceSchema) || own(man?.instanceSchema) || {},