Skip to content

Job page: view the realized workflow JSON - #131

Merged
dkackman merged 2 commits into
developfrom
ui/job-page-realized-json
Sep 13, 2026
Merged

Job page: view the realized workflow JSON#131
dkackman merged 2 commits into
developfrom
ui/job-page-realized-json

Conversation

@dkackman

Copy link
Copy Markdown
Owner

Summary

A curious reader of a job page could not see the JSON the run actually executed. The page already fetched it - getJobWorkflow returns the realized definition for the flow graph - and the API's realized flag was dropped on the floor. This adds, to the Workflow section above the flow graph:

  • a realized / as submitted mono chip naming which copy it is, with tooltips spelling out the difference (the realized copy the run itself wrote, every mutable input pinned; vs the definition as submitted, when the job predates run tracking or its run directory is gone)
  • a show JSON / hide JSON bare toggle - collapsed by default, mounted only while open - rendering the definition pretty-printed in a readonly Monaco editor, the same affordance the workflow page has in its footer

No server changes: GET /api/jobs/{id}/workflow already carried everything.

Test plan

  • Two new unit tests fail-then-pass: the toggle reveals the JSON the page fetched, and the label renders both ways (JobPage.test.ts, with a JsonEditorStub.svelte so tests never boot Monaco in jsdom)
  • npm run check / npm run lint / npm test clean (218/218)
  • npm run build - dist rebuilt
  • e2e job-page spec passes against the fresh bundle (no spec opens a real job detail, so no spec changes needed)

🤖 Generated with Claude Code

dkackman and others added 2 commits September 13, 2026 17:56
The job page already fetched the workflow a job ran for the flow graph -
that response is the realized copy when the run wrote one, and carried a
`realized` flag the UI dropped. The Workflow section now names which copy
it is (realized / as submitted) and offers a show/hide JSON toggle that
renders the definition in a readonly editor, mounted only while open.
Tests stub JsonEditor so the suite never boots Monaco in jsdom.

Co-Authored-By: Claude <noreply@anthropic.com>
Monaco's default is no wrap, so a long prompt string in a JSON view
forced a horizontal scroll. wordWrap: 'on' wraps at the container width
for every view that uses the editor - the job page's realized JSON, the
workflow page's definition, and the editable split views alike.

Co-Authored-By: Claude <noreply@anthropic.com>
@dkackman
dkackman merged commit a39499b into develop Sep 13, 2026
5 of 6 checks passed
@dkackman
dkackman deleted the ui/job-page-realized-json branch September 13, 2026 23:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant