[Feature] Activate and restore effective Views for workflow instances and steps #7

Closed
opened 2026-07-28 18:59:03 +02:00 by zemion · 3 comments
Owner

Outcome

A workflow definition can associate a governed View with the whole instance or a specific step, allowing the UI to focus on the current job while preserving an explicit escape and return path.

Acceptance criteria

  • Workflow definition revisions can reference a View id/revision and an optional step-local narrowing overlay.
  • Starting, resuming, and advancing an instance activates the effective View through the Core/Views contract; Workflow does not import Views internals.
  • Reopening an instance restores its current step and View context.
  • Users can intentionally leave focused mode and return from an open-work widget/notification without losing progress.
  • A workflow overlay may narrow but never broaden Policy ceilings, permissions, tenant scope, or resource access.
  • Missing, retired, or incompatible View revisions produce a clear recoverable state and use the documented fallback.
  • Module handoffs preserve workflow context and return routing without requiring domain-module imports.
  • Tests cover enter, step switch, leave, resume, stale View revision, and authorization changes during an active instance.

Dependencies

Depends on the Core View runtime contract, govoplan-views, and the Workflow instance runtime. Related user story: #3.

## Outcome A workflow definition can associate a governed View with the whole instance or a specific step, allowing the UI to focus on the current job while preserving an explicit escape and return path. ## Acceptance criteria - Workflow definition revisions can reference a View id/revision and an optional step-local narrowing overlay. - Starting, resuming, and advancing an instance activates the effective View through the Core/Views contract; Workflow does not import Views internals. - Reopening an instance restores its current step and View context. - Users can intentionally leave focused mode and return from an open-work widget/notification without losing progress. - A workflow overlay may narrow but never broaden Policy ceilings, permissions, tenant scope, or resource access. - Missing, retired, or incompatible View revisions produce a clear recoverable state and use the documented fallback. - Module handoffs preserve workflow context and return routing without requiring domain-module imports. - Tests cover enter, step switch, leave, resume, stale View revision, and authorization changes during an active instance. ## Dependencies Depends on the Core View runtime contract, `govoplan-views`, and the Workflow instance runtime. Related user story: #3.
Author
Owner

Codex State: note

Summary

  • Workflow now declares Views as an optional dependency and consumes the versioned views.resolver contract/capability without importing the Views implementation.
  • Workflow instance and step activation, pinned revision storage, leave/resume behavior, and stale-context recovery are not implemented and this issue remains open.

Changed Files

  • govoplan-workflow@b015569

Verification

  • govoplan-workflow: 13 tests passed

Next / Blocked

  • Add activation once the workflow instance runtime owns resumable instance/step context.
## Codex State: note ### Summary - Workflow now declares Views as an optional dependency and consumes the versioned views.resolver contract/capability without importing the Views implementation. - Workflow instance and step activation, pinned revision storage, leave/resume behavior, and stale-context recovery are not implemented and this issue remains open. ### Changed Files - `govoplan-workflow@b015569` ### Verification - `govoplan-workflow: 13 tests passed` ### Next / Blocked - Add activation once the workflow instance runtime owns resumable instance/step context.
Author
Owner

Codex State: progress

Summary

  • Workflow revisions can pin an exact View revision and step nodes can request a narrowing surface overlay.
  • Views resolves Workflow context through a Core capability, applies administrator-required Views as a ceiling, retains protected escape surfaces, and falls back with diagnostics for stale pins.
  • Opening a run applies the temporary View; closing restores the ordinary effective View. Notification and dashboard links reopen the exact definition/run and restore current-step context.
  • Added the workflow.open-work dashboard widget and workflow.widget.open-work View surface.

Verification

  • python -m unittest tests.test_views in govoplan-views (17 passed)
  • Core full linked-module WebUI build and bundle-budget check passed.

Next / Blocked

  • Add focused authorization-change regression coverage during a live instance before closing the issue.
## Codex State: progress ### Summary - Workflow revisions can pin an exact View revision and step nodes can request a narrowing surface overlay. - Views resolves Workflow context through a Core capability, applies administrator-required Views as a ceiling, retains protected escape surfaces, and falls back with diagnostics for stale pins. - Opening a run applies the temporary View; closing restores the ordinary effective View. Notification and dashboard links reopen the exact definition/run and restore current-step context. - Added the `workflow.open-work` dashboard widget and `workflow.widget.open-work` View surface. ### Verification - `python -m unittest tests.test_views` in `govoplan-views` (17 passed) - Core full linked-module WebUI build and bundle-budget check passed. ### Next / Blocked - Add focused authorization-change regression coverage during a live instance before closing the issue.
Author
Owner

Codex State: done

Summary

  • Implemented immutable workflow View revision pins, instance and step-local surface narrowing, and Core/Views resolution without importing Views internals.
  • Added focused-mode enter/restore/leave behavior, exact notification and dashboard-widget return links, protected escape surfaces, and recoverable stale/missing revision fallback diagnostics.
  • Added tests for ceiling enforcement, pinned revisions, step overlays, stale revisions, and authorization changes while an instance is active.

Changed Files

  • src/govoplan_workflow/backend/instance_service.py
  • webui/src/features/workflow/WorkflowPage.tsx
  • webui/src/features/workflow/WorkflowOpenWorkWidget.tsx

Verification

  • 26 focused Workflow tests passed, including the full migration chain
  • 29 module manifests load and the linked Core WebUI production build passes

Next / Blocked

  • Changes are complete locally and will become available with the next coordinated push/release.
## Codex State: done ### Summary - Implemented immutable workflow View revision pins, instance and step-local surface narrowing, and Core/Views resolution without importing Views internals. - Added focused-mode enter/restore/leave behavior, exact notification and dashboard-widget return links, protected escape surfaces, and recoverable stale/missing revision fallback diagnostics. - Added tests for ceiling enforcement, pinned revisions, step overlays, stale revisions, and authorization changes while an instance is active. ### Changed Files - `src/govoplan_workflow/backend/instance_service.py` - `webui/src/features/workflow/WorkflowPage.tsx` - `webui/src/features/workflow/WorkflowOpenWorkWidget.tsx` ### Verification - `26 focused Workflow tests passed, including the full migration chain` - `29 module manifests load and the linked Core WebUI production build passes` ### Next / Blocked - Changes are complete locally and will become available with the next coordinated push/release.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: GovOPlaN/govoplan-workflow#7