Back to Flutter Server Box

Retirement & Migration Residue Tracker

RETIREMENT.md

1.0.15746.1 KB
Original Source

Retirement & Migration Residue Tracker

This document tracks every TODO that exists as intentional migration residue. It is the single source of truth for when each shim can be deleted. No shim is removed without updating this file and bumping SchemaVersion where applicable.

Rule: See lib/data/store/schema.dart and lib/data/store/migrations/all.dart. A schema step is three edits: model, SchemaVersion.current, and kSchemaMigrations. Testing apply() directly never proves the other two. See CLAUDE.md for details.

Hive (keep per Q1)

Data has been on SQLite since before 1.0.1538. However upgrades from 1466/1480/1491 and earlier still rely on HiveImport. Fixtures under test/fixtures/hive_v{1466,1480,1491}/ and test/hive_release_migration_test.dart guard this path. Do not delete lib/hive/ or hive_ce dependencies until SchemaVersion.oldestSupported is advanced past the Hive era and fixtures confirm no install can still carry a Hive box.

AreaFile:LineSinceRetire whenNotes
Hive bootstraplib/main.dart:109m003no install predates HiveImportHive.initFlutter, registerHiveLegacyAdapters, Hive.close, lib/hive/* + hive_ce* deps
Hive adapterslib/hive/legacy_adapters.dart:27m003with Hive bootstrapfrozen adapters; never regenerate
Hive SPI legacylib/hive/spi_legacy_adapter.dart:70m004with SpiNestSshMigrationSpi nesting
Hive → SQLite migrationlib/data/store/migrations/m003_hive_to_sqlite.dart:18m003with Hive bootstrap
Schema bump guardlib/data/store/schema.dart:156m003with HiveImportTODO there

v2 compatibility shims

File:LineSinceRetire whenNotes
lib/core/sync.dart:143v2no v2 backup can still be importedBakSyncer + lib/data/res/misc.dart:24, lib/data/model/app/bak/*
lib/data/res/misc.dart:24v2with sync.dart
lib/main.dart:85v2no backup holds legacy nameBakSyncer.inheritLegacyRemote

ServerCustom cmds / withoutCmds

custom.dart keeps cmds (CSV) alongside the normalized child table. One full release after the table is the only store of truth can it go.

File:LineSinceRetire whenNotes
lib/data/model/server/custom.dart:19,50m004 extnext major after 1.0.1538withoutCmds/cmds fields
lib/data/provider/server/single.dart:640m004 extwith custom.dartfallback read
lib/view/page/server/edit/edit.dart:152m004 extwith custom.darteditor write path

Settings — retired keys swept by removeRetiredKeys

SettingStore.removeRetiredKeys (lib/data/store/setting.dart:516,775) is the sweeper. Each entry has a paired migration.

Key / File:LineMigrationRetire when
watchServerIds lib/data/store/setting.dart:230m015_watch_selection_to_exclusion.dart:25one release after exclusion shipped
legacyStatusUrls lib/data/store/setting.dart:256m016_legacy_status_urls.dartone release after 410 dialog shipped
schemaVersion kv lib/data/store/setting.dart:516when no install can hold stale fgService row
fgService stale row lib/data/store/setting.dart:628swept, harmless
string branch sshVirtKeys lib/data/store/setting.dart:587m011_virt_key_rows.dart:11 + m013_virt_key_namesafter rows migration
flag reads lib/data/store/setting.dart:802m008_settings_fixups.dart:38,69,72with SettingsFixups
virtKeyRows read lib/data/store/setting.dart:818m011_virt_key_rows.dart:11with VirtKeyRows

known_host table

File:LineMigrationRetire when
lib/data/store/server.dart:435 + lib/data/store/migrations/m004_kv_to_tables.dart:437 + m012_known_hosts_to_settings.dart:25m012no install can carry known_host table

Home / history / tabs

File:LineSinceRetire when
lib/data/store/history.dart:152 homeTabIndexm010lib/view/page/home.dart:161
lib/data/ssh/terminal_source.dart:104 / lib/view/page/ssh/tab.dart:467 / lib/view/page/storage/tab.dart:433 tab profilesprofile migrationno saved tab set predates profiles

Scripts / platform

File:LineSinceRetire when
lib/data/model/app/scripts/cmd_types.dart:28 enum syncsbm_parser sharewhen Dart enum generated from sbm_parser
lib/data/model/app/scripts/script_consts.dart:7script sharewhen ScriptConstants derived from crates/sbm_parser
lib/data/model/app/linux_distro.dart:284after three-line /etc/os-release trim
lib/data/model/app/server_detail_card.dart:83after card ks names stabilized
lib/core/utils/ios_rootfs.dart:818containerno install predates container
lib/core/utils/local_files.dart:23no install still writes old paths
lib/main.dart:103 extended_image_library folderupstreamwhen library creates folder recursively
lib/view/page/storage/file_browser.dart:724 sudo rescueSFTP sudowhen escalatePath decided
lib/view/page/setting/entries/app.dart:470 raw settings editdecide intentionality

How to retire

  1. Hive retirements only: Confirm test/hive_release_migration_test.dart + test/fixtures/* expectation. Other retirements skip this.
  2. Persisted-schema changes only: Bump SchemaVersion.current in lib/data/store/schema.dart and add entry in lib/data/store/migrations/all.dart. ARB, platform, and code-only retirements skip this — no schema step needed.
  3. Remove code + update this file (move row to Retired below).
  4. Run the checks that match the change: dart run build_runner build --delete-conflicting-outputs if models changed, flutter gen-l10n if ARB touched, flutter analyze, cargo test --workspace if Rust changed, flutter test --timeout 30s (always).
  5. One PR per retirement.

Retired (append here)

DateItemPR
2026-09-026 unused ARB keys (distIconConsent etc.)opt/codebase-cleanup-1553 batch 0