cleanup(pipelines): remove unused CSS classes and dead React code#1175
Merged
cleanup(pipelines): remove unused CSS classes and dead React code#1175
Conversation
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)
Contributor
Homeboy Results —
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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-secondarydatamachine-flow-steps__listdatamachine-pipeline-flows,datamachine-pipeline-steps-sectiondatamachine-spacing--margin-bottom-16,datamachine-spacing--margin-bottom-24,datamachine-spacing--margin-top-12,datamachine-spacing--margin-top-24datamachine-status-badge--pending,datamachine-status-badge--processeddatamachine-step-card-ai-label,datamachine-step-card-tools-labeldatamachine-step-empty-contentdatamachine-table,datamachine-table--bordereddatamachine-text--description,datamachine-text--h4,datamachine-text--notepipelines-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/chatlibrary components:chat-tools.cssentirely (all classes unused)chat-messages.css— kept only.datamachine-chat-messagescontainerchat-input.css— kept only.datamachine-chat-inputcontainerchat-sidebar.css— removedchat-tools.css@importDuplicate consolidation:
.datamachine-handler-settings-display divselectors inpipelines-page.cssJavaScript Cleanup
hooks/useHandlersAPI.js— never imported anywhereservices/handlerService.js— never imported anywhereutils/constants.js:HANDLER_TYPESDEFAULT_PIPELINE_NAME,DEFAULT_FLOW_NAMECLASS_PREFIXSTATUS_COLORSCONFIRM_DELETE(orphaned modal type with noModalSwitchhandler)formatDateTimefromutils/formatters.jsgetFieldHelpTextfromutils/handlerSettings.jsparseUtcDateTimeinternal — only used byformatRelativeTime, no need to exportVerification
node --check