You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add first-class operator controls for waiting-task follow-ups inside the unified DataOps task/workflow flow. This builds on the existing waiting task fields and follow-up-due reminder behavior from #50; it should not create a separate follow-up tool.
The operations manager must be able to open a waiting task from Operations Home, a task panel, or workflow detail and record the next real operational action:
mark a task as waiting with waitingFor, followUpAt, contact channel, and a short note;
record that a follow-up was sent without completing the task;
choose the next follow-up date after sending a follow-up;
record that a response was received and move the task back to active todo work;
resolve the wait and mark the task done only when normal proof/completion rules pass;
see follow-up/waiting history from both task and workflow context;
preserve follow-up history in audit/export data.
The implementation should keep waiting work visible as part of ordinary tasks and workflow bundles. A waiting task should remain active, should appear in follow-up-due surfaces when its follow-up date arrives, and should stop appearing as waiting/follow-up work only after the wait is explicitly resolved or the task is completed through the approved flow.
API coverage is required. The UI must not be the only place where follow-up semantics exist. Add authenticated work-engine action endpoints, or equivalent atomic task action routes, for mark-waiting, follow-up-sent, response-received/unblocked, and resolve-to-done. These actions must perform server-side validation and history/audit recording instead of relying on the browser to construct timestamped comment text as the durable record.
Acceptance Criteria
Waiting task actions are available from the task detail/panel and from workflow detail waiting/checklist context; Operations Home follow-up-due items open into the same action flow.
Marking a task waiting requires waitingFor, followUpAt, contact channel, and a short note; invalid or missing values return clear API/UI validation errors.
Recording follow-up sent requires a channel, note, and next follow-up date, keeps the task in waiting, updates the active followUpAt, and refreshes dashboard/workflow follow-up state.
Recording response received or unblocked moves the task out of active waiting/follow-up state into todo without losing the previous waiting/follow-up history.
Resolving a waiting task as done is possible only through an explicit resolve/complete action and still enforces required link, required file, required artifact, comment, external-status, and bundle-link proof gates.
Generic task completion controls cannot silently complete a waiting task without resolving the wait and writing history.
Task and workflow detail show a readable history of waiting started, follow-up sent, next follow-up date, response received/unblocked, resolved, reopened, and completed events with timestamp, actor when available, channel when relevant, and note.
Follow-up history is structured enough for export and audit: use durable audit events when practical, or an equivalent typed task-history structure with stable IDs/relationships. Existing free-text comments may remain visible, but they must not be the only machine-readable follow-up record.
Waiting/follow-up behavior works for standalone tasks and tasks linked to workflow bundles, including migrated or intake-created tasks when they already carry waiting metadata.
Portable export includes current waiting state and follow-up history/audit records with stable task/bundle/user relationships, validates successfully, and omits secrets, session data, signed URLs, credentials, and binary payloads.
Existing task, bundle, notification, export, and portal/work-engine tests still pass; new tests cover the follow-up action lifecycle and history/export behavior.
Tester captures screenshots for Operations Home follow-up due entry, task follow-up action controls, workflow waiting/history section, validation errors, and resolved/unblocked state.
Test Scenarios
Scenario: Operator records a follow-up sent
Given: a waiting task is due for follow-up and appears on Operations Home
When: the operator opens it, records follow-up sent with channel email, a short note, and next follow-up date 2026-07-02
Then: the task remains waiting, followUpAt becomes 2026-07-02, the old due reminder is no longer active, and history shows the sent follow-up event with timestamp, channel, note, actor if available, and next date.
Scenario: Response received returns work to active todo
Given: a task is waiting for a sponsor response and has prior follow-up history
When: the operator records response received with a note
Then: the task is no longer in waiting/follow-up lanes, appears as active todo work where appropriate, and task/workflow history still shows who/what it had been waiting for and the response event.
Scenario: Waiting task cannot be silently completed
Given: a waiting task has a required Luma link and no link saved
When: the operator tries to complete it through a generic checkbox or direct task status update
Then: the app/API blocks completion with a clear message; resolving as done succeeds only after the wait is resolved and the required proof is present.
Scenario: Workflow history shows follow-up lifecycle
Given: a workflow bundle has one task that was marked waiting, followed up twice, then unblocked
When: the operator opens workflow detail
Then: the waiting/history section shows the active waiting state when applicable, the done/history section preserves completed items, and the task history can be inspected without leaving workflow context.
Scenario: Export preserves follow-up audit data
Given: local test data includes standalone and bundled tasks with waiting started, follow-up sent, response received, and resolved/done history
When: portable export and validation run
Then: tasks.jsonl contains the current waiting fields where active, audit/history records export with stable task/bundle/user references, relationship validation passes, and no secrets or temporary signed URLs are present.
Scenario: Imported or intake-created waiting task uses the same controls
Given: a task created by migration or intake has status=waiting, waitingFor, and followUpAt
When: the operator opens it from the dashboard or workflow context
Then: the same follow-up sent, next date, response received, and resolve controls are available, and no source-specific follow-up UI is required.
Out of Scope
Actually sending email, Telegram, Slack, sponsor, guest, or publisher messages from DataOps. This issue records that the operator sent a follow-up elsewhere.
Building external integrations, OAuth setup, webhooks, or provider-specific message templates.
Replacing the whole task state model beyond changes needed for follow-up actions/history.
docs/operations-manager-platform-jtbd.md is the product source of truth, especially JTBD 4 and the reminder/task status model.
docs/v1-execution-state-schema.md and docs/v1-execution-data-safety.md define runtime-state, audit, and portable export expectations.
Affected Areas
work-engine/src/types.ts for any typed follow-up history/action or audit-event relationship additions.
work-engine/src/router.ts, task routes, and related DB helpers for authenticated atomic follow-up actions and validation.
work-engine/src/db/notifications.ts for reminder idempotency/resolution behavior if active follow-up dates or resolved waits change notification semantics.
work-engine/src/export/portable.ts and export/dry-run validation tests for follow-up history/audit preservation.
frontend/src/app.js, frontend/src/styles.css, and any work-engine public UI still used by the operator flow for task/workflow controls and history display.
Existing task, bundle, notification, export, dashboard, and Playwright tests.
Data Safety, Export, And Restore Implications
Follow-up notes may contain private operational context. Keep notes bounded, redact or reject detectable secrets where existing export safety supports it, and never store API keys, OAuth tokens, cookies, signed URLs, session data, or credentials as follow-up metadata.
Store structured metadata and references only. Do not store message binaries, raw email bodies, Telegram payloads, or external attachment contents in DynamoDB as part of follow-up history.
Portable exports must represent both active waiting state and historical follow-up events using stable application IDs and explicit relationships. Do not make exports depend on DynamoDB PK/SK values.
If new durable fields or event types are added, update export validation and dry-run import validation so unknown enums, invalid dates, missing task references, and bad user references fail clearly.
Production restore drills or destructive restore/import checks remain out of scope for agent verification unless a later issue explicitly authorizes them.
Verification Commands
Run from repo root:
npm --prefix work-engine test
npm --prefix work-engine run typecheck
npm --prefix work-engine run build
npm --prefix work-engine run test:e2e
npm --prefix work-engine run export:data -- .tmp/exports/follow-up-actions
npm --prefix work-engine run validate:export -- .tmp/exports/follow-up-actions
npm --prefix work-engine run dry-run:import -- .tmp/exports/follow-up-actions
git diff --check
If implementation changes the Python portal broker, protected portal route handling, or docs-app tests fixtures, also run:
Add operator follow-up actions and history controls
Status: pending
Tags:
enhancement,portal,work-engine,frontend,backend,testing,data,P0Depends on: #50
Blocks: None
Scope
Add first-class operator controls for waiting-task follow-ups inside the unified DataOps task/workflow flow. This builds on the existing waiting task fields and follow-up-due reminder behavior from #50; it should not create a separate follow-up tool.
The operations manager must be able to open a waiting task from Operations Home, a task panel, or workflow detail and record the next real operational action:
waitingFor,followUpAt, contact channel, and a short note;todowork;doneonly when normal proof/completion rules pass;The implementation should keep waiting work visible as part of ordinary tasks and workflow bundles. A waiting task should remain active, should appear in follow-up-due surfaces when its follow-up date arrives, and should stop appearing as waiting/follow-up work only after the wait is explicitly resolved or the task is completed through the approved flow.
API coverage is required. The UI must not be the only place where follow-up semantics exist. Add authenticated work-engine action endpoints, or equivalent atomic task action routes, for mark-waiting, follow-up-sent, response-received/unblocked, and resolve-to-done. These actions must perform server-side validation and history/audit recording instead of relying on the browser to construct timestamped comment text as the durable record.
Acceptance Criteria
waitingFor,followUpAt, contact channel, and a short note; invalid or missing values return clear API/UI validation errors.follow-up sentrequires a channel, note, and next follow-up date, keeps the task inwaiting, updates the activefollowUpAt, and refreshes dashboard/workflow follow-up state.response receivedorunblockedmoves the task out of active waiting/follow-up state intotodowithout losing the previous waiting/follow-up history.doneis possible only through an explicit resolve/complete action and still enforces required link, required file, required artifact, comment, external-status, and bundle-link proof gates.Test Scenarios
Scenario: Operator records a follow-up sent
Given: a waiting task is due for follow-up and appears on Operations Home
When: the operator opens it, records
follow-up sentwith channelemail, a short note, and next follow-up date2026-07-02Then: the task remains
waiting,followUpAtbecomes2026-07-02, the old due reminder is no longer active, and history shows the sent follow-up event with timestamp, channel, note, actor if available, and next date.Scenario: Response received returns work to active todo
Given: a task is waiting for a sponsor response and has prior follow-up history
When: the operator records
response receivedwith a noteThen: the task is no longer in waiting/follow-up lanes, appears as active todo work where appropriate, and task/workflow history still shows who/what it had been waiting for and the response event.
Scenario: Waiting task cannot be silently completed
Given: a waiting task has a required Luma link and no link saved
When: the operator tries to complete it through a generic checkbox or direct task status update
Then: the app/API blocks completion with a clear message; resolving as done succeeds only after the wait is resolved and the required proof is present.
Scenario: Workflow history shows follow-up lifecycle
Given: a workflow bundle has one task that was marked waiting, followed up twice, then unblocked
When: the operator opens workflow detail
Then: the waiting/history section shows the active waiting state when applicable, the done/history section preserves completed items, and the task history can be inspected without leaving workflow context.
Scenario: Export preserves follow-up audit data
Given: local test data includes standalone and bundled tasks with waiting started, follow-up sent, response received, and resolved/done history
When: portable export and validation run
Then:
tasks.jsonlcontains the current waiting fields where active, audit/history records export with stable task/bundle/user references, relationship validation passes, and no secrets or temporary signed URLs are present.Scenario: Imported or intake-created waiting task uses the same controls
Given: a task created by migration or intake has
status=waiting,waitingFor, andfollowUpAtWhen: the operator opens it from the dashboard or workflow context
Then: the same follow-up sent, next date, response received, and resolve controls are available, and no source-specific follow-up UI is required.
Out of Scope
../dtc-operations,../datatasks,../podcast-assistant, or any source repo outsidedataops.Dependencies
docs/operations-manager-platform-jtbd.mdis the product source of truth, especially JTBD 4 and the reminder/task status model.docs/v1-execution-state-schema.mdanddocs/v1-execution-data-safety.mddefine runtime-state, audit, and portable export expectations.Affected Areas
work-engine/src/types.tsfor any typed follow-up history/action or audit-event relationship additions.work-engine/src/router.ts, task routes, and related DB helpers for authenticated atomic follow-up actions and validation.work-engine/src/db/notifications.tsfor reminder idempotency/resolution behavior if active follow-up dates or resolved waits change notification semantics.work-engine/src/export/portable.tsand export/dry-run validation tests for follow-up history/audit preservation.frontend/src/app.js,frontend/src/styles.css, and any work-engine public UI still used by the operator flow for task/workflow controls and history display.Data Safety, Export, And Restore Implications
PK/SKvalues.Verification Commands
Run from repo root:
npm --prefix work-engine test npm --prefix work-engine run typecheck npm --prefix work-engine run build npm --prefix work-engine run test:e2e npm --prefix work-engine run export:data -- .tmp/exports/follow-up-actions npm --prefix work-engine run validate:export -- .tmp/exports/follow-up-actions npm --prefix work-engine run dry-run:import -- .tmp/exports/follow-up-actions git diff --checkIf implementation changes the Python portal broker, protected portal route handling, or docs-app tests fixtures, also run:
Tester must include screenshot evidence for the changed operator flows listed in the acceptance criteria.