mirror of
https://github.com/rcourtman/Pulse.git
synced 2026-09-11 22:12:23 +00:00
Wire Connections & Inventory nav to the unified table
settingsTabPath('infrastructure-operations') and the initial-tab resolver
still returned /settings/infrastructure/install from the pre-flip
workspace, so clicking the Settings nav dropped users on the install
detail page instead of the unified Connections table shipped in
00c6dc2dd. Point the tab path and canonical resolver at the bare
/settings/infrastructure, extend deriveTabFromPath to recognise that
prefix as the infrastructure-operations tab, and bring
frontend-primitives rule 13 into line with the already-flipped
agent-lifecycle rule 7 so both contracts name the bare
/settings/infrastructure as the canonical landing. Update the three
guardrail suites (settingsRouting, settingsNavigation.integration,
settingsArchitecture) that encode the tab->path map so they reflect the
new landing.
This commit is contained in:
@@ -412,9 +412,12 @@ work extends shared components instead of creating new local variants.
|
||||
13. Keep the settings-shell infrastructure landing path aligned with that same
|
||||
first-session story. `frontend-modern/src/components/Settings/settingsNavigationModel.ts`
|
||||
must treat `/settings` and the infrastructure settings tab as the canonical
|
||||
path to `/settings/infrastructure/install`, not to reporting/control, so
|
||||
the shell does not send first-time operators to the wrong infrastructure
|
||||
subview by default.
|
||||
path to the bare `/settings/infrastructure`, which renders the unified
|
||||
Connections table, not to a separate install subview or to reporting/
|
||||
control. The first-session story is owned by that table's own empty state
|
||||
and the `Add a system` entry point on it, not by a second landing route,
|
||||
so first-time operators and returning operators see one consistent
|
||||
infrastructure surface by default.
|
||||
14. Keep dashboard onboarding copy on the shared presentation owner in
|
||||
`frontend-modern/src/utils/dashboardEmptyStatePresentation.ts`. Both the
|
||||
infrastructure empty state and the dashboard route's no-resources state
|
||||
|
||||
@@ -518,7 +518,7 @@ describe('Settings architecture guardrails', () => {
|
||||
expect(settingsNavigationModelSource).toContain('export function resolveCanonicalSettingsPath');
|
||||
expect(settingsNavigationModelSource).toContain('export function isProxmoxSettingsPath');
|
||||
expect(settingsNavigationModelSource).toContain('export function settingsTabPath');
|
||||
expect(settingsNavigationModelSource).toContain('return INFRASTRUCTURE_INSTALL_PREFIX;');
|
||||
expect(settingsNavigationModelSource).toContain('return LEGACY_INFRASTRUCTURE_PREFIX;');
|
||||
expect(settingsNavigationModelSource).toContain('SELF_HOSTED_PRO_BILLING_PLAN_ROUTE');
|
||||
expect(settingsNavigationHookSource).toContain('deriveTabFromPath');
|
||||
expect(settingsNavigationHookSource).toContain('isProxmoxSettingsPath');
|
||||
|
||||
+1
-1
@@ -7,7 +7,7 @@ import { updateDisableLocalUpgradeMetricsSetting } from '@/stores/systemSettings
|
||||
|
||||
const canonicalTabPaths = {
|
||||
proxmox: '/settings/infrastructure/platforms/proxmox',
|
||||
'infrastructure-operations': '/settings/infrastructure/install',
|
||||
'infrastructure-operations': '/settings/infrastructure',
|
||||
'system-general': '/settings/system-general',
|
||||
'system-network': '/settings/system-network',
|
||||
'system-updates': '/settings/system-updates',
|
||||
|
||||
@@ -18,7 +18,7 @@ import { isFeatureLocked, isTabLocked } from '../settingsFeatureGates';
|
||||
|
||||
const canonicalTabPaths = {
|
||||
proxmox: '/settings/infrastructure/platforms/proxmox',
|
||||
'infrastructure-operations': '/settings/infrastructure/install',
|
||||
'infrastructure-operations': '/settings/infrastructure',
|
||||
'system-general': '/settings/system-general',
|
||||
'system-network': '/settings/system-network',
|
||||
'system-updates': '/settings/system-updates',
|
||||
@@ -65,19 +65,19 @@ describe('settingsNavigationModel', () => {
|
||||
});
|
||||
|
||||
it('resolves only canonical settings paths', () => {
|
||||
expect(resolveCanonicalSettingsPath('/settings')).toBe('/settings/infrastructure/install');
|
||||
expect(resolveCanonicalSettingsPath('/settings')).toBe('/settings/infrastructure');
|
||||
expect(resolveCanonicalSettingsPath('/settings/workloads')).toBe(
|
||||
'/settings/infrastructure/install',
|
||||
'/settings/infrastructure',
|
||||
);
|
||||
expect(resolveCanonicalSettingsPath('/settings/workloads/docker')).toBe(
|
||||
'/settings/infrastructure/install',
|
||||
'/settings/infrastructure',
|
||||
);
|
||||
expect(resolveCanonicalSettingsPath('/settings/support')).toBe('/settings/support/diagnostics');
|
||||
expect(resolveCanonicalSettingsPath('/settings/system-updates')).toBe(
|
||||
'/settings/system-updates',
|
||||
);
|
||||
expect(resolveCanonicalSettingsPath('/settings/infrastructure')).toBe(
|
||||
'/settings/infrastructure/install',
|
||||
'/settings/infrastructure',
|
||||
);
|
||||
expect(resolveCanonicalSettingsPath('/settings/infrastructure/pve')).toBe(
|
||||
'/settings/infrastructure/platforms/proxmox/pve',
|
||||
|
||||
@@ -219,6 +219,7 @@ export function deriveTabFromPath(path: string): SettingsTab {
|
||||
|
||||
if (canonicalPath === '/settings') return DEFAULT_SETTINGS_TAB;
|
||||
if (
|
||||
canonicalPath === LEGACY_INFRASTRUCTURE_PREFIX ||
|
||||
canonicalPath === INFRASTRUCTURE_INSTALL_PREFIX ||
|
||||
canonicalPath === PLATFORM_CONNECTIONS_PREFIX ||
|
||||
canonicalPath === INFRASTRUCTURE_OPERATIONS_PREFIX
|
||||
@@ -391,7 +392,7 @@ export function settingsTabPath(tab: SettingsTab): string {
|
||||
case 'proxmox':
|
||||
return PROXMOX_PREFIX;
|
||||
case 'infrastructure-operations':
|
||||
return INFRASTRUCTURE_INSTALL_PREFIX;
|
||||
return LEGACY_INFRASTRUCTURE_PREFIX;
|
||||
case 'system-recovery':
|
||||
return '/settings/system-recovery';
|
||||
case 'organization-overview':
|
||||
|
||||
Reference in New Issue
Block a user