@@ -24,35 +24,14 @@ describe("sidebar entries", () => {
2424 expect ( normalizeSidebarEntries ( [ "route:overview" , "route:usage" ] ) ) . toEqual ( [ "route:usage" ] ) ;
2525 } ) ;
2626
27- it ( "keeps management surfaces in the workspace, not settings" , ( ) => {
28- for ( const routeId of [ "sessions" , "activity" ] as const ) {
29- expect ( SIDEBAR_NAV_ROUTES ) . toContain ( routeId ) ;
30- expect ( settingsRoutes ) . not . toContain ( routeId ) ;
31- }
32- expect ( settingsRoutes ) . not . toContain ( "worktrees" ) ;
33- expect ( settingsRoutes ) . not . toContain ( "memory-import" ) ;
34- } ) ;
35-
3627 it ( "treats worktrees as a sessions hub tab without its own pin" , ( ) => {
37- expect ( SIDEBAR_NAV_ROUTES ) . not . toContain ( "worktrees" ) ;
3828 expect ( isSessionsHubRoute ( "sessions" ) ) . toBe ( true ) ;
3929 expect ( isSessionsHubRoute ( "worktrees" ) ) . toBe ( true ) ;
4030 expect ( isSessionsHubRoute ( "chat" ) ) . toBe ( false ) ;
4131 expect ( normalizeSidebarEntries ( [ "route:worktrees" , "route:usage" ] ) ) . toEqual ( [ "route:usage" ] ) ;
4232 } ) ;
4333
44- it ( "keeps settings pages out of the customizable sidebar" , ( ) => {
45- for ( const routeId of [
46- "custodian" ,
47- "channels" ,
48- "security" ,
49- "secrets" ,
50- "notifications" ,
51- "advanced" ,
52- ] as const ) {
53- expect ( SIDEBAR_NAV_ROUTES ) . not . toContain ( routeId ) ;
54- expect ( settingsRoutes ) . toContain ( routeId ) ;
55- }
34+ it ( "recognizes every settings navigation route" , ( ) => {
5635 expect ( settingsRoutes . every ( ( routeId ) => isSettingsNavigationRoute ( routeId ) ) ) . toBe ( true ) ;
5736 } ) ;
5837
@@ -71,36 +50,26 @@ describe("sidebar entries", () => {
7150 } ) ;
7251
7352 it ( "keeps model setup as a settings subpage without a sidebar entry" , ( ) => {
74- expect ( settingsRoutes ) . not . toContain ( "model-setup" ) ;
7553 expect ( isSettingsNavigationRoute ( "model-setup" ) ) . toBe ( true ) ;
7654 expect ( settingsNavigationOwnerRoute ( "model-setup" ) ) . toBe ( "model-providers" ) ;
7755 } ) ;
7856
7957 it ( "keeps Agent Defaults routed as an Agents subpage without a sidebar entry" , ( ) => {
80- expect ( settingsRoutes ) . not . toContain ( "ai-agents" ) ;
8158 expect ( isSettingsNavigationRoute ( "ai-agents" ) ) . toBe ( true ) ;
8259 expect ( settingsNavigationOwnerRoute ( "ai-agents" ) ) . toBe ( "agents" ) ;
8360 } ) ;
8461
85- it ( "keeps devices in connection settings and drops stale pinned entries" , ( ) => {
86- expect ( SIDEBAR_NAV_ROUTES ) . not . toContain ( "devices" ) ;
87- expect ( settingsRoutes ) . toContain ( "devices" ) ;
62+ it ( "drops stale device pins" , ( ) => {
8863 expect ( normalizeSidebarEntries ( [ "route:nodes" , "route:usage" ] ) ) . toEqual ( [ "route:usage" ] ) ;
8964 } ) ;
9065
91- it ( "keeps the apps promo page unpinned by default but customizable" , ( ) => {
92- expect ( SIDEBAR_NAV_ROUTES ) . toContain ( "apps" ) ;
93- expect ( DEFAULT_SIDEBAR_ENTRIES ) . not . toContain ( "route:apps" ) ;
66+ it ( "keeps the apps promo page available in More" , ( ) => {
9467 expect ( sidebarMoreRoutes ( DEFAULT_SIDEBAR_ENTRIES ) ) . toContain ( "apps" ) ;
95- expect ( settingsRoutes ) . not . toContain ( "apps" ) ;
9668 expect ( isSettingsNavigationRoute ( "apps" ) ) . toBe ( false ) ;
9769 } ) ;
9870
99- it ( "keeps Portals as a first-class customizable workspace route" , ( ) => {
100- expect ( SIDEBAR_NAV_ROUTES ) . toContain ( "portals" ) ;
101- expect ( DEFAULT_SIDEBAR_ENTRIES ) . not . toContain ( "route:portals" ) ;
71+ it ( "keeps Portals available in More" , ( ) => {
10272 expect ( sidebarMoreRoutes ( DEFAULT_SIDEBAR_ENTRIES ) ) . toContain ( "portals" ) ;
103- expect ( settingsRoutes ) . not . toContain ( "portals" ) ;
10473 expect ( isSettingsNavigationRoute ( "portals" ) ) . toBe ( false ) ;
10574 } ) ;
10675
@@ -110,7 +79,6 @@ describe("sidebar entries", () => {
11079 "route:usage" ,
11180 ] ) ;
11281 expect ( sidebarMoreRoutes ( [ "route:usage" , "session:agent:main:test" ] ) ) . toContain ( "plugins" ) ;
113- expect ( settingsRoutes ) . not . toContain ( "plugins" ) ;
11482 } ) ;
11583
11684 it ( "round-trips route, Workboard, and session entries" , ( ) => {
@@ -143,9 +111,7 @@ describe("sidebar entries", () => {
143111 expect ( normalizeSidebarEntries ( [ ] ) ) . toEqual ( [ ] ) ;
144112 } ) ;
145113
146- it ( "keeps OpenClaw only in Settings and drops stale sidebar pins" , ( ) => {
147- expect ( SIDEBAR_NAV_ROUTES ) . not . toContain ( "custodian" ) ;
148- expect ( settingsRoutes ) . toContain ( "custodian" ) ;
114+ it ( "recognizes OpenClaw settings and drops stale sidebar pins" , ( ) => {
149115 expect ( isSettingsNavigationRoute ( "custodian" ) ) . toBe ( true ) ;
150116 expect ( normalizeSidebarEntries ( [ "route:custodian" , "route:usage" ] ) ) . toEqual ( [ "route:usage" ] ) ;
151117 } ) ;
0 commit comments