Version 2.1 / 2.2 release and fix VS Code debug launch#5
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 72a664719d
ℹ️ 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".
| /// Forces a mapping regardless of whether <paramref name="target"/> equals <paramref name="source"/>. | ||
| /// Unlike <see cref="SetMapping"/>, this method overwrites existing mappings without identity checks. | ||
| /// It is intended for use in Undo/Redo mechanisms, Drag & Drop move operations, or mass deserialization. |
There was a problem hiding this comment.
Preserve forced identity mappings when loading configs
When a drag/move creates a forced identity mapping where the editable coordinate and backing source are equal, GetMappings() will save that row, but JsonSpriteConfigRepository.ToDomain still deserializes rows via SetMapping(...), whose identity optimization removes target == source. This makes save/reopen silently drop the same mappings this new drag/drop path is trying to preserve; the deserializer should use SetMappingForced for persisted rows so configs round-trip.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 8f8801354d
ℹ️ 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".
| { | ||
| cancellationToken.ThrowIfCancellationRequested(); | ||
|
|
||
| var dmiFile = _dmiCache.GetOrAdd(sourcePath, path => new DMIFile(path)); |
There was a problem hiding this comment.
Invalidate cached DMI when the file changes
In the WPF app this preview builder is registered as a singleton, and this cache is keyed only by the full path, so if a user regenerates/overwrites a .dmi and opens the same path again, DmiSharpReader will inspect the new file but preview generation will keep reading the old DMIFile instance until the app restarts. That makes base/landmark/overlay previews stale for a common edit-build-preview loop; include the file timestamp/length in the key or clear this cache when the loaded asset changes.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: a20c198b92
ℹ️ 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".
| var previewResult = await _readStateFrameUseCase.ExecuteAsync( | ||
| asset.SourcePath ?? string.Empty, | ||
| Path.GetFileName(asset.SourcePath ?? asset.DisplayName), | ||
| previewBitmap, | ||
| ImportedStatePlacementMode.None, | ||
| order); | ||
| imported.IsValid = isValid; | ||
| imported.ValidationMessage = validationMessage; | ||
| AttachImportedStateItem(imported); | ||
| ImportedDmiStateItems.Add(imported); | ||
| continue; | ||
| state.Name, | ||
| SpriteDirection.South, | ||
| cancellationToken); |
There was a problem hiding this comment.
Warm imported frames for every available direction
When opening a 4- or 8-direction DMI, this only seeds _importedStateFrameCache for South, while the new multi-direction/source rendering path reads imported layers from that cache and GetImportedStateFrame returns null for cache misses. After the user switches to East/North/West or enables the All/Parallel canvases, those source/editable surfaces render transparent until some later layer toggle happens to call PreloadImportedStateFramesAsync; preload all supported directions during the merge or schedule the warm-up before refreshing the editor.
Useful? React with 👍 / 👎.
| if (_restoredImportedStateSettings.Count > 0) | ||
| { | ||
| await RestoreImportedStateItemsAsync(CancellationToken.None); | ||
| } |
There was a problem hiding this comment.
Seed imported states when restoring older workspaces
For settings saved before ImportedStates existed, _restoredImportedStateSettings is empty, so startup restore skips this block and never calls the default MergeImportedStatesFromAssetAsync path that OpenDmiFromPathAsync uses. Since the new source/editable renderer now composes from ImportedDmiStateItems, upgraded workspaces restore with no source layers and blank canvases until the user reopens the DMI; when a loaded asset exists and no imported-state settings were saved, seed the default state list or keep a _baseImage fallback.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 04303a443d
ℹ️ 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".
| { | ||
| if (_dmiCache.TryUpdate(path, newEntry, existingEntry)) | ||
| { | ||
| existingEntry.File.Dispose(); |
There was a problem hiding this comment.
Avoid disposing cached DMI files still in use
When the source .dmi changes while another BuildAsync for the same path is still running, that earlier request may already hold the DMIFile returned from this cache. Replacing the cache entry here immediately disposes that same object, so the in-flight preview can continue into FindState/ReadFrame on a disposed file and fail or produce inconsistent previews; defer disposal until no build can be using the old entry, or avoid sharing disposable instances across concurrent builds.
Useful? React with 👍 / 👎.
Summary / Кратко
RU
v2.1/v2.2: обновлена версия WPF-приложения, добавленeng/build-release.ps1, обновлены README/docs и добавленdocs/releases/v2.1.mdс русской и английской версиями описания.dotnetdebug type, а старыйcoreclrfallback и связанные staging tasks удалены, чтобы не возвращать ошибку неизвестного debug adapter..vscode/extensions.json+Launch AdaptiveSpritesDmiTool WPF (.NET).rusificator-and-fixes: русские/английские ресурсы UI, настройки shell/editor, новые direction scopes, улучшения batch workspace, исправления Fill/Move, mirrored/parallel directions, rendering/performance и закрытия приложения.EditorSessionMoveTestsбез изменения поведения тестов.EN
v2.1/v2.2release: updated WPF app metadata, addedeng/build-release.ps1, refreshed README/docs, and addeddocs/releases/v2.1.mdwith Russian and English release text.dotnetdebug type, and the oldcoreclrfallback plus related staging tasks were removed so the unknown debug adapter error does not come back..vscode/extensions.json+Launch AdaptiveSpritesDmiTool WPF (.NET).rusificator-and-fixesproduct work: Russian/English UI resources, shell/editor settings, new direction scopes, batch workspace improvements, Fill/Move fixes, mirrored/parallel direction fixes, rendering/performance improvements, and shutdown fixes.EditorSessionMoveTestswithout changing test behavior.Release Artifact / Артефакт релиза
Local release package generated for manual upload:
SHA256:
Compatibility / Совместимость
version: 1Validation / Проверка
Previously passed locally for the release package:
Additional docs/debug cleanup validation:
Test results:
Manual Follow-Up / Ручная проверка
Launch AdaptiveSpritesDmiTool WPF (.NET).coreclrdebug adapter error.