Commit 9104be8
feat: Deploy & Run History follow-ups — polling, metrics, deep-links, DB columns, server-side filters (#64)
* feat: deep-link success toast to Run History + auto-expand latest run
The Quick Deploy success toast now includes a clickable "View in Run
History →" link that navigates to /project/job/history?task=<id>,
preselecting the job. On arrival, the Run History page auto-expands
the most recent run (first row) in addition to any FAILURE rows, so
the user immediately sees the deploy they just triggered.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* feat: pre-fill create-job form from Quick Deploy 0-candidates CTA
When no job covers the current model, clicking "Go to Scheduler" now
navigates to /project/job/list?create=1&project=<pid>&model=<name>.
The Jobs List reads these params: auto-opens the create drawer, and
JobDeploy pre-enables the specified model in Model Configuration with
the config panel auto-expanded.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* feat: promote trigger + scope to real DB columns on TaskRunHistory
Previously stored only in kwargs JSON, making server-side filtering
impossible. Now first-class nullable CharField columns with DB
indexes, written by trigger_scheduled_run alongside kwargs.
- Migration 0002 adds trigger (scheduled/manual) and scope (job/model)
columns with defaults matching existing behavior.
- celery_tasks.py writes both the columns and kwargs (backward compat).
- Frontend getRunTriggerScope prefers top-level row.trigger / row.scope
(from serializer) and falls back to kwargs for pre-migration rows.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* feat: server-side Run History filtering by trigger, scope, status
Replaces client-side filtering with server-side query params on the
task_run_history endpoint. Filter changes now trigger a fresh API call
with ?trigger=manual&scope=model&status=FAILURE, so results are
accurate across all pages (previously client-side filtering only
worked on the visible page).
Backend accepts optional trigger, scope, status query params and
applies them as Django ORM filters against the new DB columns from
the previous migration.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* feat: live deploy progress polling on Quick Deploy button
After dispatching a deploy, the Quick Deploy button flips to
"Deploying…" with a spinner and polls the latest run status every 5s.
On terminal state (SUCCESS/FAILURE/REVOKED):
- Clears the polling interval
- Shows a completion toast with status + deep-link to Run History
- Refreshes the explorer (status badges) and recent-runs cache
Polling auto-cleans on component unmount. The button returns to its
normal state when the run finishes or the component unmounts.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* feat: capture runtime metrics from BASE_RESULT into TaskRunHistory
After DAG execution (success or failure), trigger_scheduled_run now
serializes BASE_RESULT into run.result as JSON with per-model
status/end_status and aggregate passed/failed counts.
Frontend insights panel renders a metrics bar when result is present:
"N models attempted · X passed · Y failed" plus per-model breakdown.
Falls back gracefully to scope/models display for older runs without
result data.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* fix: toast JSX links not rendering — add renderMarkdown: false
The notify service defaults to renderMarkdown: true, which wraps
description in ReactMarkdown. When description is JSX (our <a> link),
ReactMarkdown stringifies it via JSON.stringify, rendering as raw
text instead of a clickable link. Added renderMarkdown: false to
both the dispatch toast and the polling-completion toast.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* fix: hide metrics bar when result has no model data
Old runs have result as {} or with total=0. Guard with
record.result?.total > 0 so the metrics bar only renders when
there's actual execution data.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* fix: extract clean model name from class repr in run metrics
BASE_RESULT.node_name stores str(cls) which renders as
<class 'project.models.mdoela.Mdoela'>. Extract the module name
(second-to-last dotted segment) so metrics show "mdoela" instead
of the full class repr.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* fix: use class name for metrics instead of module name
A model file can define multiple classes (e.g. SourceMdoela + Mdoela)
in the same module. Using [-2] (module name) made them
indistinguishable. Switch to [-1] (class name) so the metrics
display shows "SourceMdoela (OK), Mdoela (OK)" instead of
"mdoela (OK), mdoela (OK)".
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* fix: filter out Source classes from run metrics
No-code models generate a *Source class (e.g. MdoelaSource) for DAG
dependency resolution alongside the user's actual model class. Both
execute as DAG nodes and appear in BASE_RESULT, but users only care
about their own models. Filter out classes ending with "Source" from
the metrics serialization so the count and per-model list reflect
user-created models only.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* fix: Source classes start with Source, not end with it
SourceMdoela, DevPaymentsSource — the sample projects use both
conventions. The generated no-code models use the prefix pattern
(SourceX). Changed endswith to startswith to match.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* fix: address PR #64 review — pagination filters, stale global, closure bugs
- Pass active filters through handlePagination and handleRefresh (P1)
- Snapshot-then-clear BASE_RESULT to prevent stale metrics across worker reuse (P1)
- Fix handleRefresh stale closure deps (P2)
- Forward project URL param from goToScheduler to JobDeploy (P2)
- Prefer DB columns over kwargs for trigger/scope in list_recent_runs_for_model (P2)
- Sanitize taskId with encodeURIComponent in toast deep-links (CodeQL)
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* fix: prettier formatting for toast deep-link JSX
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* fix: address Greptile review — BASE_RESULT ordering + pagination deps
P1: _mark_failure was called after _clear_base_result(), so failure
metrics were always empty. Swapped order: capture metrics first
via _mark_failure, then clear the global.
P1: getRunHistoryList had currentPage/pageSize in useCallback deps,
causing infinite re-creation on pagination. Removed — they're
passed as explicit arguments, not captured from closure.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* fix: use filterQueries.job instead of envInfo.id in pagination
envInfo.id updates only after getRunHistoryList completes, creating
a race window where pagination could fetch data for the previously
selected job if the user switches jobs and changes page before the
new data arrives. filterQueries.job updates immediately on job
selection, so pagination always targets the correct job.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* fix: eliminate double-fetch race and stale deep-link expand in run history
- Remove getRunHistoryList and pageSize from filter effect deps to
prevent double-fetch when handleJobChange sets filterQuery.job
- Let the filter effect be the sole fetch trigger for job/filter changes
- Use a ref to track deep-link consumption so auto-expand only fires
once on initial arrival, not on every data refresh
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* fix: resolve eslint/prettier errors in run history
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* fix: make trigger/scope nullable so pre-migration rows use kwargs fallback
Existing rows get NULL instead of "scheduled"/"job" defaults, allowing
the kwargs-based fallback to correctly identify manual/model-scope runs.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* fix: preserve prefillModel when project-change effect resets model configs
The async getProjectModels callback was clearing modelConfigs after
the prefillModel effect had already set the pre-checked model. Now
preserves the prefilled model during reset.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>1 parent 24d477c commit 9104be8
9 files changed
Lines changed: 399 additions & 56 deletions
File tree
- backend/backend/core/scheduler
- migrations
- frontend/src/ide
- editor/no-code-model
- run-history
- scheduler
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
147 | 147 | | |
148 | 148 | | |
149 | 149 | | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
150 | 163 | | |
151 | 164 | | |
152 | 165 | | |
| |||
264 | 277 | | |
265 | 278 | | |
266 | 279 | | |
| 280 | + | |
| 281 | + | |
267 | 282 | | |
268 | 283 | | |
269 | 284 | | |
| |||
321 | 336 | | |
322 | 337 | | |
323 | 338 | | |
| 339 | + | |
| 340 | + | |
| 341 | + | |
| 342 | + | |
| 343 | + | |
| 344 | + | |
| 345 | + | |
| 346 | + | |
| 347 | + | |
| 348 | + | |
| 349 | + | |
| 350 | + | |
| 351 | + | |
| 352 | + | |
| 353 | + | |
| 354 | + | |
| 355 | + | |
| 356 | + | |
| 357 | + | |
| 358 | + | |
| 359 | + | |
| 360 | + | |
| 361 | + | |
| 362 | + | |
| 363 | + | |
| 364 | + | |
| 365 | + | |
| 366 | + | |
| 367 | + | |
| 368 | + | |
| 369 | + | |
| 370 | + | |
| 371 | + | |
| 372 | + | |
| 373 | + | |
| 374 | + | |
324 | 375 | | |
325 | 376 | | |
326 | 377 | | |
327 | 378 | | |
328 | | - | |
| 379 | + | |
329 | 380 | | |
330 | 381 | | |
331 | 382 | | |
| |||
336 | 387 | | |
337 | 388 | | |
338 | 389 | | |
| 390 | + | |
339 | 391 | | |
340 | 392 | | |
341 | 393 | | |
342 | 394 | | |
343 | 395 | | |
| 396 | + | |
344 | 397 | | |
345 | 398 | | |
346 | 399 | | |
| |||
380 | 433 | | |
381 | 434 | | |
382 | 435 | | |
| 436 | + | |
| 437 | + | |
| 438 | + | |
| 439 | + | |
| 440 | + | |
| 441 | + | |
| 442 | + | |
| 443 | + | |
| 444 | + | |
| 445 | + | |
| 446 | + | |
| 447 | + | |
| 448 | + | |
| 449 | + | |
| 450 | + | |
| 451 | + | |
| 452 | + | |
| 453 | + | |
| 454 | + | |
| 455 | + | |
| 456 | + | |
| 457 | + | |
| 458 | + | |
| 459 | + | |
| 460 | + | |
383 | 461 | | |
384 | 462 | | |
385 | 463 | | |
386 | | - | |
| 464 | + | |
387 | 465 | | |
388 | 466 | | |
389 | 467 | | |
| |||
Lines changed: 47 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 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
132 | 132 | | |
133 | 133 | | |
134 | 134 | | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
135 | 151 | | |
136 | 152 | | |
137 | 153 | | |
| |||
154 | 170 | | |
155 | 171 | | |
156 | 172 | | |
| 173 | + | |
| 174 | + | |
157 | 175 | | |
158 | 176 | | |
159 | 177 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
595 | 595 | | |
596 | 596 | | |
597 | 597 | | |
598 | | - | |
| 598 | + | |
| 599 | + | |
| 600 | + | |
| 601 | + | |
| 602 | + | |
| 603 | + | |
| 604 | + | |
| 605 | + | |
| 606 | + | |
| 607 | + | |
| 608 | + | |
| 609 | + | |
| 610 | + | |
599 | 611 | | |
600 | 612 | | |
601 | 613 | | |
| |||
759 | 771 | | |
760 | 772 | | |
761 | 773 | | |
762 | | - | |
763 | | - | |
| 774 | + | |
| 775 | + | |
764 | 776 | | |
765 | | - | |
| 777 | + | |
766 | 778 | | |
767 | 779 | | |
768 | | - | |
| 780 | + | |
769 | 781 | | |
770 | 782 | | |
771 | 783 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
259 | 259 | | |
260 | 260 | | |
261 | 261 | | |
| 262 | + | |
262 | 263 | | |
263 | 264 | | |
264 | 265 | | |
| |||
273 | 274 | | |
274 | 275 | | |
275 | 276 | | |
276 | | - | |
| 277 | + | |
277 | 278 | | |
| 279 | + | |
| 280 | + | |
278 | 281 | | |
279 | 282 | | |
280 | 283 | | |
| |||
1921 | 1924 | | |
1922 | 1925 | | |
1923 | 1926 | | |
| 1927 | + | |
1924 | 1928 | | |
1925 | 1929 | | |
1926 | 1930 | | |
1927 | | - | |
1928 | | - | |
1929 | | - | |
1930 | | - | |
| 1931 | + | |
| 1932 | + | |
| 1933 | + | |
| 1934 | + | |
| 1935 | + | |
| 1936 | + | |
| 1937 | + | |
| 1938 | + | |
| 1939 | + | |
| 1940 | + | |
| 1941 | + | |
| 1942 | + | |
| 1943 | + | |
| 1944 | + | |
| 1945 | + | |
| 1946 | + | |
| 1947 | + | |
1931 | 1948 | | |
1932 | | - | |
1933 | | - | |
| 1949 | + | |
1934 | 1950 | | |
1935 | 1951 | | |
1936 | 1952 | | |
| |||
1942 | 1958 | | |
1943 | 1959 | | |
1944 | 1960 | | |
| 1961 | + | |
| 1962 | + | |
| 1963 | + | |
| 1964 | + | |
| 1965 | + | |
| 1966 | + | |
| 1967 | + | |
| 1968 | + | |
| 1969 | + | |
| 1970 | + | |
| 1971 | + | |
| 1972 | + | |
| 1973 | + | |
| 1974 | + | |
| 1975 | + | |
| 1976 | + | |
| 1977 | + | |
| 1978 | + | |
| 1979 | + | |
| 1980 | + | |
| 1981 | + | |
| 1982 | + | |
| 1983 | + | |
| 1984 | + | |
| 1985 | + | |
| 1986 | + | |
| 1987 | + | |
| 1988 | + | |
| 1989 | + | |
| 1990 | + | |
| 1991 | + | |
| 1992 | + | |
| 1993 | + | |
| 1994 | + | |
| 1995 | + | |
| 1996 | + | |
| 1997 | + | |
| 1998 | + | |
| 1999 | + | |
| 2000 | + | |
| 2001 | + | |
| 2002 | + | |
| 2003 | + | |
| 2004 | + | |
| 2005 | + | |
| 2006 | + | |
| 2007 | + | |
| 2008 | + | |
| 2009 | + | |
| 2010 | + | |
| 2011 | + | |
| 2012 | + | |
| 2013 | + | |
| 2014 | + | |
| 2015 | + | |
| 2016 | + | |
| 2017 | + | |
1945 | 2018 | | |
1946 | 2019 | | |
1947 | | - | |
| 2020 | + | |
| 2021 | + | |
| 2022 | + | |
| 2023 | + | |
| 2024 | + | |
| 2025 | + | |
1948 | 2026 | | |
1949 | 2027 | | |
1950 | 2028 | | |
| |||
2945 | 3023 | | |
2946 | 3024 | | |
2947 | 3025 | | |
2948 | | - | |
| 3026 | + | |
| 3027 | + | |
2949 | 3028 | | |
2950 | | - | |
| 3029 | + | |
2951 | 3030 | | |
2952 | 3031 | | |
2953 | 3032 | | |
| |||
0 commit comments