Quest/journal sync fixes, v14 compat, and review cleanup#46
Open
camrun91 wants to merge 1 commit into
Open
Conversation
Verified against the archivist-api quest/journal contract and Foundry v13.351 / v14.359. Groups several fixes from a full PR review plus the quest/journal work. API contract (archivist-api.js): - Rewrite _normalizeQuestPayload as a strict whitelist. QuestCreate/ QuestUpdate declare extra="forbid", so the old blocklist that emitted read-only fields (quest_giver_id, progress_log_entries, first/last_session) would 422 the whole write; drop empty-text objectives (min_length=1). - Guard keepalive to bodies < 60 KiB (Chromium rejects larger keepalive writes), computed once outside the retry loop. - Restore _normalizeQuestResponse in listQuests for camelCase consistency. Quest sheet (page-sheet-v2.js): - Objective add/remove now PATCH the full list back to Archivist. - Localize status/category labels via game.i18n with English fallback. - Remove inert static TABS block and the dead journal length check. Realtime + sync dialogs: - sync-dialog: shift+click range-select no longer double-toggles the clicked row; escape journal names in the delete-confirm dialog; folder fallback for journals/quests on pre-2.0 worlds; surface swallowed journal errors. - Replace per-item full re-renders with direct DOM progress updates in sync-dialog and the world-setup import loops. - Skip the redundant quest name PATCH on quest page-content edits. v14 compatibility: - module.json: minimum 13.351 / verified 14.359 (was reversed). - utils/merge: cleanHTML fallback chain and inert stripHtml. Cleanup: remove committed utils.js.bak and dead ask-chat-sidebar-tab.js. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This was referenced Jul 16, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Review branch off
stagingfor a second set of eyes before merging. All changes verified against thearchivistai/archivist-apiquest/journal contract and Foundry v13.351 / v14.359.npm run lintpasses (0 errors); no automated test suite exists in this repo, so a manual smoke test of the setup wizard import and the quest sheet is the one gap.Highlights for reviewers
API contract correctness (
archivist-api.js)_normalizeQuestPayloadrewritten as a strict whitelist. The API'sQuestCreate/QuestUpdatedeclareextra="forbid"; the old mapper emitted read-only fields (quest_giver_id,progress_log_entries,first/last_session) that would 422 the entire write. Also drops empty-text objectives (min_length=1).keepalivelimited to bodies < 60 KiB (Chromium rejects larger keepalive requests — was silently failing large journal writes).listQuestsnormalized back to camelCase for consistency with get/create/update.Quest sheet (
page-sheet-v2.js)game.i18nwith English fallback.static TABSblock and a dead journal length check.Sync dialogs + realtime
v14 compatibility
module.json:minimum13.351 /verified14.359 (was reversed — as-was, the module could not install on v13).cleanHTMLfallback chain and inertstripHtml.Cleanup
utils.js.bakand deadask-chat-sidebar-tab.js(both were shipping in the release zip).Testing notes
npm run lint: 0 errors.--checkon all modified scripts: passes.🤖 Generated with Claude Code