Skip to content

Land the stacked follow-ups #112, #113 and #114 on master - #115

Merged
Frotty merged 10 commits into
masterfrom
refactor/objmod-css-asset
Sep 5, 2026
Merged

Land the stacked follow-ups #112, #113 and #114 on master#115
Frotty merged 10 commits into
masterfrom
refactor/objmod-css-asset

Conversation

@Frotty

@Frotty Frotty commented Sep 5, 2026

Copy link
Copy Markdown
Member

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:

Every commit here was already reviewed by Codex on its own PR with all findings resolved; the diff against master is the union of those three PRs (23 files). Merge with squash or merge commit; nothing new is added.

…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.
@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-07T12:24:52.336757Z 0ac63c5 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: 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".

Comment thread src/features/assetLinks.ts
Comment thread src/features/preview/modelPreviewHost.ts
@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: 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".

Comment thread src/features/blpPreview.ts
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.
@Frotty
Frotty force-pushed the refactor/objmod-css-asset branch from 66dfd49 to 0ac63c5 Compare September 5, 2026 18:30
@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. What shall we delve into next?

Reviewed commit: 0ac63c531f

ℹ️ 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 386a664 into master Sep 5, 2026
1 check passed
@Frotty

Frotty commented Sep 7, 2026

Copy link
Copy Markdown
Member Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. 🎉

Reviewed commit: 386a6649db

ℹ️ 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".

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