Commit b00192b
fix(#187 follow-up): address Copilot review on dashboard brain prompt
Three findings from Copilot's review of PR #248, all addressed:
- **Privacy copy was misleading**: "your data never leaves the
device" was true only for the local brain path; the BYO API key
path sends data to the third-party. Restructured the card so the
privacy claim is scoped per-option: "Local brain — runs on your
machine, no API keys, no per-message cost, your data never leaves
the device" / "API key — uses Anthropic / OpenAI / Google. Faster
on a small laptop, but each message goes to that provider."
Headline now neutral: "Pick how your twin thinks."
- **Stale provider state**: settingsData was wrapped in slowFetch
with a 30s TTL, so a user who enabled their first AI provider in
Settings and bounced back to the dashboard could keep seeing the
prompt for half a minute. Switched to a direct fetchSettings()
call — the endpoint is small and only relevant for first-run
renders, so the cache savings weren't earned.
- **False positive on transient API failure**: Both fetchSettings
and fetchDecisions falling back to empty arrays meant a single
blip would surface the onboarding prompt to users who actually
have providers and decisions. Now requires positive evidence
before showing: settingsFulfilled && decisionsFulfilled.
Web build clean.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>1 parent 2db0ef8 commit b00192b
1 file changed
Lines changed: 24 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
250 | 250 | | |
251 | 251 | | |
252 | 252 | | |
253 | | - | |
| 253 | + | |
254 | 254 | | |
255 | | - | |
| 255 | + | |
256 | 256 | | |
257 | 257 | | |
258 | 258 | | |
| 259 | + | |
| 260 | + | |
| 261 | + | |
| 262 | + | |
259 | 263 | | |
260 | 264 | | |
261 | 265 | | |
| |||
295 | 299 | | |
296 | 300 | | |
297 | 301 | | |
298 | | - | |
| 302 | + | |
| 303 | + | |
| 304 | + | |
| 305 | + | |
| 306 | + | |
299 | 307 | | |
300 | 308 | | |
301 | 309 | | |
| |||
359 | 367 | | |
360 | 368 | | |
361 | 369 | | |
| 370 | + | |
| 371 | + | |
| 372 | + | |
| 373 | + | |
| 374 | + | |
362 | 375 | | |
363 | | - | |
| 376 | + | |
| 377 | + | |
| 378 | + | |
364 | 379 | | |
365 | 380 | | |
366 | 381 | | |
367 | 382 | | |
368 | 383 | | |
369 | | - | |
| 384 | + | |
| 385 | + | |
| 386 | + | |
| 387 | + | |
| 388 | + | |
370 | 389 | | |
371 | 390 | | |
372 | 391 | | |
| |||
0 commit comments