Skip to content

fix(workflows): pin presets to the selected workflow revision - #1064

Merged
dovvnloading merged 2 commits into
mainfrom
agent/pin-historical-workflow-presets
Nov 25, 2026
Merged

dovvnloading merged 2 commits into
mainfrom
agent/pin-historical-workflow-presets

Conversation

@dovvnloading

Copy link
Copy Markdown
Owner

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

  • Pass workflow ID, revision ID, and version metadata from the selected library detail to the preset form.
  • Use a revision-aware workflow picker. A historical revision is a distinct choice from latest; explicitly switching resets the loaded document and review. A normal New preset starts with latest at the time the form opens.
  • Fetch and validate the exact pinned document. If loading fails or a different identity comes back, do not preview or fall back to latest.
  • Use the same pinned IDs and selected document's input definitions when building the preview request; save the reviewed request unchanged. A library refresh cannot silently repin an in-progress form.
  • Add three component regressions: library-to-preset historical selection, matching metadata, different input/step definitions, exact preview and save payloads and explicit switching; pin stability during a row refresh; failure to load the requested version without fallback. Keep the existing choice-override regression.

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

  • Source and backend revision contract inspected; committed diff checked against main (one commit, only three intended files).
  • App launches
  • Relevant workflow was exercised manually
  • python -m compileall -q . passes (run from the repo root - matches CI)
  • python -m pytest -q passes (run from the repo root - matches CI)
  • cd web_ui && npm run check passes (matches CI)

Local full checkout is blocked: git ls-remote https://github.com/dovvnloading/Graphlink.git HEAD fails 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 check

Manual 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

  • Screenshots included if the change is visual
  • No screenshots needed

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.

@dovvnloading
dovvnloading marked this pull request as ready for review November 25, 2026 11:50

@dovvnloading dovvnloading left a comment

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@dovvnloading
dovvnloading merged commit 60f7edf into main Nov 25, 2026
5 checks passed
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.

bug(workflows): Save as a preset from an older revision selects the latest revision instead

1 participant