chore(cleanup): retire orphan trees + dashboard widget chain#853
Merged
Conversation
Drops three webpack entries (jobQueueWidget/recentCallsWidget/sourceSyncWidget), their src/*.js bootstraps, src/views/widgets/*.vue components, and the matching PHP IWidget classes under lib/Dashboard/. Why these are dead at runtime: appinfo/info.xml has NO <dashboard> declaration block, and lib/AppInfo/Application.php's register() never calls registerWidget() or new IconAddon(), so NC never instantiates the IWidget classes and the webpack-built chunks never get loaded by the NC dashboard. The user-facing dashboard already comes from the manifest-driven CnDashboardPage (manifest.json Dashboard page, type=dashboard). Time-series widgets for that page are blocked on the OR GraphQL groupBy primitive (opsx-driven follow-up) and will wire via the manifest, not this widget chain. Net cleanup: 9 files removed, 3 webpack entries dropped.
…vigation)
The chain-C src/ audit identified `src/modals/Modals.vue` as a barrel-import
that webpack built into the bundle but no live entry point ever loaded — it
kept 47 modal files, the entire `src/entities/` tree, all of `src/sidebars/`,
both `src/navigation/` shells, `src/vue/`, `src/dialogs/`, four 0-byte
placeholder components, and several services alive at build time while
being completely unreachable at runtime.
Cascading deletes (everything below was orphan-rooted at Modals.vue):
src/entities/ (64 files, ~2,000 LoC)
— Duplicates OR schemas. useObjectStore + OR's
/api/objects/openconnector/{schema}/* is the canonical path now.
src/sidebars/ (7 files, ~3,050 LoC)
— Replaced by CnLogsPage's built-in filters + CnIndexPage facet
sidebar (enabled by manifest in #826).
src/navigation/MainMenu.vue + Configuration.vue
— Replaced by CnAppRoot + AppSettings manifest page (type: settings).
src/vue/components/JobLogIndex.vue
— Replaced by the JobLogs manifest page (type: logs).
src/dialogs/Dialogs.vue
— Orphan placeholder.
src/components/{Create,Edit}{Endpoint,Webhook}Dialog.vue
— Four 0-byte placeholder files (likely failed scaffolds).
src/components/{DateRangeCalendar,DateRangeInput,PaginationComponent}.vue
— Replaced by CnLogsPage's date filter + CnDataTable's pagination.
src/services/{getTheme,getValidISOstring,isValidJson,openLink}.js +
src/services/errors/{MissingParameterError,ValidationError,index}.js
— Only consumed by orphan modals.
`src/modals/Modals.vue` itself deleted (the root of the cascade).
30+ modal files under `src/modals/` deleted alongside it — every modal whose
UX is fully covered by an nc-vue primitive (CnFormDialog / CnDeleteDialog /
CnDetailPage / CnMassDeleteDialog).
Preserved as extraction reference (intentionally broken imports, eslint-
ignored, see src/modals/README.md):
modals/Mapping/EditMapping.vue (1537 LoC) — bespoke create/edit
modals/Synchronization/EditSynchronization.vue (1076 LoC) — bespoke create/edit
modals/Rule/EditRule.vue (1888 LoC) — visual rule-builder
modals/Endpoint/{AddEndpointRule,EditEndpoint}.vue
modals/Job/{RunJob,TestJob}.vue — action surfaces
modals/Synchronization/{RunSynchronization,TestSynchronization}.vue
modals/MappingTest/ (4 files) — test-mapping action + sub-widgets
modals/Mapping/mappingItem/ (2 files) — sub-record edit/delete
modals/TestSource/TestSource.vue — action surface
Net: 126 files deleted, 1 file (eslint.config.js) edited to ignore the
preserved modals dir, 1 file (src/modals/README.md) added documenting the
extraction plan. ~14,000 LoC removed.
Wire-up untouched — main.js / App.vue / registry.js / manifest.json /
store/store.js still resolve cleanly because none of these deleted trees
were imported by anything in the live entry tree.
After the orphan-tree sweep, the only consumers of the per-app pinia stores
are App.vue (useSettingsStore) and views/Import/ImportIndex.vue
(importExportStore.importFiles). Trim the registry to match.
src/store/modules/{navigation,search}.{js,ts} + their *.spec.{js,ts}
— deleted. The dispatch-modal-by-name state machine
(navigationStore.modal === 'editX') was a v1 pattern fully replaced
by CnIndexPage's #form-dialog / #delete-dialog slots. The search
store hit `/api/search` from a sidebar that no longer exists.
src/store/store.js
— drop useNavigationStore / useSearchStore imports + the
navigationStore / searchStore exports. Updated the header comment
to record the chain-E sweep.
src/store/modules/importExport.js
— drop the dead `importFile` (singular) action and its broken
`import { sourceStore, endpointStore, jobStore, mappingStore,
synchronizationStore, ruleStore } from store.js` — those per-schema
stores were deleted in chain-C. The live `importFiles` (plural,
called by ImportIndex.vue) + `exportFile` are kept untouched.
Net: 4 files deleted, 2 files trimmed, ~420 LoC removed.
…ns' into chore/cleanup-sweep
…ns' into chore/cleanup-sweep
… Import (#829) * chore(import): drop broken custom Import flow; rely on per-index Mass Import The custom `/import` page lived as a multi-file YAML/JSON drag-and-drop shell that POSTed to `/index.php/apps/openconnector/api/import` — but **that backend endpoint was already deleted in the chain-C OR-cutover** (see appinfo/routes.php comment "Import/Export routes deleted in chain-C OR-cutover. OR provides POST /api/registers/{id}/import and POST /api/configurations/{id}/import"). The Vue page was making a request to a non-existent route on every Import click — broken at runtime. Replacement path: every CnIndexPage in the manifest already exposes a Mass Import action in its Actions menu (`showMassImport: true` by default), wiring CnMassImportDialog against OR's per-schema endpoints. That covers the use case for the 10 first-class concepts (Sources, Endpoints, Consumers, Webhooks, Jobs, Mappings, Rules, Synchronizations, SynchronizationContracts, CloudEvents) without an openconnector-specific multi-file dispatcher. Drops: src/manifest.json — Import menu item (settings section, order 10) — Import page entry (custom, /import, ImportIndex) src/views/Import/ImportIndex.vue (254 LoC) — The custom upload UI. src/composables/UseFileSelection.js (98 LoC) — Drag-drop file-picker helper; ImportIndex was its only consumer. src/store/modules/importExport.js (76 LoC) + store.js export — Wrapped the dead /api/import POST; ImportIndex was its only consumer. src/registry.js — `ImportIndex` registration; the registry is now empty (next entries will be v2 widget slots, not custom pages — see updated comment). lib/Controller/UiController.php::import() appinfo/routes.php `ui#import` route — The PHP SPA shell action for /import; serves nothing meaningful now. Net: 3 source files deleted (~430 LoC), 5 files trimmed, 1 PHP route + 1 PHP controller action removed. Build still green (6.48 MiB main bundle, slightly smaller). If a future workflow needs the multi-file batched-import dispatcher, the right home is a fleet-wide `CnBatchImportWizard` in @conduction/nextcloud-vue that targets the same OR per-schema endpoints — not an openconnector- specific resurrection. * feat(manifest): flip to v2 schema URL — Tier 4 on i18n branch Two-line edit to bring feature/i18n-complete-translations to manifest v2: - $schema URL: app-manifest.schema.json → app-manifest-v2.schema.json - version: 1.0.0 → 2.0.0 Pre-flip Ajv check confirmed the manifest already validates against v2 schema 2.7.0 with zero errors — the page-level shapes were already v2-compatible, just the schema header was lagging. No page content changes needed; downstream PRs (#823 issue-814 bootstrap, #826 polish, #827 cleanup, #828 menu-trim, #829 drop-import, #830 action-rows, #831 KPI tiles, #838 charts) continue to apply on top of this v2 base. State on this branch is now Tier 4: - schema URL ✓ v2 - version ✓ 2.0.0 - nc-vue pin ✓ ^1.0.0-beta.67 - customs: 1 (Import, justified by _note — "Multi-step file-upload + dry-run preview UX exceeds nc-vue v2 form/wizard capability; revisit after CnWizardPage ships"). Tier 4 permits justified customs. - The 3 src/views/widgets/*.vue files are NC Dashboard widget entry points (separate webpack chunks, registered via OCA.Dashboard.register), NOT manifest wrappers — stay.
Contributor
Quality Report — ConductionNL/openconnector @
|
| Check | PHP | Vue | Security | License | Tests |
|---|---|---|---|---|---|
| lint | ✅ | ||||
| phpcs | ❌ | ||||
| phpmd | ✅ | ||||
| psalm | ✅ | ||||
| phpstan | ✅ | ||||
| phpmetrics | ✅ | ||||
| eslint | ✅ | ||||
| stylelint | ✅ | ||||
| composer | ✅ | ✅ 148/148 | |||
| npm | ✅ | ✅ 674/674 | |||
| PHPUnit | ⏭️ | ||||
| Newman | ⏭️ | ||||
| Playwright | ✅ |
Quality workflow — 2026-05-22 05:22 UTC
Download the full PDF report from the workflow artifacts.
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.
Reopening after i18n trunk was merged into development (the original PR auto-closed when its base branch was deleted). This PR retargets to development directly.
All commits from this branch that are not yet on development: see Files Changed for the consolidated diff.