Skip to content

Version 2.3: стабилизация редактора и безопасная запись DMI - #8

Merged
PhantornRU merged 8 commits into
mainfrom
version/2.3
Jul 31, 2026
Merged

Version 2.3: стабилизация редактора и безопасная запись DMI#8
PhantornRU merged 8 commits into
mainfrom
version/2.3

Conversation

@PhantornRU

Copy link
Copy Markdown
Owner

Изменения

  • Добавлено атомарное ядро операций редактора с дедупликацией, проверкой конфликтов и одним Undo на жест.
  • Исправлена зеркальная проекция: настраиваемая ось без скрытого смещения и clamp, пропуск целей за границами.
  • Разделены Erase и Restore, добавлены непрерывные штрихи и отмена незавершённых жестов при смене контекста.
  • Конфиги обновлены до JSON v2 и Workspace v7 с сохранением настроек оси.
  • DMI writer переведён на проверяемую временную запись с сохранением порядка states, сверкой метаданных и RGBA-хешей, безопасной заменой и поддержкой in-place save.
  • Проект переведён на .NET 10, добавлены lock-файлы, locked restore, аудит зависимостей и сборка win-x64 ZIP.

Причина

Артефакты редактора вызывались смещённой и прижимаемой к краю проекцией, а жесты могли фиксироваться несколькими частями. Запись DMI не проверяла итоговый файл перед заменой исходника.

Результат

Зеркальные операции больше не объединяют пиксели на границе, инструменты применяют жесты атомарно, а ошибка, отмена или неуспешная проверка DMI не изменяет исходный файл.

Проверка

  • Unit tests: 230/230
  • Integration tests: 56/56
  • Debug и Release build: 0 предупреждений, 0 ошибок
  • Locked restore и vulnerability audit
  • win-x64 publish, ZIP smoke и запуск упакованного приложения

@PhantornRU
PhantornRU marked this pull request as ready for review July 31, 2026 03:23

@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: 789a1719d8

ℹ️ 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 on lines +101 to +102
_savedConfig = string.IsNullOrWhiteSpace(path) ? null : config.Clone();
IsDirty = _savedConfig is null;

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Preserve dirty baselines when activating queued configs

When a saved config is edited, SyncCurrentConfigIntoActiveQueueItem stores the modified snapshot together with its existing path; switching away and back then calls SetCurrentConfig(snapshot, path), and this line incorrectly treats that modified snapshot as the saved baseline. Consequently IsDirty becomes false and the UI reports the config as unmodified even though its changes were never written to disk. Queue activation needs to preserve the original saved baseline/dirty state or use a separate session-restore path rather than the disk-load semantics. AGENTS/PROJECT_CONTEXT.mdL29-L29

Useful? React with 👍 / 👎.

@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: a36f05427f

ℹ️ 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 on lines +790 to +791
var result = _applyConfigTransformUseCase.Execute(current => current.WithEditorSettings(settings));
ApplyMutationResult(result, $"Mirror axis moved to {value:+#;-#;0} pixel(s).", refreshPreview: false);

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Resynchronize the mirror axis after undo and redo

When a user changes the mirror-axis offset, this transform enters the EditorSession undo history, but the Undo/Redo commands only refresh the UI and never call SynchronizeMirrorAxisFromConfig. After Ctrl+Z or Ctrl+Shift+Z, projection uses the offset from the restored config while MirrorAxisOffsetPixels—and therefore the displayed guide, dialog value, and persisted workspace setting—still contains the previous offset, so subsequent mirrored edits are applied around a different axis than the one shown. Synchronize the ViewModel from the config returned by both commands. AGENTS/PROJECT_CONTEXT.mdL29-L29

Useful? React with 👍 / 👎.

@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: 88397a368b

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

resolution,
supportedDirections,
metadata,
editorSettings ?? SpriteEditorSettings.Default,

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Preserve mirror settings when clearing mappings

When a config has a nonzero mirror-axis offset, ResetActiveConfig rebuilds it via CreateEmpty without passing editorSettings, so this fallback silently resets the persisted axis to zero. The ViewModel's MirrorAxisOffsetPixels is not synchronized on that path, leaving the guide at the old offset while subsequent propagated edits use the centered axis; preserve the current settings during a mapping reset or explicitly resynchronize the shell afterward. AGENTS/PROJECT_CONTEXT.mdL29-L29

Useful? React with 👍 / 👎.

@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: ded992b269

ℹ️ 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 on lines +1247 to +1248
ShowMirrorAxisGuide="{Binding DataContext.EditorWorkspace.ShowMirrorAxisGuide, RelativeSource={RelativeSource AncestorType=Window}}"
MirrorAxisOffsetPixels="{Binding DataContext.EditorWorkspace.MirrorAxisOffsetPixels, RelativeSource={RelativeSource AncestorType=Window}}"

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Bind the mirror guide to properties that exist

When the user enables Axis guide or restores that setting at startup, these bindings resolve through EditorWorkspaceViewModel, but that type exposes neither ShowMirrorAxisGuide nor MirrorAxisOffsetPixels; the properties were added only to its nested CommandBar. WPF therefore leaves both dependency properties at their defaults (false and 0), so the guide never appears on the source or editable canvases regardless of the configured axis. Bind through EditorWorkspace.CommandBar or add forwarding properties to EditorWorkspaceViewModel. AGENTS/PROJECT_CONTEXT.mdL29-L29

Useful? React with 👍 / 👎.

@PhantornRU
PhantornRU merged commit c3dfeff into main Jul 31, 2026
2 checks 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