De-mock Settings + empty Capture braindump + resolve connection status

More static mocks found by poking the live app:

- Settings was ~80% mock: a fake Sync card (webhook endpoint :48731, poll
  fallback, 'last reconcile 3.2s · 500 issues'), a fake dual-model 'router'
  (gemma-4b/qwen-72b with hardcoded URLs), and an unwired Rituals card. Replaced
  with honest/live content: the Sync card now describes the real on-demand
  reconcile + stale-cache model; the Model card shows the actual probed model
  from model.status(); dropped Rituals and the duplicate 'Forget' button.
- Settings showed 'Not connected' while the app was clearly connected: config:get
  returned only the *saved* config, so a .env.local/env connection read as null.
  It now falls back to a public view of the resolved connection — Settings and
  the rail host label reflect the real christian/commitea connection.
- Capture braindump was pre-filled with a fake example ('auth is flaky…'); now
  starts empty with just the placeholder.

Verified live: Settings shows christian/commitea connected + google/gemma-4-26b
reachable; Capture empty; a live Reginald chat turn runs the agent loop.
desktop tsc clean.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
Croissant Le Doux
2026-07-10 16:09:59 -04:00
parent 50db790f86
commit 1026c762a9
3 changed files with 106 additions and 84 deletions

View File

@@ -365,7 +365,23 @@ export function registerGiteaIpc(): void {
})
// ---- config (team onboarding) ----
ipcMain.handle('config:get', () => publicConfig())
// The saved config's public view, or — when running off a .env.local / env
// fallback (dev) — a public view of the *resolved* connection, so Settings and
// the rail reflect what the app is actually connected to, not just the store.
ipcMain.handle('config:get', () => {
const saved = publicConfig()
if (saved) return saved
const c = resolveConfig()
if (!c) return null
return {
baseUrl: c.baseUrl,
owner: c.owner,
repo: c.repo,
pmStateRepo: pmStateRepoName(c),
modelUrl: process.env.MODEL_BASE_URL ?? undefined,
hasToken: !!c.token,
}
})
ipcMain.handle('config:set', (_event, cfg: AppConfig) => {
saveConfig(cfg)