Job page: view the realized workflow JSON - #131
Merged
Conversation
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
A curious reader of a job page could not see the JSON the run actually executed. The page already fetched it -
getJobWorkflowreturns the realized definition for the flow graph - and the API'srealizedflag was dropped on the floor. This adds, to the Workflow section above the flow graph:realized/as submittedmono 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)show JSON/hide JSONbare 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 footerNo server changes:
GET /api/jobs/{id}/workflowalready carried everything.Test plan
JobPage.test.ts, with aJsonEditorStub.svelteso tests never boot Monaco in jsdom)npm run check/npm run lint/npm testclean (218/218)npm run build- dist rebuilt🤖 Generated with Claude Code