Skip to content

cleanup(pipelines): remove unused CSS classes and dead React code#1175

Merged
chubes4 merged 2 commits intomainfrom
cleanup-pipelines-unused-code
Apr 24, 2026
Merged

cleanup(pipelines): remove unused CSS classes and dead React code#1175
chubes4 merged 2 commits intomainfrom
cleanup-pipelines-unused-code

Conversation

@chubes4
Copy link
Copy Markdown
Member

@chubes4 chubes4 commented Apr 24, 2026

Summary

Removes ~778 lines of unused code from the pipelines page React architecture.

CSS Cleanup

pipelines-page.css — removed 18 unused utility/component classes:

  • datamachine-color--text-error, datamachine-color--text-secondary
  • datamachine-flow-steps__list
  • datamachine-pipeline-flows, datamachine-pipeline-steps-section
  • datamachine-spacing--margin-bottom-16, datamachine-spacing--margin-bottom-24, datamachine-spacing--margin-top-12, datamachine-spacing--margin-top-24
  • datamachine-status-badge--pending, datamachine-status-badge--processed
  • datamachine-step-card-ai-label, datamachine-step-card-tools-label
  • datamachine-step-empty-content
  • datamachine-table, datamachine-table--bordered
  • datamachine-text--description, datamachine-text--h4, datamachine-text--note

pipelines-modal.css — removed 40+ unused modal/component classes including dead file handler styles, unused form field wrappers, orphaned section headers, and stale modal utilities.

Chat CSS — since migrating to @extrachill/chat library components:

  • Deleted chat-tools.css entirely (all classes unused)
  • chat-messages.css — kept only .datamachine-chat-messages container
  • chat-input.css — kept only .datamachine-chat-input container
  • chat-sidebar.css — removed chat-tools.css @import

Duplicate consolidation:

  • Merged duplicate .datamachine-handler-settings-display div selectors in pipelines-page.css

JavaScript Cleanup

  • Deleted hooks/useHandlersAPI.js — never imported anywhere
  • Deleted services/handlerService.js — never imported anywhere
  • Removed unused constants from utils/constants.js:
    • HANDLER_TYPES
    • DEFAULT_PIPELINE_NAME, DEFAULT_FLOW_NAME
    • CLASS_PREFIX
    • STATUS_COLORS
    • CONFIRM_DELETE (orphaned modal type with no ModalSwitch handler)
  • Removed unused utility exports:
    • formatDateTime from utils/formatters.js
    • getFieldHelpText from utils/handlerSettings.js
  • Made parseUtcDateTime internal — only used by formatRelativeTime, no need to export

Verification

  • Confirmed zero references to all removed code across the React tree
  • Syntax-checked all modified JS files with node --check
  • No functional changes — purely deletion of dead code

homeboy-ci Bot added 2 commits April 24, 2026 00:53
Removes ~778 lines of unused code from the pipelines page React architecture:

CSS cleanup:
- pipelines-page.css: remove 18 unused utility/component classes
- pipelines-modal.css: remove 40+ unused modal/component classes
- chat-tools.css: delete entirely (all classes unused since @extrachill/chat migration)
- chat-messages.css: keep only .datamachine-chat-messages container
- chat-input.css: keep only .datamachine-chat-input container
- chat-sidebar.css: remove chat-tools.css import
- Consolidate duplicate .datamachine-handler-settings-display div selector

JS cleanup:
- Delete hooks/useHandlersAPI.js (never imported)
- Delete services/handlerService.js (never imported)
- Remove unused constants: HANDLER_TYPES, DEFAULT_PIPELINE_NAME,
  DEFAULT_FLOW_NAME, CLASS_PREFIX, STATUS_COLORS, CONFIRM_DELETE
- Remove unused utility exports: formatDateTime, getFieldHelpText
- Make parseUtcDateTime internal (only used by formatRelativeTime)
… and PHP

Second sweep after confirming first-pass removals were all truly dead:

CSS cleanup:
- Remove LoadingSpinner component and its CSS classes:
  datamachine-loading-spinner, datamachine-layout--flex-column,
  datamachine-layout--flex-center, datamachine-spacing--margin-top-16
- Remove unused button styles: button-link-delete, button-delete,
  button-link-configure (not used in React or PHP)
- Remove unused admin notice styles: datamachine-admin-notice,
  datamachine-admin-notice--dismissible
- Remove unused chat sidebar classes: datamachine-chat-sidebar__new,
  datamachine-chat-sidebar__processing

