feedback5 R19B: 干员调配 says plainly when its game data did not load — useData counts a /data file that never arrived (404, blocked, bad JSON: 'missing') as settled, so the tab drew an empty roster, the loadout import blamed the file (「这份数据在当前版本没有可用的调配」) and the 干员持有 / 自选编队 imports stored an empty list over the saved one; now missingGameData(tab) (chess.json, plus backups.json for 自选编队) shows DataMissing in place of the roster (which files, saved settings unaffected, reload, then the ad blocker and the network) and importRefusal(kind, ready) refuses every import before anything is parsed or applied, with the same words; three UI strings with English; GitHub #173; golden: unchanged (client only)

This commit is contained in:
sganggs committed 2026-10-07 11:13:25 +08:00
1 parent 7d97b80bfd
commit b4d5a72a43
6 files changed
+181 -4

No files matched your search

+29
View File
@@ -1873,3 +1873,32 @@ are.
idea only: its fourth `alive` argument sits on top of the #189 / #191 stack and Match.js changes, so it was not merged.
- Golden: unchanged (client text only). Tests: `test/ui/gameLogic.test.js` +1 (a player still in, an eliminated
player, a spectator seat, the screen's call). It fails on the parent: 「资金已到账」 where 「观战中」 is expected.
#### 25.22.3 GitHub #173 「bug:网页版游戏文件未加载」 (@sarilendorf): a 干员调配 tab without its game data says so, and every import is refused — `screens/loadout.js missingGameData / importRefusal / DataMissing`
- **Seen**: on the reporter's own server (Node 24) the operators, bonds, maps and enemies did not load. Servers other
people host worked, and a loadout exported there failed to import locally. The screenshots, as described in the
thread: 干员调配 empty, the import toast 「导入失败:这份数据在当前版本没有可用的调配,未做任何改动」, the `npm start` log
with every check passed, an ad blocker showing one block. Reproduced with every /data/*.json request answering 404. All five files of the screen end
`missing`, the screen counts them as loaded, the roster is empty (「没有符合条件的干员」) and the loadout import gives the
reporter's toast. Two imports did worse: 干员持有 said 「已导入:全部持有」 and stored [] over the saved list, and
自选编队 said 「已导入:全部名额为空」 and stored {} over the saved picks. With the files served, the same three imports
work. 0.1.3 and 0.1.4 behave the same.
- **Cause**: `useData` (public/js/data.js:489–501) counts a file that never arrived (status `missing`) as settled, so
the UI can carry on without optional files. In screens/loadout.js `ready` (:399) was then true. The tab drew its empty
roster, and the import guard `if (!ready)` (:479) let the import run. It exists to stop an import before chess.json
loads, because such an import would sanitise every entry away. The loadout import kept the loadout but blamed the data
(:501). `applyOwnershipImport` / `applyDiyImport` (ui/loadoutSync.js:93, :113) stored the empty result. The server sync
was already safe: the loadout sync sends nothing without chess.json, and the other two send the stored lists.
- **Official**: no rule involved; the page reads its game data from the server it was opened from (/data/*.json).
- **Now**: `missingGameData(tab)` names the files a tab cannot work without: chess.json, plus backups.json for 自选编队.
When one is `missing`, the tab shows `DataMissing` in place of the roster: 「游戏数据没有载入」, the file paths (e.g.
/data/chess.json), that the saved settings are unaffected, and what to try (reload; then the ad blocker and the
network). `importRefusal(kind, ready)` is the one guard of every import. It refuses while the files load (as before) and
when the data is missing (「导入失败:游戏数据没有载入,未做任何改动。请刷新页面;仍不行时,请检查广告拦截插件和网络」),
before anything is parsed or applied. Three new UI strings, with English.
- [ASSUMED]: the cause on the reporter's machine is still unknown: the ad blocker, a proxy or security software, or a
different address. The new message and the console line `[data] /data/<file> unavailable (<reason>)` are what to ask for.
- Golden: unchanged (client only). Tests: `test/ui/feedback5-loadout-data-missing.test.js` (4, all fail on the parent:
the tab's files, the refusals, the screen's guard order, the message in Chinese and English); loadout, loadout-stats,
module-trait, moduleIcons, diy-ui and standin-ui tests pass unchanged.