mirror of
https://github.com/Niko1221/Strata.git
synced 2026-12-06 08:18:54 +00:00
PR #5809 by TheHubUser4860938, taken with the coordinator's review changes in the same commit (its docs/TROUBLESHOOTING.md section is not taken). From the PR: the host's list of chat files it cannot read (`damaged`) reached the page and was dropped. The sidebar now lists them under "Unreadable chats" with a Delete that asks first; the delete unlinks only that file and clears its row at once (chat-store remove() drops it from `damaged`), also in another window. The strings are a dmg-<lang> catalog family with the contributor's translations. Review changes (coordinator 11-16): - a chat file saved by a newer Strata (format above CHAT_FORMAT) is no longer "damaged": the store keeps it in its own `newer` list, list() returns it, remove() and save() refuse it (409, newer-format), so it is never deleted or overwritten; the sidebar shows it with dmg11 "This chat was saved by a newer version of Strata. Update Strata to open it." and no Delete; - dmg02 is "Strata could not read these chat files. You can delete them here."; - dmg09 is "{0} was deleted. Your other chats are not affected." and, since it says what happened, it is the toast after a delete; the question before it shows dmg03; - dmg02, dmg09 and dmg11 translations are drafts on the lane's [DRAFT] list; the generator (scripts/make-damaged-locales.py) carries them. Test: damaged-chats (the PR's, plus the newer-chat row without Delete and the toast), chat-store-api (the PR's HTTP case: the newer file is in `newer`, its DELETE and PUT are 409 and the file stays), damaged-locales, chat-store, the catalog tests: 69/69; every test bundling the store, sync or sidebar 195/195; tsc clean.