Commit 647d965
feat: rehydrate widget activity tab from stored timeline (#5069)
## Summary
Builds on PR #5057 (DB tables + timeline endpoint) to wire the widget to
rehydrate its Activity tab on re-mount.
- **MCP routes**: First call (no cursor) now returns the stored
aggregate timeline alongside live data, for both running and terminal
tasks
- **Widget**: On mount, does a live status check (Claude.ai caches the
original tool result so `structuredContent.status` is stale), backfills
`aggHistory` from the stored timeline, then either starts polling
(running) or fetches results (completed)
- **Bug fix**: `pollUrl` was only set in the running-task branch, so
`backfillSummaries` silently returned for completed tasks
### Re-mount scenarios
| Scenario | Before | After |
|---|---|---|
| Task completed, return to conversation | Results only, empty Activity
tab | Full activity timeline + results |
| Leave mid-execution, return | Polling resumes with no history | Stored
timeline replayed, then polling continues |
## Test plan
- [x] Tested in Claude.ai via CF tunnel against local engine + prod
Supabase
- [x] Task completed, leave, return → Activity tab shows stored
aggregates
- [x] Leave mid-execution, return → Activity tab shows prior history +
new updates
- [x] No duplicate entries in Activity tab
- [x] MCP routes lint clean
🤖 Generated with [Claude Code](https://claude.com/claude-code)
---------
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Sourced from commit ef235840b023775a5363f71c61f77906815565861 parent 8cf7006 commit 647d965
File tree
2 files changed
+158
-30
lines changed- futuresearch-mcp/src/futuresearch_mcp
2 files changed
+158
-30
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
111 | 111 | | |
112 | 112 | | |
113 | 113 | | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
114 | 143 | | |
115 | 144 | | |
116 | 145 | | |
| |||
147 | 176 | | |
148 | 177 | | |
149 | 178 | | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
150 | 221 | | |
151 | 222 | | |
152 | 223 | | |
| |||
193 | 264 | | |
194 | 265 | | |
195 | 266 | | |
196 | | - | |
197 | | - | |
198 | | - | |
199 | | - | |
200 | | - | |
| 267 | + | |
| 268 | + | |
| 269 | + | |
| 270 | + | |
| 271 | + | |
| 272 | + | |
| 273 | + | |
| 274 | + | |
| 275 | + | |
| 276 | + | |
| 277 | + | |
| 278 | + | |
| 279 | + | |
201 | 280 | | |
202 | | - | |
| 281 | + | |
203 | 282 | | |
204 | 283 | | |
205 | 284 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1002 | 1002 | | |
1003 | 1003 | | |
1004 | 1004 | | |
1005 | | - | |
1006 | | - | |
1007 | | - | |
1008 | | - | |
1009 | | - | |
1010 | | - | |
1011 | | - | |
1012 | | - | |
1013 | | - | |
| 1005 | + | |
| 1006 | + | |
| 1007 | + | |
| 1008 | + | |
| 1009 | + | |
| 1010 | + | |
| 1011 | + | |
| 1012 | + | |
| 1013 | + | |
| 1014 | + | |
| 1015 | + | |
| 1016 | + | |
| 1017 | + | |
| 1018 | + | |
| 1019 | + | |
| 1020 | + | |
| 1021 | + | |
| 1022 | + | |
| 1023 | + | |
| 1024 | + | |
| 1025 | + | |
| 1026 | + | |
| 1027 | + | |
| 1028 | + | |
| 1029 | + | |
1014 | 1030 | | |
1015 | 1031 | | |
1016 | 1032 | | |
1017 | 1033 | | |
| 1034 | + | |
1018 | 1035 | | |
1019 | 1036 | | |
1020 | 1037 | | |
1021 | | - | |
1022 | | - | |
1023 | | - | |
1024 | | - | |
1025 | | - | |
1026 | | - | |
1027 | | - | |
1028 | | - | |
| 1038 | + | |
| 1039 | + | |
| 1040 | + | |
| 1041 | + | |
| 1042 | + | |
| 1043 | + | |
| 1044 | + | |
| 1045 | + | |
| 1046 | + | |
| 1047 | + | |
| 1048 | + | |
| 1049 | + | |
| 1050 | + | |
| 1051 | + | |
| 1052 | + | |
| 1053 | + | |
| 1054 | + | |
| 1055 | + | |
| 1056 | + | |
| 1057 | + | |
| 1058 | + | |
| 1059 | + | |
| 1060 | + | |
| 1061 | + | |
| 1062 | + | |
| 1063 | + | |
1029 | 1064 | | |
1030 | 1065 | | |
1031 | 1066 | | |
| |||
1037 | 1072 | | |
1038 | 1073 | | |
1039 | 1074 | | |
1040 | | - | |
1041 | | - | |
1042 | | - | |
1043 | | - | |
1044 | | - | |
1045 | | - | |
1046 | | - | |
| 1075 | + | |
| 1076 | + | |
| 1077 | + | |
| 1078 | + | |
| 1079 | + | |
| 1080 | + | |
| 1081 | + | |
| 1082 | + | |
| 1083 | + | |
| 1084 | + | |
| 1085 | + | |
| 1086 | + | |
| 1087 | + | |
| 1088 | + | |
| 1089 | + | |
| 1090 | + | |
| 1091 | + | |
| 1092 | + | |
| 1093 | + | |
| 1094 | + | |
| 1095 | + | |
1047 | 1096 | | |
1048 | 1097 | | |
1049 | 1098 | | |
| |||
0 commit comments