Skip to content

Port remaining map-data editors to the shared base, remove dead code, opt-in thumbnail tracing - #111

Merged
Frotty merged 5 commits into
masterfrom
refactor/port-editors-and-cleanup
Sep 5, 2026
Merged

Port remaining map-data editors to the shared base, remove dead code, opt-in thumbnail tracing#111
Frotty merged 5 commits into
masterfrom
refactor/port-editors-and-cleanup

Conversation

@Frotty

@Frotty Frotty commented Sep 5, 2026

Copy link
Copy Markdown
Member

Summary

Follow-up to #109, continuing the audit list.

Editors on the shared base

  • .w3r, .mmp and .w3i now extend EditableBinaryEditorProvider, leaving the object editor as the only hand-rolled CustomEditorProvider.
  • Formats whose strings live in war3map.wts share TriggerStringBackedDocument plus the wtsSidecar save/revert hooks.
  • pushEdit(..., { onApply, onUndoRedo }) re-renders the page for edits the incremental state message cannot express (the .w3i flag word).
  • The .w3i editor gains hot-exit backup restore, which its previous provider ignored.

Dead code and leaks

  • The read-only legacy .w3i parser/renderer is removed; the MPQ viewer opens extracted .w3i files in the editor.
  • src/casc-extract-worker.ts and its webpack entry/copy plugin are removed (never spawned, only bundled and shipped).
  • Candidate asset roots are invalidated when workspace folders change or an imports/, assets/, map folder etc. is created or removed.

Production noise

  • [wurst-model-thumb] console lines and the JSONL diagnostics file are opt-in via WURST_MODEL_THUMB_DEBUG=1 (or the existing e2e cache switch).

Packaging guard

  • test-vsix-contents asserts every bundle the host references is packaged.

Validation

  • tsc (real siblings and CI mocks): clean. npm run lint: clean. npm test: pass.
  • npm run test:e2e: all .wpm, .w3c, .w3r, .mmp, .w3i specs pass. The 24 object-editor failures are the same set as on master (stale sibling war3-model build).

…n thumbnail tracing

- W3r, Mmp and W3i editors now extend EditableBinaryEditorProvider. Formats
  whose strings live in war3map.wts share TriggerStringBackedDocument and the
  wtsSidecar save/revert hooks; the .w3i flag word uses the new
  pushEdit(..., { onApply, onUndoRedo }) re-render option. The .w3i editor gains
  hot-exit backup restore, which its hand-rolled provider ignored.
- The read-only legacy .w3i parser/renderer in mapDataPreview.ts is removed;
  the MPQ viewer opens extracted .w3i files in the editor instead.
- src/casc-extract-worker.ts and its webpack entry/copy plugin are removed:
  the extension has used the in-process CASC singleton for a long time and the
  worker was never spawned, only bundled and shipped.
- Thumbnail console tracing and the JSONL diagnostics file are opt-in
  (WURST_MODEL_THUMB_DEBUG=1, or the e2e cache switch) instead of running for
  every visible thumbnail in production.
- Candidate asset roots are re-scanned when workspace folders change or an
  imports/assets/map folder is created or removed, instead of being cached for
  the whole session.
- test-vsix-contents asserts every bundle the host loads is packaged, so a
  partial webpack run can no longer ship a broken object editor.
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 5, 2026

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review Completed 2026-09-05T15:52:53.568312Z 7f54c57 Manual request
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 67ea1596ae

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread src/features/imageAssetSupport.ts Outdated
@Frotty

Frotty commented Sep 5, 2026

Copy link
Copy Markdown
Member Author

@codex review

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 459def483d

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread src/features/mapDataPreview.ts
The shared provider's backup held only the serialized file, so a document whose
only unsaved change was a TRIGSTR-backed string came back dirty but without the
edit. Providers can now declare a sidecar (save/restore of JSON state written
beside the backup); the wts-backed editors use it for their pending string
edits. Covered by an e2e round-trip on the camera editor.
@Frotty

Frotty commented Sep 5, 2026

Copy link
Copy Markdown
Member Author

@codex review

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: a84a5ba726

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread src/features/imageAssetSupport.ts Outdated
@Frotty

Frotty commented Sep 5, 2026

Copy link
Copy Markdown
Member Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Can't wait for the next one!

Reviewed commit: 7f54c57a93

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@Frotty
Frotty merged commit c94ea95 into master Sep 5, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant