Self-hosted, Self-Improving, Federated Everything App — dev management, agent orchestration, persistent mind, digital twin, second brain, and creative pipeline from a single dashboard over Tailscale to port the user into the OS
JavaScript ai-agentsdashboarddeveloper-toolsdigital-twinquantified-selfsecond-brainself-hostedtailscale
refactor(dashboard): remove unreferenced WIDTH_CLASS export (#5199)
[._.]/ Adam Eivy138dfbe125d9
diff --git a/client/src/components/dashboard/widgetRegistry.jsx b/client/src/components/dashboard/widgetRegistry.jsxindex 430d55f709..4bb14463dd 100644--- a/client/src/components/dashboard/widgetRegistry.jsx+++ b/client/src/components/dashboard/widgetRegistry.jsx@@ -89,13 +89,6 @@ export const FALLBACK_LAYOUT = Object.freeze({widgets: ['apps', 'cos', 'upcoming-tasks', 'system-health'],});-export const WIDTH_CLASS = {- full: 'col-span-12',- half: 'col-span-12 md:col-span-6',- third: 'col-span-12 md:col-span-6 lg:col-span-4',- quarter: 'col-span-12 sm:col-span-6 lg:col-span-3',-};-// Width keyword → 12-column grid units. Used when synthesizing a default// grid for a layout that hasn't been positionally edited yet.export const WIDTH_TO_COLS = {diff --git a/client/src/components/dashboard/widgetRegistry.test.jsx b/client/src/components/dashboard/widgetRegistry.test.jsxnew file mode 100644index 0000000000..5eb4cbb0c1--- /dev/null+++ b/client/src/components/dashboard/widgetRegistry.test.jsx@@ -0,0 +1,42 @@+import { describe, it, expect } from 'vitest';+import * as widgetRegistry from './widgetRegistry.jsx';++describe('widgetRegistry', () => {+ it('exports WIDGETS and WIDGETS_BY_ID', () => {+ expect(Array.isArray(widgetRegistry.WIDGETS)).toBe(true);+ expect(widgetRegistry.WIDGETS.length).toBeGreaterThan(0);+ expect(widgetRegistry.WIDGETS_BY_ID).toBeDefined();++ for (const widget of widgetRegistry.WIDGETS) {+ expect(widget.id).toBeDefined();+ expect(widget.label).toBeDefined();+ expect(widget.Component).toBeDefined();+ expect(widget.width).toBeDefined();+ expect(widgetRegistry.WIDGETS_BY_ID[widget.id]).toBe(widget);+ }+ });++ it('exports FALLBACK_LAYOUT with expected shape', () => {+ expect(widgetRegistry.FALLBACK_LAYOUT).toEqual({+ id: '_fallback',+ name: 'Default (offline)',+ builtIn: true,+ widgets: ['apps', 'cos', 'upcoming-tasks', 'system-health'],+ });+ });++ it('exports grid conversion constants', () => {+ expect(widgetRegistry.WIDTH_TO_COLS).toEqual({+ full: 12,+ half: 6,+ third: 4,+ quarter: 3,+ });+ expect(widgetRegistry.GRID_COLS).toBe(12);+ expect(widgetRegistry.GRID_DEFAULT_H).toBe(4);+ });++ it('does not export deprecated WIDTH_CLASS', () => {+ expect(widgetRegistry.WIDTH_CLASS).toBeUndefined();+ });+});