@@ -47,12 +47,40 @@ PYOPS_MIGRATIONS_DIR=<bundled drizzle directory>
4747PYOPS_MOD_DIR=<bundled mod directory>
4848```
4949
50- The shell drains the child-process output channel and retains its handle so shutdown can
51- terminate the server cleanly.
50+ The shell retains the child-process handle so shutdown can terminate the server cleanly,
51+ and passes each path through ` dunce ` so Windows sidecars receive plain ` C:\… ` paths rather
52+ than ` \\?\ ` -prefixed extended-length paths.
5253
5354This split is why server path code must use ` app/src/server/paths.server.ts ` . The current
5455working directory is not a reliable resource or data root in a packaged application.
5556
57+ ### Server log
58+
59+ In a packaged build, everything the server prints — stdout and stderr — is written to
60+ ` server.log ` in the app-data directory, interleaved with launcher lifecycle lines that are
61+ stamped with seconds since launch (` [launcher +0.2s] server ready, opening the app ` ). Each
62+ launch starts a fresh log; the previous launch's log is kept as ` server.log.old ` .
63+
64+ This file is the primary diagnostic for startup failures on user machines: it records the
65+ resolved server entry path, the data directory, spawn errors, server crashes with their
66+ exit code, and the server's own output. Ask a user to attach it before anything else.
67+ Logging must never take the app down: if the file cannot be created, logging is silently
68+ disabled and startup proceeds.
69+
70+ Development builds do not write it — the server runs in the developer's terminal.
71+
72+ ### Startup failure page
73+
74+ The shell waits up to 90 seconds for the server port, and bails out immediately if the
75+ server process exits or fails to spawn. If the server is not reachable, the window opens
76+ with a built-in diagnostic page instead of the webview's network-error page: it explains
77+ that the local server has not come up, shows the ` server.log ` path to attach to a bug
78+ report, and offers a retry button.
79+
80+ The page is not a dead end. The launcher keeps polling the port behind it and swaps in the
81+ application the moment the server becomes reachable, which absorbs slow first launches
82+ (for example, antivirus software scanning a fresh install).
83+
5684### Fixed port and single instance
5785
5886The webview URL uses fixed port ` 34115 ` . ` tauri-plugin-single-instance ` is registered before
0 commit comments