-
Notifications
You must be signed in to change notification settings - Fork 79
Open
Description
Problem
1. Database config.yaml settings ignored
getDatabaseUrl() and getDatabaseDialect() in @agor/core/db only read from environment variables (AGOR_DB_DIALECT, DATABASE_URL, AGOR_DB_PATH). The database section in ~/.agor/config.yaml is completely ignored, even though AgorDatabaseSettings types are fully defined.
This means users who configure postgres via config.yaml still get SQLite, leading to confusing SQLITE_BUSY errors.
2. Handlebars dynamic import breaks in bundled UI
SessionPanel.tsx uses await import('handlebars') which returns a module namespace object in ESM/Vite, not the Handlebars object. This causes TypeError: Me.registerHelper is not a function when spawning subsessions.
Fix
Database config
- Wire
getDatabaseDialect()to readdatabase.dialectfrom config.yaml (after env vars) - Wire
getDatabaseUrl()to readdatabase.postgresql.url/database.sqlite.pathfrom config.yaml - Support building PostgreSQL URL from individual
host/port/user/password/databasefields - Env vars still take priority over config.yaml
Handlebars
- Replace dynamic
await import('handlebars')with staticimport Handlebars from 'handlebars' - Pre-compile template at module load, matching ForkSpawnModal pattern
Config.yaml example
database:
dialect: postgresql
postgresql:
url: postgresql://agor:agor@localhost:55432/agorReactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels