Skip to content

Fix: count import changes against the server's export - #498

Merged
SandObserver merged 1 commit into
mainfrom
fix/import-compare-with-export
Oct 18, 2026
Merged

SandObserver merged 1 commit into
mainfrom
fix/import-compare-with-export

Conversation

@SandObserver

Copy link
Copy Markdown
Owner

Summary

  • Add importCounts to admin-save-logic.js: added, updated and deleted counts with a key-order independent comparison.
  • Compute the import confirm counts against a fresh GET /api/config/export instead of state.items.
  • Run ensureSystemItems on GET /api/config/export, so the export lists the same items as GET /api/config.
  • Refresh cache-busting stamps.

Testing
All green, e2e included. Added 2 tests for importCounts and 1 for export and config item parity.

Changelog

Fixed

  • Report no changes when importing an export that matches the current configuration.

Checklist

  • Stays within the project constraints: one container, no runtime dependencies, no build step (see CONTRIBUTING.md).
  • Tests added or updated for new logic, and the full suite, lint, and typechecks pass.
  • Docs updated if behavior or configuration changed.

The import dialog compared the file with the editor's in-memory items,
which keep row key order and secret values the export does not, so an
unchanged export reported updated items. The export also left out the
Settings system item, so a fresh install's export reported one deletion.

The dialog now compares the file with a fresh export using a key-order
independent comparison, and the export includes the system items.
@SandObserver SandObserver added the bug Something isn't working label Oct 18, 2026
@SandObserver
SandObserver merged commit 4e7a81b into main Oct 18, 2026
6 checks passed
@SandObserver
SandObserver deleted the fix/import-compare-with-export branch October 18, 2026 22:34
stackyard-release Bot pushed a commit that referenced this pull request Oct 18, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant