Server Migration: real analysis and a real modular copy

The page was a mock: it never read the database (always 0 accounts),
showed a hard-coded schema and core version, looked for server files in
the wrong folder, and its "transfer" reported accounts, characters and
tables as moved without moving anything. Its locale was fixed to "ru".

- remove server_migration.rs and its three commands
- modular_copy::preview: classic/modular core, version, database state,
  counts and schemas from a running database (read only), database size,
  settings files, extra worlds; nothing is started or changed
- the page shows that and hands over to the same modular-copy install
  screen as "Manage another server"; texts in en and ru via i18n
- the modular copy now carries world settings changed in Server
  Configuration (Settings/worldserver.conf.template was not copied)
- E2E preview_bare_and_copy_e2e checks the preview and the carried
  setting; passes against preview core 0.261108.9501

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
ДмитрийandClaude Opus 5.5 committed 2026-11-11 09:22:22 +05:00
1 parent 6091e545f8
commit fdbf38ee4e
14 files changed
+495 -1260

No files matched your search

+9 -1
View File
@@ -21,6 +21,8 @@ function Main() {
const [activeId, setActiveId] = useState<string | null>(null);
// A classic server the owner chose: the install screen makes a modular copy of it next to it.
const [copyFrom, setCopyFrom] = useState<string | null>(null);
// Where Cancel on that install screen goes back to: the import screen or the server's own pages.
const [copyBack, setCopyBack] = useState<View>("import");
const refresh = useCallback(async () => {
const list = await api.list().catch(() => []);
@@ -46,6 +48,11 @@ function Main() {
activeId={activeId}
onSelect={setActiveId}
onAddAnother={() => setView("add")}
onCopy={(path) => {
setCopyFrom(path);
setCopyBack("welcome");
setView("install");
}}
onForget={async (id) => {
await api.forget(id);
await refresh();
@@ -60,7 +67,7 @@ function Main() {
canCancel
copyFrom={copyFrom ?? undefined}
onCancel={() => {
setView(copyFrom ? "import" : servers.length > 0 ? "add" : "welcome");
setView(copyFrom ? copyBack : servers.length > 0 ? "add" : "welcome");
setCopyFrom(null);
}}
onDone={async (s) => {
@@ -85,6 +92,7 @@ function Main() {
}}
onCopy={(path) => {
setCopyFrom(path);
setCopyBack("import");
setView("install");
}}
/>