Implement module registry for better seperation
Los mantenedores suelen responder en 3 días
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 5/5
- Tiempo estimado
- Más de una semana
- Aptitud para principiantes
- 35/100
- Tipo de issue
- Nueva funcionalidad
- Claridad
- Bien especificado
- Estado de actividad
- Activo
- Stack tecnológico
- eslint, typescript
- Área
- backend, developer-experience, frontend
Línea de trabajo
Start by reading the module setup in src/lib/modules/types.ts and src/lib/modules/index.ts, then trace the existing navigation and request handling through nav-items.ts, +layout.svelte, NavigationProgress, +layout.server.ts, and hooks.server.ts. Check how storage and Trino configuration and handleStorageConnection are currently loaded. Done means enabled modules alone initialize and handle their routes, disabled module routes return 404, and the specified unit and E2E cases pass.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Goal: Every module can be switched on and off independently with a feature flag
- Module contract. Add src/lib/modules/types.ts defining a CockpitModule: id, routePrefix, enabled, navigation entry, page title, optional init() and optional server handle. The registry lives in src/lib/modules/index.ts and is a static list.
- Move storage and Trino onto it.
- The sidebar (nav-items.ts), page titles (+layout.svelte), NavigationProgress and +layout.server.ts all read from the registry.
- hooks.server.ts returns 404 for routes of disabled modules and only runs a module's handle on its own routes. handleStorageConnection moves into the storage module.
- init runs init() only for enabled modules.
- Validate config only for enabled modules. The storage and Trino configs are no longer imported unconditionally. They're parsed in their module's init(), so an invalid variable stops the server only when that module is enabled.
- New STACKABLE_COCKPIT_TRINO_ENABLED flag
- Boundaries. An ESLint rule (import/no-restricted-paths) stops modules importing each other.
Tests
- Unit tests for the registry and hook logic.
- E2E: with a module disabled, pages and API return 404, it's missing from the sidebar, and the server starts even with invalid config for it. With it enabled, the existing flows still work.
Result: a new module becomes one module.ts entry plus its own folders. The central files only change for shared concerns.
- Lenguaje dominante
- TypeScript
- Estrellas
- 1
- Forks
- 0
- Merge medio
- 3 d 12 h
- PR fusionados (30 d)
- 31
Preparar el entorno
Este proyecto no incluye contenedor de desarrollo, Dockerfile ni guía de contribución, así que la configuración corre por tu cuenta: empieza por su README y consulta nuestra guía para la primera contribución para los pasos generales.
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de stackabletech/cockpit
-
Uploads greater then 6MiB failAbierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 62/100
stackabletech/cockpit#385 ·
Los mantenedores suelen responder en 3 días
-
EPIC: Data CatalogAbierto
Dificultad 5/5 Más de una semana Aptitud para principiantes 15/100
stackabletech/cockpit#441 ·
Los mantenedores suelen responder en 3 días
-
Admin configured S3 connectionsAbierto
Dificultad 5/5 Más de una semana Aptitud para principiantes 20/100
stackabletech/cockpit#439 ·
Los mantenedores suelen responder en 3 días
-
Update to sveltekit-superforms 3Abierto
Dificultad 3/5 1-2 días Aptitud para principiantes 42/100
stackabletech/cockpit#428 ·
Los mantenedores suelen responder en 3 días
-
Update to eslint 10Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 45/100
stackabletech/cockpit#427 ·
Los mantenedores suelen responder en 3 días
Todos los issues de stackabletech/cockpit
Issues similares
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
Azure/azure-functions-nodejs-extensions#180 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 67/100
Los mantenedores suelen responder en 2 días
-
iso-bmff: add IsoBoxReadView.readUint64 and IsoBoxWriteView.writeUint64 for exact 64-bit fieldsAbierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
streaming-video-technology-alliance/common-media-library#611 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
prime-radiant-inc/evener#5901 ·
Los mantenedores suelen responder en 1 día
-
area:frontend kind:bug priority:p3 ready
Dificultad 2/5 1-3 horas Aptitud para principiantes 88/100
Los mantenedores suelen responder en 1 día