Land the stacked follow-ups #112, #113 and #114 on master - #115
Conversation
…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.
- The standalone model viewer (blpPreview) resolves textures through postTexturesToWebview like the object editor's inline preview and the asset browser: same local-first resolver, payload/missing caches and concurrency limit, instead of its own lookup with unbounded Promise.all. Texture messages carry resolvedFsPath so the viewer's "open texture" link still works. The BLP-only findLocalTexture helper is removed. - Cached model thumbnails are handed to webviews as resource URIs instead of base64 data URLs; the thumb cache directory is admitted through localResourceRoots for the object editor and the asset browser. The asset browser also fetches model bytes by URI like the object editor does, so neither the model nor the thumbnail travels through postMessage as base64.
…or model textures
- The asset browser's CSP admits the extension's cspSource for img-src and
connect-src, which URI-mode model fetches and cached thumbnail images need.
- getCandidateRoots(..., { includeAncestors: true }) adds up to four ancestor
directories of the document; postTexturesToWebview uses it so a model nested
below a non-workspace map/project root still finds textures relative to that
root, as the removed BLP-only lookup did. Scans (gatherImportedAssets) keep
the plain root list and never walk ancestors.
…changes The shared texture resolver remembers misses so an absent texture is not re-probed on every render, but nothing ever forgot them. The viewer's Refresh (and its file watcher), the object editor's reload, and a wurst.wc3path change now clear that cache so a texture added or made reachable later is picked up.
With models delivered as webview resource URIs, the asset browser's thumbnail renderer still only decoded base64, so every cache miss rendered an empty buffer. It now fetches the URI (falling back to base64 for test doubles) and ignores the result if a newer job superseded it.
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 24713e80b6
ℹ️ 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".
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 66dfd49d3a
ℹ️ 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".
The object editor's ~1,380 lines of CSS, the MPQ viewer's and the shared map-data page styles were template literals inside TypeScript host modules, where nothing could lint or format them. They now live as real stylesheets under src/webview/, inlined into the host bundle by a webpack asset/source rule (and by the test loader), with the two runtime values the object editor needs (--wc3-tip-width and the optional tooltip @font-face) injected as a trailing rule. The extracted text is byte-identical to what the template literals produced.
66dfd49 to
0ac63c5
Compare
|
@codex review |
|
Codex Review: Didn't find any major issues. What shall we delve into next? Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
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". |
|
@codex review |
|
Codex Review: Didn't find any major issues. 🎉 Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
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". |
Summary
#112, #113 and #114 were stacked on each other and were merged into their base branches before those bases were retargeted, so their content never reached
master. This branch head (refactor/objmod-css-asset, which received #114's squash merge and contains #112 and #113 transitively) carries exactly that content:.cssfilesEvery commit here was already reviewed by Codex on its own PR with all findings resolved; the diff against
masteris the union of those three PRs (23 files). Merge with squash or merge commit; nothing new is added.