Skip to content

Connections: deleting a core does not offer to delete its local data, and logs/backups/json references keep it after a Storage delete #724

Description

@Alena-Selezneva

Status (after #748)

Deleting a core's local data per core now exists in Settings → General → Storage → "Data by core" (reports, strategy history, order traces, warning episodes). What remains for this issue:

  • offer the delete in the Connections delete flow itself;
  • logs/, backups/settings/, backups/strategies/, panic.log, and uid references in figures.json, layout.toml, charts.json, core_groups, Telegram chat_access, tab_badges.json, core_updates.json are not touched by any delete;
  • server-wide warning episodes (keyed by server IP) stay.

The original report follows.


User request

@A1S2M3S4Q9 in the MoonTerminal chat (2026-09-25): «как правильно удалить на локальной машине уже подключенные ядра, чтобы на локальной машине не осталось и следа, что было что-то подключено?» (how do I remove already-connected cores so that no trace is left on the local machine).

What happens today (checked in code)

Settings → Connections → «Удал» → «Сохранить» removes the core from servers.enc, stops its session and prunes its chart specs (settings/connections/table.rs::delete_server, settings/apply.rs). Nothing else is touched. What stays on disk for that core:

  • its rows in the report replica reports.sqlite (by design its core_uid is never reused, see db::max_core_uid — so the rows are never overwritten either);
  • strategies.sqlite (strategy version history), order_traces.sqlite, core_warnings.sqlite — kept deliberately as the only copy;
  • daily snapshots under backups/settings/ still contain the old servers.enc with the removed core (encrypted);
  • logs/ (core addresses appear in log lines);
  • panic.log in the working directory.

The only way to wipe it today is to delete the whole data directory plus the moon-terminal OS keyring entry, which also wipes every other core.

Proposal

When deleting a core, offer «also delete this core's local data» (report rows, strategy history, order traces, warnings for this core_uid), ideally with a preview of what will be removed, like the storage-cleanup preview in «Настройки → Хранилище». Backups/logs could be mentioned in the dialog as not covered, or pruned too.

Use cases: selling/handing over a VPS or a core, a shared machine, or just not wanting history of a core you no longer use.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions