Commit 9f75d18
committed
fix(web): drop dead no-arg listTasks + invalidate overview on runtime-limit WS
Per #143 review (REQUEST_CHANGES), two fixes:
1. Must-fix #1 — bare listTasks() URL /tasks/tasks:
The retained no-arg overload did request(`${API_BASE}/tasks`) while
API_BASE is already '/tasks' (regression re-introduced when migrating files
off an older branch state). After the dashboard migrated to /projects/overview,
the no-arg path has no remaining caller, so the overload + bare branch are
removed entirely. listTasks(projectId) is the only signature now.
2. Must-fix #2 — WS runtime_limit_updated leaves overview metrics stale:
project:runtime_limit_updated fired but only invalidated ['tasks'], skipping
the new overview query. Since overview aggregates token/cost fields, the
dashboard header + project cards showed stale token/cost after usage updates.
Add invalidateProjectTaskOverviews(queryClient) in that branch.
Regression test: useWebSocketOverviewInvalidation.test pins that
invalidateProjectTaskOverviews invalidates ['projectTaskOverviews'], so a
future change that drops/renames the query key surfaces immediately.
Verification: tsc clean (web); 675 web tests green; prettier/lint/build green.1 parent cae0059 commit 9f75d18
3 files changed
Lines changed: 33 additions & 10 deletions
File tree
- packages/web/src
- __tests__
- hooks
- lib
Lines changed: 25 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
227 | 227 | | |
228 | 228 | | |
229 | 229 | | |
| 230 | + | |
| 231 | + | |
230 | 232 | | |
231 | 233 | | |
232 | 234 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
254 | 254 | | |
255 | 255 | | |
256 | 256 | | |
257 | | - | |
258 | | - | |
259 | | - | |
260 | | - | |
261 | | - | |
262 | | - | |
263 | | - | |
264 | | - | |
265 | | - | |
266 | | - | |
| 257 | + | |
| 258 | + | |
| 259 | + | |
| 260 | + | |
| 261 | + | |
| 262 | + | |
267 | 263 | | |
268 | 264 | | |
269 | 265 | | |
| |||
0 commit comments