Commit 5a4733c
feat(executions): enriched execution logs (JSON tree, grouping, navigation, display settings) (#16580)
* feat(executions): enriched execution logs — JSON tree, grouping, navigation, display settings
Make the execution Logs tab and the global /logs page structure-aware and
navigable (BHP request kestra-ee#8305; ships the JSON-in-logs ask #7978).
Log line:
- Inline collapsible JSON tree for structured lines (heuristic detection,
parse-on-expand, raw fallback, --ks-editor-* highlight, no v-html).
- Collapse consecutive near-identical lines into a "xN similar" group.
- Redesigned line: level rail, metadata pills, message on its own row.
- Highlight search matches (tokenized over rendered HTML, entity/ReDoS-safe).
Toolbar (both pages, DS 2.0):
- Sticky bar with per-icon KsButton surfaces matching the filter bar.
- Display-settings popover: density (row height), font size, pretty JSON,
expand-by-default, body line-clamp.
- Download with a filter modal; copy with a toast.
- Click-a-value popover (Filter for / out / Copy / Open page) wired to the
log query; click a log's level to filter by it.
Level navigation:
- Execution: per-level count + jump to next/prev with scroll-into-view.
- Global: server-wide per-level counts (visible even when page 1 has none);
clicking a level chip filters at-or-above that level.
Pure helpers (utils/logs.ts, logValueFilter.ts) covered by 19 unit tests.
Closes kestra-io/kestra-ee#8305
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
* fix(design-system): address review findings in enriched-logs-v2
- logValueFilter: strip all existing comparators for a field before adding
the new one, preventing self-contradictory API queries (EQUALS + NOT_EQUALS
coexisting on the same field after toggling filter direction)
- TaskRunDetails: clear expandedGroups when props.filter changes (log
reindexing from 0 after filter shifts all group keys, leaving stale entries)
- TaskRunDetails: replace O(n²) array spreads in log-index accumulators
with push() calls
- Logs.vue / LogsWrapper.vue: use :tooltip prop on icon-only KsButtons
instead of wrapping in KsTooltip (DS convention)
- LogLine.vue: replace hardcoded px values with rem equivalents
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* test(design-system): add Storybook stories for enriched-logs new components
Cover all 4 new components introduced by the enriched-execution-logs-v2 PR:
JsonTree (6 stories), LogValueActions (4 stories, incl. click-to-open play test),
LogDisplaySettings (2 stories, incl. open play test), LogLevelNavigator (5 stories).
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* fix(executions): resolve type errors in enriched logs after develop merge
- Annotate LogLine messageStyle computed as CSSProperties so the
-webkit-box-orient value type-checks against BoxOrient
- Drop unused KsIconButton import in Logs.vue
- Drop unused setLevelRouteValue destructure in LogsWrapper.vue
(level routing is handled by selectLevel)
- Make level optional in formatLogsAsText's DownloadableLog type to
match its runtime guard and the missing-field test
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
* test(executions): align LogLine router-link story with click-a-value redesign
Metadata values now render via LogValueActions as popover triggers
(role="button"), not router-links. The only role="link" elements are
the execution and flow links built from the message, so assert 2 links
at indices 0 and 1 instead of 5 at indices 3 and 4.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
* test(executions): use double quotes in logs helpers spec (eslint quotes)
Addresses reviewdog eslint quotes warnings.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
* refactor(executions): rename reduce accumulator to avoid no-shadow in TaskRunDetails
The level-index reduce accumulator reused the outer computed's name
(currentTaskRunsLogIndicesByLevel), tripping oxlint no-shadow. Rename
the local accumulator to indicesByLevel.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
* refactor(executions): address PR review — move JsonTree to design system, add as const
- Move JsonTree.vue → KsJsonTree.vue in design-system Data components
- Register KsJsonTree globally in index.ts (import, components map, export, GlobalComponents)
- Update LogLine.vue to use KsJsonTree (globally registered, no local import)
- Move Storybook story to design-system tests/storybook/Data/KsJsonTree.stories.ts
- Delete old story from ui/tests
- Add as const to DENSITY_PADDING in useLogDisplay.ts
- Add as const to FILTERABLE_LOG_FIELDS in logValueFilter.ts; cast field key to keyof typeof
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>1 parent ed9d588 commit 5a4733c
23 files changed
Lines changed: 1962 additions & 342 deletions
File tree
- ui
- packages/design-system
- src
- components/Data
- tests/storybook/Data
- src
- components
- executions
- logs
- settings
- composables
- stores
- translations
- utils
- tests
- storybook/components/logs
- unit
- components/logs
- utils
Lines changed: 253 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 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 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 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 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 | + | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
| 234 | + | |
| 235 | + | |
| 236 | + | |
| 237 | + | |
| 238 | + | |
| 239 | + | |
| 240 | + | |
| 241 | + | |
| 242 | + | |
| 243 | + | |
| 244 | + | |
| 245 | + | |
| 246 | + | |
| 247 | + | |
| 248 | + | |
| 249 | + | |
| 250 | + | |
| 251 | + | |
| 252 | + | |
| 253 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
103 | 103 | | |
104 | 104 | | |
105 | 105 | | |
| 106 | + | |
106 | 107 | | |
107 | 108 | | |
108 | 109 | | |
| |||
295 | 296 | | |
296 | 297 | | |
297 | 298 | | |
| 299 | + | |
298 | 300 | | |
299 | 301 | | |
300 | 302 | | |
| |||
402 | 404 | | |
403 | 405 | | |
404 | 406 | | |
| 407 | + | |
405 | 408 | | |
406 | 409 | | |
407 | 410 | | |
| |||
528 | 531 | | |
529 | 532 | | |
530 | 533 | | |
| 534 | + | |
531 | 535 | | |
532 | 536 | | |
533 | 537 | | |
Lines changed: 108 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 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
0 commit comments