Skip to content

fix: system task status showing stale failure + add auth providers settings tab#840

Merged
chubes4 merged 1 commit intomainfrom
fix/system-task-status-and-auth-providers-tab
Mar 17, 2026
Merged

fix: system task status showing stale failure + add auth providers settings tab#840
chubes4 merged 1 commit intomainfrom
fix/system-task-status-and-auth-providers-tab

Conversation

@chubes4
Copy link
Member

@chubes4 chubes4 commented Mar 17, 2026

Summary

  • Fix system task status display: SystemTask::completeJob() was overwriting engine_data with only the result array, losing the task_type field that TaskScheduler::schedule() originally stored. The get_last_runs() SQL query uses JSON_EXTRACT(engine_data, '$.task_type') to find matching jobs — so it could only find failed jobs (where failJob() re-added task_type) and completely missed all successful runs. Both completeJob() and failJob() now merge results into existing engine_data instead of overwriting.

  • Add Auth Providers tab to the Settings page — a single view to manage all registered auth providers with connection status, configuration, and connect/disconnect actions. Previously this was only accessible per-handler from the pipeline page.

Changes

Bug fix: SystemTask engine_data preservation

  • inc/Engine/AI/System/Tasks/SystemTask.phpcompleteJob() and failJob() now read existing engine_data via retrieve_engine_data() and merge the result/error data into it, preserving scheduler metadata (task_type, context, scheduled_at)

New: Auth Providers Settings Tab

  • inc/Api/Auth.php — New GET /datamachine/v1/auth/providers endpoint returning all registered providers with type, status, config fields, callback URL, and account details
  • inc/Core/Admin/Settings/assets/react/queries/authProviders.js — TanStack Query hooks (useAuthProviders, useSaveAuthConfig, useDisconnectAuth)
  • inc/Core/Admin/Settings/assets/react/components/tabs/AuthProvidersTab.jsx — Card-based UI with inline status badges, config forms, callback URL display, and disconnect actions
  • inc/Core/Admin/Settings/assets/react/SettingsApp.jsx — Register new tab
  • inc/Core/Admin/Settings/assets/css/settings-page.css — Full responsive styles for auth provider cards

…ttings tab

SystemTask::completeJob() was overwriting engine_data with only the result
array, losing the task_type metadata that TaskScheduler originally stored.
The get_last_runs() SQL query uses JSON_EXTRACT on task_type to find jobs,
so it only found failed jobs (where failJob() re-added task_type) and missed
all successful runs. Both completeJob() and failJob() now merge into existing
engine_data instead of overwriting.

Also adds a new Auth Providers tab to the Settings page — a single view to
see all registered auth providers with connection status, config fields,
and connect/disconnect actions. Includes REST endpoint GET /auth/providers,
TanStack Query hooks, and card-based React UI.
@chubes4 chubes4 merged commit de5a06a into main Mar 17, 2026
3 checks passed
@github-actions
Copy link

github-actions bot commented Mar 17, 2026

Homeboy Results — data-machine

Lint

⚡ Scope: changed files only

lint (changed files only)

Test

⚡ Scope: changed files only

test (changed files only)

Audit

⚡ Scope: changed files only

audit (changed files only)

Tooling versions
  • Homeboy CLI: homeboy 0.81.1+d2f1bc93
  • Extension: wordpress from https://github.com/Extra-Chill/homeboy-extensions
  • Extension revision: unknown
  • Action: Extra-Chill/homeboy-action@v1

Homeboy Action v1

@chubes4 chubes4 deleted the fix/system-task-status-and-auth-providers-tab branch March 17, 2026 12:58
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.

1 participant