Skip to content

Commit c874234

Browse files
committed
fix(content): resolve duplicate graph IDs and restrict dev-bridge sync to debug mode
- Updated scripts/migrate_to_graph.py to generate unique refinement IDs including the input item. - Re-generated Mythril.Blazor/wwwroot/data/content_graph.json to resolve critical ContentLoader crash. - Restricted FeedbackService.SyncToDevBridge to DEBUG mode to prevent browser permission prompts (Private Network Access) on live sites.
1 parent ccfa542 commit c874234

3 files changed

Lines changed: 21 additions & 18 deletions

File tree

Mythril.Blazor/Services/FeedbackService.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,9 @@ public async Task AddFeedback(FeedbackEntry entry)
4444

4545
private async Task SyncToDevBridge(FeedbackEntry entry)
4646
{
47+
#if !DEBUG
48+
return;
49+
#endif
4750
try
4851
{
4952
Console.WriteLine($"[FeedbackService] Syncing {entry.Type} to bridge...");

Mythril.Blazor/wwwroot/data/content_graph.json

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -2361,7 +2361,7 @@
23612361
}
23622362
},
23632363
{
2364-
"id": "recipe_refine_fire:_fire_i",
2364+
"id": "recipe_refine_fire_basic_gem_fire_i",
23652365
"type": "Refinement",
23662366
"name": "Refine Fire: Fire I",
23672367
"data": {
@@ -2388,7 +2388,7 @@
23882388
}
23892389
},
23902390
{
2391-
"id": "recipe_refine_fire:_fire_i",
2391+
"id": "recipe_refine_fire_iron_ore_fire_i",
23922392
"type": "Refinement",
23932393
"name": "Refine Fire: Fire I",
23942394
"data": {
@@ -2415,7 +2415,7 @@
24152415
}
24162416
},
24172417
{
2418-
"id": "recipe_refine_ice:_ice_i",
2418+
"id": "recipe_refine_ice_mana_leaf_ice_i",
24192419
"type": "Refinement",
24202420
"name": "Refine Ice: Ice I",
24212421
"data": {
@@ -2442,7 +2442,7 @@
24422442
}
24432443
},
24442444
{
2445-
"id": "recipe_refine_ice:_ice_i",
2445+
"id": "recipe_refine_ice_moonberry_ice_i",
24462446
"type": "Refinement",
24472447
"name": "Refine Ice: Ice I",
24482448
"data": {
@@ -2469,7 +2469,7 @@
24692469
}
24702470
},
24712471
{
2472-
"id": "recipe_refine_wood:_herb",
2472+
"id": "recipe_refine_wood_log_herb",
24732473
"type": "Refinement",
24742474
"name": "Refine Wood: Herb",
24752475
"data": {
@@ -2496,7 +2496,7 @@
24962496
}
24972497
},
24982498
{
2499-
"id": "recipe_refine_mixology:_potion",
2499+
"id": "recipe_refine_mixology_herb_potion",
25002500
"type": "Refinement",
25012501
"name": "Refine Mixology: Potion",
25022502
"data": {
@@ -2523,7 +2523,7 @@
25232523
}
25242524
},
25252525
{
2526-
"id": "recipe_refine_scrap:_gold",
2526+
"id": "recipe_refine_scrap_web_gold",
25272527
"type": "Refinement",
25282528
"name": "Refine Scrap: Gold",
25292529
"data": {
@@ -2550,7 +2550,7 @@
25502550
}
25512551
},
25522552
{
2553-
"id": "recipe_refine_scrap:_gold",
2553+
"id": "recipe_refine_scrap_slime_gold",
25542554
"type": "Refinement",
25552555
"name": "Refine Scrap: Gold",
25562556
"data": {
@@ -2577,7 +2577,7 @@
25772577
}
25782578
},
25792579
{
2580-
"id": "recipe_refine_life:_cure_i",
2580+
"id": "recipe_refine_life_ancient_bark_cure_i",
25812581
"type": "Refinement",
25822582
"name": "Refine Life: Cure I",
25832583
"data": {
@@ -2604,7 +2604,7 @@
26042604
}
26052605
},
26062606
{
2607-
"id": "recipe_refine_lightning:_lightning_i",
2607+
"id": "recipe_refine_lightning_fire_shard_lightning_i",
26082608
"type": "Refinement",
26092609
"name": "Refine Lightning: Lightning I",
26102610
"data": {
@@ -2631,7 +2631,7 @@
26312631
}
26322632
},
26332633
{
2634-
"id": "recipe_refine_lightning:_lightning_i",
2634+
"id": "recipe_refine_lightning_ice_shard_lightning_i",
26352635
"type": "Refinement",
26362636
"name": "Refine Lightning: Lightning I",
26372637
"data": {
@@ -2658,7 +2658,7 @@
26582658
}
26592659
},
26602660
{
2661-
"id": "recipe_refine_earth:_earth_i",
2661+
"id": "recipe_refine_earth_crystal_shards_earth_i",
26622662
"type": "Refinement",
26632663
"name": "Refine Earth: Earth I",
26642664
"data": {
@@ -2685,7 +2685,7 @@
26852685
}
26862686
},
26872687
{
2688-
"id": "recipe_refine_water:_water_i",
2688+
"id": "recipe_refine_water_blue_coral_water_i",
26892689
"type": "Refinement",
26902690
"name": "Refine Water: Water I",
26912691
"data": {
@@ -2712,7 +2712,7 @@
27122712
}
27132713
},
27142714
{
2715-
"id": "recipe_refine_haste:_haste_i",
2715+
"id": "recipe_refine_haste_lost_parchment_haste_i",
27162716
"type": "Refinement",
27172717
"name": "Refine Haste: Haste I",
27182718
"data": {

scripts/migrate_to_graph.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -196,13 +196,13 @@ def migrate():
196196

197197
for recipe in ref["Recipes"]:
198198
r_name = f"{ref['Ability']}: {recipe['OutputItem']}"
199-
r_id = generate_id("recipe", r_name)
200-
199+
# Unique ID including input item to avoid collisions for multiple recipes for same ability/output
200+
r_id = generate_id("recipe", f"{ref['Ability']}_{recipe['InputItem']}_{recipe['OutputItem']}")
201+
201202
node = {
202203
"id": r_id,
203204
"type": "Refinement",
204-
"name": r_name,
205-
"data": { "primary_stat": ref.get("PrimaryStat", "Strength") },
205+
"name": r_name, "data": { "primary_stat": ref.get("PrimaryStat", "Strength") },
206206
"in_edges": {
207207
"requires_ability": [ab_id]
208208
},

0 commit comments

Comments
 (0)