React cleanup:
- Delete components/shared/LoadingSpinner.jsx (never imported)
- Remove unused query hooks:
  - useUpdatePipelineTitle, useReorderPipelineSteps, useUpdateSystemPrompt
    from queries/pipelines.js
  - useUpdateUserMessage from queries/flows.js
  - useHandlerModels from queries/handlers.js
- Remove unused API functions from utils/api.js:
  - updateUserMessage (only consumed by deleted useUpdateUserMessage)
  - getProviders (never called)

PHP cleanup:
- Remove dead functions from PipelinesFilters.php:
  - datamachine_get_ai_providers_for_react (never called)
  - datamachine_get_ai_tools_for_react (never called)
@homeboy-ci
Copy link
Copy Markdown
Contributor

homeboy-ci Bot commented Apr 24, 2026

Homeboy Results — data-machine

Audit

⚡ Scope: changed files only

audit (changed files only)

  • Alignment score: 0.806
  • Outliers in current run: 44
  • Drift increased: no
  • Severity counts: info: 15, unknown: 44, warning: 44
  • Top actionable findings:
    1. inc/Api/Providers.php — missing_method — Missing method: check_permission
    2. inc/Engine/AI/Directives/DirectiveOutputValidator.php — missing_method — Missing method: get_outputs
    3. inc/Abilities/Flow/FlowHelpers.php — naming_mismatch — Helper-like name does not match convention suffix 'Ability': FlowHelpers
    4. inc/Abilities/FlowStep/FlowStepHelpers.php — naming_mismatch — Helper-like name does not match convention suffix 'Ability': FlowStepHelpers
    5. inc/Abilities/Job/JobHelpers.php — naming_mismatch — Helper-like name does not match convention suffix 'Ability': JobHelpers
    6. inc/Core/Admin/Pages/Pipelines/assets/react/queries/flows.js — high_item_count — File has 16 top-level items (threshold: 15)
    7. inc/Core/Admin/Pages/Pipelines/assets/react/utils/api.js — high_item_count — File has 42 top-level items (threshold: 15)
    8. inc/Abilities/Flow/CreateFlowAbility.php — intra_method_duplicate — Duplicated block in executeBulk — 6 identical lines at line 354 and line 385
    9. inc/Abilities/FlowStep/FlowStepHelpers.php — intra_method_duplicate — Duplicated block in updateUserMessage — 5 identical lines at line 524 and line 539
    10. inc/Api/Chat/Chat.php — intra_method_duplicate — Duplicated block in register_routes — 9 identical lines at line 131 and line 149
Audit findings (10 shown)
1. **inc/Api/Providers.php** — missing_method — Missing method: check_permission
2. **inc/Engine/AI/Directives/DirectiveOutputValidator.php** — missing_method — Missing method: get_outputs
3. **inc/Abilities/Flow/FlowHelpers.php** — naming_mismatch — Helper-like name does not match convention suffix 'Ability': FlowHelpers
4. **inc/Abilities/FlowStep/FlowStepHelpers.php** — naming_mismatch — Helper-like name does not match convention suffix 'Ability': FlowStepHelpers
5. **inc/Abilities/Job/JobHelpers.php** — naming_mismatch — Helper-like name does not match convention suffix 'Ability': JobHelpers
6. **inc/Core/Admin/Pages/Pipelines/assets/react/queries/flows.js** — high_item_count — File has 16 top-level items (threshold: 15)
7. **inc/Core/Admin/Pages/Pipelines/assets/react/utils/api.js** — high_item_count — File has 42 top-level items (threshold: 15)
8. **inc/Abilities/Flow/CreateFlowAbility.php** — intra_method_duplicate — Duplicated block in `executeBulk` — 6 identical lines at line 354 and line 385
9. **inc/Abilities/FlowStep/FlowStepHelpers.php** — intra_method_duplicate — Duplicated block in `updateUserMessage` — 5 identical lines at line 524 and line 539
10. **inc/Api/Chat/Chat.php** — intra_method_duplicate — Duplicated block in `register_routes` — 9 identical lines at line 131 and line 149
Tooling versions
  • Homeboy CLI: homeboy 0.89.1+d5b5705e
  • Extension: wordpress from https://github.com/Extra-Chill/homeboy-extensions
  • Extension revision: unknown
  • Action: Extra-Chill/homeboy-action@v2

Homeboy Action v1

@chubes4 chubes4 merged commit b751ead into main Apr 24, 2026
1 check passed
@chubes4 chubes4 deleted the cleanup-pipelines-unused-code branch April 24, 2026 02:03
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