fix: portal stability, session list DB fallback, and UX polish
- Free stale Memind listeners on 8081 before startup and exit cleanly on EADDRINUSE - Backfill owned sessions missing from Goose via h5_conversation_messages summaries - Strip Memind task orchestration prefixes from user-facing chat text - Repair missing public docx links before release MindSpace link checks Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
+11
-2
@@ -5723,15 +5723,24 @@ app.get('*', (_req, res) => {
|
||||
res.sendFile(path.join(__dirname, 'dist', 'index.html'));
|
||||
});
|
||||
|
||||
userAuthReady.then((enabled) => {
|
||||
userAuthReady.then((enabled) => {
|
||||
if (isDatabaseConfigured() && !enabled && process.env.NODE_ENV === 'production') {
|
||||
console.error('Refusing to start portal without user auth while database is configured');
|
||||
process.exit(1);
|
||||
}
|
||||
app.listen(PORT, HOST, () => {
|
||||
const server = app.listen(PORT, HOST, () => {
|
||||
console.log(`TKMind H5 @ http://${HOST}:${PORT}`);
|
||||
console.log(`Proxy -> ${API_TARGETS.join(', ')}`);
|
||||
console.log(`Auth -> ${enabled ? 'multi-user (MySQL)' : legacyAuth ? 'legacy password' : 'disabled'}`);
|
||||
console.log(`Wiki @ http://${HOST}:${PORT}/${PUBLISH_ROOT_DIR}/wiki`);
|
||||
});
|
||||
server.on('error', (err) => {
|
||||
if (err?.code === 'EADDRINUSE') {
|
||||
console.error(
|
||||
`Port ${PORT} already in use (${HOST}:${PORT}); exiting so LaunchAgent can retry after ThrottleInterval`,
|
||||
);
|
||||
process.exit(1);
|
||||
}
|
||||
throw err;
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user