Skip to content

fix(workflows): follow Review run notifications from any library subview - #1074

Draft
dovvnloading wants to merge 1 commit into
mainfrom
agent/review-run-notification
Draft

dovvnloading wants to merge 1 commit into
mainfrom
agent/review-run-notification

Conversation

@dovvnloading

Copy link
Copy Markdown
Owner

Summary

Fixes #1038. A Review run notification now reliably navigates the already-open workflow library to the notification's exact workspace and run, even when the JSON launcher or a preset form is open. It immediately clears stale workspace data, resets the Runs subview, and distinguishes a still-loading target from a run that is no longer available.

What Changed

  • Treat notification navigation as a new navigation generation, even for the same workspace/run. Clear selected preset launch requests and cached workspace receipts/presets; reload immediately and reject old polling results and stale run-start navigation callbacks.
  • Reset the custom JSON launcher on notification navigation; prioritize the selected run; focus the selected-run heading. The selected view explicitly tells users that unsaved run/preset forms are closed without saving their drafts. Normal workspace selectors do not remount the Runs panel.
  • Show a recoverable unavailable state when the refreshed run list no longer contains the target.
  • Keep the existing explicit approval actions and endpoints unchanged. Following a notification is not approval, execution, or draft submission.
  • Add seven component regressions through the actual notification and library components: JSON launcher, preset form, another run, cross-workspace selection with an ID collision, late prior-workspace response, missing target, and opening the closed library. Extend the existing real-backend Playwright approval scenario to follow the notification from an unsaved JSON launcher and confirm keyboard focus and explicit approval remain required.

Why

The existing overlay intentionally does not remount when opened twice. The Runs panel's local custom-launcher state previously took precedence over the selected run, and a notification-driven workspace change retained the previous workspace's cached data. This fixes navigation without changing the backend or weakening approval semantics.

Validation

  • Source and API contracts reviewed; branch comparison confirms exactly one commit and the four intended files, with no dependency, generated-contract, CSS, backend or CI changes.
  • App launches
  • Relevant workflow was exercised manually
  • python -m compileall -q . passes (run from repo root)
  • python -m pytest -q passes (run from repo root)
  • cd web_ui && npm run check passes

Local checkout is blocked: git ls-remote https://github.com/dovvnloading/Graphlink.git HEAD fails with "Could not resolve host: github.com". Component and browser regression tests have been written, not executed locally. The installed local Node version is 22, not the repo's Node 24. Run in a configured checkout:

npm --prefix web_ui run test -- src/app/chrome/WorkflowApprovalNavigation.test.tsx src/app/chrome/WorkflowRunsPanel.test.tsx src/app/chrome/WorkflowPresetsPanel.test.tsx
npm --prefix web_ui run check
npm --prefix web_ui run test:e2e -- e2e/workflow-operator.spec.ts

UI Notes

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

Existing components and styling are reused. Manually verify in both themes, including keyboard operation, from a JSON launcher, preset form, another run, and another workspace. Browser coverage presently extends the real-backend JSON-launcher scenario; the remaining cases are component tests. Screenshots and actual browser execution remain pending.

Additional Context

This deliberately discards an unsubmitted run/preset form when a user chooses Review run, rather than retaining an invisible draft or automatically submitting it; the selected-run view explains that behavior. A run the user explicitly submitted before following a notification may still complete normally, but its old navigation callback cannot supersede the selected notification. Draft pending full CI and browser verification; do not merge until those pass.

@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.

Merge-readiness review — HOLD (not yet complete).

Reviewed all four changed files against #1038 and inspected CI run #2355 (45608731538). All four executed CI jobs succeeded. The frontend log confirms 4,314/4,314 tests passed across 196 files, including all seven new WorkflowApprovalNavigation cases and existing Runs/Presets panel tests. The navigation generation, immediate cache invalidation, panel reset and stale callback guards look consistent with the intended fix; explicit approval remains a separate user action. No blocking implementation defect identified by static review.

Remaining acceptance/validation gates:

  • Playwright boot-smoke was SKIPPED, not passed. .github/workflows/ci.yml runs it on schedule or manual dispatch with run_browser_tests: true, not on PR events. Dispatch CI against agent/review-run-notification and confirm the new workflow-operator scenario passes for this head. A green regular PR run is insufficient for the PR's stated browser gate.
  • #1038 requests component + Playwright coverage for notification navigation from the JSON launcher, preset form, another run, another workspace and an expired/missing target. The new Playwright case covers only the JSON launcher; the remaining cases are component-only. Add the remaining browser coverage or explicitly agree on a narrower acceptance scope. A delayed already-submitted launch callback regression would also be valuable.
  • Record actual browser/manual verification and update the validation checklist before marking ready. The current PR explicitly says not to merge until CI and browser verification pass.

Leaving this draft open and unmerged rather than treating skipped checks as passing. Local checkout is unavailable (GitHub DNS lookup fails), and the connected Actions interface does not expose manual workflow dispatch.

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): Review run notification is ignored while Run from JSON is open

1 participant