ReviewOS

also looking at this

stacks/uplink

fix(app): report a crash instead of vanishing, and cap the log

#55
Merged glennmichael123 wants to merge fix/log-a-crash-and-cap-the-log into main
4 files +252 -5
app/Uplink/settings.tsmodified+8-0
Changes to app/Uplink/settings.ts
@@ -17,6 +17,14 @@ export const DATA_DIR = join(homedir(), 'Library', 'Application Support', 'Uplin
1717export const SETTINGS_PATH = join(DATA_DIR, 'settings.json')
1818export const DATABASE_PATH = join(DATA_DIR, 'uplink.sqlite')
1919export const LOG_PATH = join(homedir(), 'Library', 'Logs', 'Uplink.log')
20/**
21 * Rotate past this. The watcher polls every two seconds and appends whatever
22 * it finds, so the file is unbounded on a Mac that is simply left running.
23 * One rotation is kept as `Uplink.log.1`, because the lines leading up to a
24 * crash are the ones worth reading and a rotation triggered by that crash's
25 * own output would otherwise throw them away.
26 */
27export const LOG_MAX_BYTES = 5 * 1024 * 1024
2028
2129const KEYCHAIN_SERVICE = 'com.stacksjs.uplink'
2230// Claude Code's token. Codex keeps its own credentials in CODEX_HOME via