feat(desktop): add channel management, paired devices, and multiple fixes

Channel Management:
- Add Channels settings tab with full CRUD for Telegram/Discord (Lite: max 1 each)
- Channel detail panel with tabs: General, Credentials, Managers
- Advanced settings dialog (network, limits, streaming, behavior, access control)
- Schema-driven field renderer with Combobox selects, Switch toggles
- Paired Devices section: approve/deny pending, revoke paired, WS event auto-refresh
- Pairing notification badge in sidebar footer with pending count
- i18n support (en/vi/zh) for all channel strings

Bug Fixes:
- Fix Vietnamese slug generation (NFD normalize + đ/Đ handling) in lib/slug.ts
- Make agent key field editable instead of read-only
- Fix trace detail input/output: use MarkdownRenderer with copy button instead of forced-dark CodePreview
- Fix API error parsing to handle both {error: "string"} and {error: {message}} formats
- Add Accept-Language header to desktop API client for i18n error messages
- Wrap raw err.Error() with i18n messages in HTTP handlers (agents, channel_instances)
- Increase SQLite MaxOpenConns from 2 to 4 to reduce SQLITE_BUSY contention
- Add retryOnBusy wrapper for context file seeding writes
- Update EditionCompareModal: channels moved from "false" to "1 Telegram + 1 Discord"
This commit is contained in:
viettranx committed 2026-03-27 19:52:28 +07:00
1 parent 2bc0f5f14a
commit 6ea9b4d762
40 files changed
+2346 -64

No files matched your search

+3 -2
View File
@@ -26,8 +26,9 @@ func OpenDB(path string) (*sql.DB, error) {
}
// SQLite is single-writer; WAL allows concurrent readers.
// Keep pool small to reduce lock contention.
db.SetMaxOpenConns(2)
// 4 connections: up to 3 readers + 1 writer can proceed in parallel,
// reducing connection pool starvation during concurrent operations.
db.SetMaxOpenConns(4)
// Set PRAGMAs explicitly — DSN params may not be applied by modernc.org/sqlite.
pragmas := []string{