Repository navigation
fix(workflows): pin presets to the selected workflow revision - #1064
Conversation
dovvnloading
left a comment
There was a problem hiding this comment.
Review of all three changed files at d428fd6 against #1033: the detail metadata follows the selected document revision; the form pins workflow ID and revision, rejects mismatched responses, invalidates the preview on explicit selection changes, and saves the reviewed request unchanged. The three new regression cases cover the issue acceptance criteria, refresh stability, and failure without fallback. No blocking code findings.
CI run 45604878904 succeeded: the frontend log confirms all four WorkflowPresetsPanel tests and 4,295 total tests passed; Python/compile/performance checks, dependency scans, POSIX checks, and packaging checks also passed. The normal PR workflow deliberately skips Playwright boot-smoke. Local checkout is still blocked by GitHub DNS resolution; manual app, theme, and keyboard verification have not been performed, and the original manual validation checklist remains outstanding. Under the owner's explicit request to process and merge a draft, the targeted passing component regression tests and green PR checks are the basis for proceeding; this is not a claim of completed manual browser validation. Comment review rather than self-approval.
Summary
Fixes #1033. Saving a preset from a historical workflow detail now opens the form with that exact immutable workflow revision, instead of silently substituting the library's newest revision. The detail header displays the selected revision's version number and saved date.
What Changed
Why
The backend already stores immutable revisions and accepts a workflow ID plus revision. This is a frontend selection/metadata bug, not a storage or execution-contract change. Pinning the form also prevents a newly published revision from changing what the user is about to schedule. No approval, execution or CI checks are bypassed.
Validation
python -m compileall -q .passes (run from the repo root - matches CI)python -m pytest -qpasses (run from the repo root - matches CI)cd web_ui && npm run checkpasses (matches CI)Local full checkout is blocked:
git ls-remote https://github.com/dovvnloading/Graphlink.git HEADfails DNS resolution in the execution environment. Local Node is 22 rather than the repository's Node 24. The committed component tests and full CI checks have not run locally. Draft pending CI and manual verification.Focused test in a configured checkout:
npm --prefix web_ui run test -- src/app/chrome/WorkflowPresetsPanel.test.tsx npm --prefix web_ui run checkManual verification: create two versions with different inputs/operations. Open version 1 in Version history; confirm the detail date and version match v1. Select More → Save as a preset…, confirm the picker and input fields show v1, review, and inspect the saved preset's pinned revision. Explicitly select v2 and verify the prior preview is cleared. A New preset from the preset list should default to v2. Check keyboard operation and both themes.
UI Notes
Existing design-system components/styles are unchanged; the displayed version/date and picker options change. Browser screenshots and theme/keyboard verification are pending.
Additional Context
Only the selected historical revision and current latest choices are offered in the preset picker; another historical revision can be chosen in Version history before opening the form. No dependency, schema, backend, CSS, or CI changes. Do not merge until required checks and manual validation pass.