This issue was found during a Codex global code scan of the repository.
Baseline commit: e3c5b38
Problem
In Python mode, installed templates are fetched asynchronously. When the fetch resolves, the app updates navigation only. The /input table and /input/:id detail view use one-time snapshots and do not reload after installed_templates changes.
Code references:
|
if (process.env.VUE_APP_DPGUI_PYTHON === "1") { |
|
fetch("/api/inputs", { method: "GET" }) |
|
.then((response) => response.json()) |
|
.then((data) => { |
|
this.installed_templates = data; |
|
this.update_navi(); |
|
}); |
|
const bb = (this.$storage.getStorageSync("CustomTemplate") || {})[id]; |
|
if (bb) { |
|
Object.assign(prop, { jdata: bb.obj }); |
|
} else { |
|
const cc = (this.$root.$app.installed_templates || {})[id]; |
|
if (cc) { |
|
Object.assign(prop, { jdata: cc.obj }); |
|
} |
Relevant snippet:
this.installed_templates = data;
this.update_navi();
Impact
If a user opens /input or a direct installed-template URL before /api/inputs completes, the table can remain stale or the detail page can show Invalid ID! even though the template becomes available shortly afterward.
Suggested fix
Make installed templates reactive for the views: use computed items, watch the app-level installed_templates, or delay route rendering until the initial template fetch has completed.
This issue was found during a Codex global code scan of the repository.
Baseline commit: e3c5b38
Problem
In Python mode, installed templates are fetched asynchronously. When the fetch resolves, the app updates navigation only. The
/inputtable and/input/:iddetail view use one-time snapshots and do not reload afterinstalled_templateschanges.Code references:
dpgui/src/App.vue
Lines 108 to 114 in e3c5b38
dpgui/src/views/InputConfig.vue
Line 30 in e3c5b38
dpgui/src/views/InputView.vue
Lines 57 to 64 in e3c5b38
Relevant snippet:
Impact
If a user opens
/inputor a direct installed-template URL before/api/inputscompletes, the table can remain stale or the detail page can showInvalid ID!even though the template becomes available shortly afterward.Suggested fix
Make installed templates reactive for the views: use computed
items, watch the app-levelinstalled_templates, or delay route rendering until the initial template fetch has completed.