feat: relocate import tools into studio and harden catalog/furnidata integrity
- Move /admin/import/* tools under /admin/studio/* and add studio nav, layout and tabs - Add shared catalog maintenance panel plus a /admin/studio/maintenance tab - Make furnidata reconciliation overwrite conflicting entries with the DB-authoritative items_base classname/id (surfaced via fixedConflicts) - Add furnidata_translate_enabled setting to skip the heavy localized furnidata build during import (manual build-languages still forces it) - Update staff smoke contract test for the studio hub
This commit is contained in:
1 parent
c2e61dc324
commit
c7ba04bda1
36 files changed
+616
-2835
No files matched your search
@@ -180,8 +180,8 @@ describeGuard("live furni import / catalog ID consistency (sandbox DB)", () => {
|
||||
|
||||
const before = buildMaps(await readFurniData());
|
||||
// Genuine id conflicts (our spriteId is owned by a different classname
|
||||
// in the file) are left untouched by design — they are a separate
|
||||
// pre-existing data problem, not part of this fix.
|
||||
// in the file) are resolved in favour of items_base: the entry keeps its
|
||||
// id but its classname is overwritten with the items_base classname.
|
||||
let conflicts = 0;
|
||||
let missing = 0;
|
||||
for (const row of rows) {
|
||||
@@ -205,7 +205,8 @@ describeGuard("live furni import / catalog ID consistency (sandbox DB)", () => {
|
||||
|
||||
const result = await reconcileFurniDataWithItemsBase();
|
||||
expect(result.fixedIds).toBe(idMisBefore);
|
||||
expect(result.conflicts).toBe(conflicts);
|
||||
expect(result.fixedConflicts).toBe(conflicts);
|
||||
expect(result.conflicts).toBe(0);
|
||||
expect(result.missing).toBe(missing);
|
||||
|
||||
// Mirror the function's contract exactly: rows whose id IS keyed in the
|
||||
@@ -218,7 +219,8 @@ describeGuard("live furni import / catalog ID consistency (sandbox DB)", () => {
|
||||
// furnidata file can only hold one id per classname, so a duplicate
|
||||
// classname can never satisfy this invariant for all its rows. Those
|
||||
// are repaired by the dedicated duplicate-classname tool, not by this
|
||||
// function. Genuine id conflicts are likewise out of scope.
|
||||
// function. Genuine id conflicts are now resolved by overwriting the
|
||||
// entry's classname with the items_base value (see fixedConflicts).
|
||||
const dupClassnames = new Map<string, number>();
|
||||
for (const row of rows)
|
||||
dupClassnames.set(
|
||||
|
||||
Reference in new issue
Block a user