Commit b8d40d5
fix(insights): add timeout, fix refresh cancel, schedule stale tick
- fetchInsights now uses context.WithTimeout with the configured LLM
inference timeout instead of a bare cancel-only context.
- refreshInsights explicitly cancels in-flight requests and clears the
loading flag before calling maybeStartInsights, so pressing r during
a fetch actually restarts it.
- maybeStartInsights schedules insightsStaleTick when reusing cached
results so the "x ago" indicator keeps updating on dashboard reopen.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>1 parent 6853d20 commit b8d40d5
1 file changed
Lines changed: 7 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1023 | 1023 | | |
1024 | 1024 | | |
1025 | 1025 | | |
| 1026 | + | |
1026 | 1027 | | |
1027 | 1028 | | |
1028 | | - | |
1029 | | - | |
| 1029 | + | |
| 1030 | + | |
1030 | 1031 | | |
1031 | 1032 | | |
1032 | 1033 | | |
| |||
1083 | 1084 | | |
1084 | 1085 | | |
1085 | 1086 | | |
| 1087 | + | |
| 1088 | + | |
1086 | 1089 | | |
1087 | 1090 | | |
1088 | 1091 | | |
| |||
1096 | 1099 | | |
1097 | 1100 | | |
1098 | 1101 | | |
1099 | | - | |
| 1102 | + | |
1100 | 1103 | | |
1101 | | - | |
| 1104 | + | |
1102 | 1105 | | |
1103 | 1106 | | |
1104 | 1107 | | |
| |||
0 commit comments