@@ -34,11 +34,26 @@ test('config template keeps expected config tabs in top and side navigation', ()
3434 assert . match ( html , / s e t t i n g s T a b = = = ' b a c k u p ' / ) ;
3535 assert . match ( html , / s e t t i n g s T a b = = = ' t r a s h ' / ) ;
3636 assert . match ( html , / s e s s i o n T r a s h C o u n t / ) ;
37+ assert . match ( html , / i d = " s e t t i n g s - t a b - b a c k u p " / ) ;
38+ assert . match ( html , / i d = " s e t t i n g s - t a b - t r a s h " / ) ;
39+ assert . match ( html , / r o l e = " t a b " / ) ;
40+ assert . match ( html , / a r i a - c o n t r o l s = " s e t t i n g s - p a n e l - b a c k u p " / ) ;
41+ assert . match ( html , / a r i a - c o n t r o l s = " s e t t i n g s - p a n e l - t r a s h " / ) ;
42+ assert . match ( html , / : a r i a - s e l e c t e d = " s e t t i n g s T a b = = = ' b a c k u p ' " / ) ;
43+ assert . match ( html , / : a r i a - s e l e c t e d = " s e t t i n g s T a b = = = ' t r a s h ' " / ) ;
44+ assert . match ( html , / : t a b i n d e x = " s e t t i n g s T a b = = = ' b a c k u p ' \? 0 : - 1 " / ) ;
45+ assert . match ( html , / : t a b i n d e x = " s e t t i n g s T a b = = = ' t r a s h ' \? 0 : - 1 " / ) ;
46+ assert . match ( html , / i d = " s e t t i n g s - p a n e l - b a c k u p " / ) ;
47+ assert . match ( html , / i d = " s e t t i n g s - p a n e l - t r a s h " / ) ;
48+ assert . match ( html , / r o l e = " t a b p a n e l " / ) ;
3749 assert . match ( html , / c l a s s = " t r a s h - i t e m s e s s i o n - i t e m s e s s i o n - c a r d " / ) ;
3850 assert . match ( html , / c l a s s = " t r a s h - i t e m - m a i n l i n e " / ) ;
3951 assert . match ( html , / c l a s s = " t r a s h - i t e m - s i d e " / ) ;
4052 assert . match ( html , / c l a s s = " t r a s h - i t e m - t i m e s e s s i o n - i t e m - t i m e " / ) ;
4153 assert . match ( html , / c l a s s = " t r a s h - i t e m - p a t h s e s s i o n - i t e m - s u b s e s s i o n - i t e m - w r a p " / ) ;
54+ assert . match ( html , / v - f o r = " i t e m i n v i s i b l e S e s s i o n T r a s h I t e m s " / ) ;
55+ assert . match ( html , / c l a s s = " s e s s i o n - s o u r c e " / ) ;
56+ assert . match ( html , / @ c l i c k = " l o a d M o r e S e s s i o n T r a s h I t e m s " / ) ;
4257 assert . match ( html , / 回 收 站 列 表 加 载 失 败 , 请 刷 新 重 试 / ) ;
4358 assert . match ( html , / d a t a - m a i n - t a b = \" s e s s i o n s \" / ) ;
4459 assert . match ( html , / d a t a - c o n f i g - m o d e = \" c o d e x \" / ) ;
@@ -117,24 +132,32 @@ test('web ui script defines provider mode metadata for codex only', () => {
117132 assert . match ( appScript , / r u n L a t e s t O n l y Q u e u e \( / ) ;
118133 assert . match ( appScript , / p r o v i d e r S w i t c h I n P r o g r e s s : \s * f a l s e / ) ;
119134 assert . match ( appScript , / p e n d i n g P r o v i d e r S w i t c h : \s * ' ' / ) ;
120- assert . match ( appScript , / c o n s t S E S S I O N _ T R A S H _ L I S T _ L I M I T = 2 0 0 ; / ) ;
135+ assert . match ( appScript , / c o n s t S E S S I O N _ T R A S H _ L I S T _ L I M I T = 5 0 0 ; / ) ;
136+ assert . match ( appScript , / c o n s t S E S S I O N _ T R A S H _ P A G E _ S I Z E = 2 0 0 ; / ) ;
121137 assert . match ( appScript , / s e t t i n g s T a b : \s * ' b a c k u p ' / ) ;
122138 assert . match ( appScript , / s e s s i o n T r a s h I t e m s : \s * \[ \] / ) ;
139+ assert . match ( appScript , / s e s s i o n T r a s h V i s i b l e C o u n t : \s * S E S S I O N _ T R A S H _ P A G E _ S I Z E / ) ;
123140 assert . match ( appScript , / s e s s i o n T r a s h T o t a l C o u n t : \s * 0 / ) ;
124141 assert . match ( appScript , / s e s s i o n T r a s h L o a d e d O n c e : \s * f a l s e / ) ;
125142 assert . match ( appScript , / s e s s i o n T r a s h L o a d i n g : \s * f a l s e / ) ;
126143 assert . match ( appScript , / c o n s t t o t a l C o u n t = N u m b e r \( t h i s \. s e s s i o n T r a s h T o t a l C o u n t \) ; / ) ;
144+ assert . match ( appScript , / v i s i b l e S e s s i o n T r a s h I t e m s \( \) / ) ;
145+ assert . match ( appScript , / s e s s i o n T r a s h H a s M o r e I t e m s \( \) / ) ;
146+ assert . match ( appScript , / s e s s i o n T r a s h H i d d e n C o u n t \( \) / ) ;
127147 assert . match ( appScript , / n o r m a l i z e S e t t i n g s T a b \( t a b \) / ) ;
128148 assert . match ( appScript , / s w i t c h S e t t i n g s T a b \( t a b , \s * o p t i o n s = \{ \} \) / ) ;
129149 assert . match ( appScript , / l o a d S e s s i o n T r a s h \( o p t i o n s = \{ \} \) / ) ;
150+ assert . match ( appScript , / l o a d M o r e S e s s i o n T r a s h I t e m s \( \) / ) ;
130151 assert . match ( appScript , / r e s t o r e S e s s i o n T r a s h \( i t e m \) / ) ;
131152 assert . match ( appScript , / p u r g e S e s s i o n T r a s h \( i t e m \) / ) ;
132153 assert . match ( appScript , / c l e a r S e s s i o n T r a s h \( \) / ) ;
133154 assert . match ( appScript , / b u i l d S e s s i o n T r a s h I t e m F r o m S e s s i o n \( s e s s i o n , \s * r e s u l t = \{ \} \) / ) ;
134- assert . match ( appScript , / p r e p e n d S e s s i o n T r a s h I t e m \( i t e m \) / ) ;
155+ assert . match ( appScript , / p r e p e n d S e s s i o n T r a s h I t e m \( i t e m , \s * o p t i o n s = \{ \} \) / ) ;
156+ assert . match ( appScript , / r e s e t S e s s i o n T r a s h V i s i b l e C o u n t \( \) / ) ;
135157 assert . match ( appScript , / n o r m a l i z e S e s s i o n T r a s h T o t a l C o u n t \( t o t a l C o u n t , \s * f a l l b a c k I t e m s = t h i s \. s e s s i o n T r a s h I t e m s \) / ) ;
136158 assert . match ( appScript , / g e t S e s s i o n T r a s h V i e w S t a t e \( \) / ) ;
137159 assert . match ( appScript , / t h i s \. s e s s i o n T r a s h T o t a l C o u n t = t h i s \. n o r m a l i z e S e s s i o n T r a s h T o t a l C o u n t \( r e s \. t o t a l C o u n t , \s * n e x t I t e m s \) ; / ) ;
160+ assert . match ( appScript , / t h i s \. s e s s i o n T r a s h T o t a l C o u n t = t h i s \. n o r m a l i z e S e s s i o n T r a s h T o t a l C o u n t \( \s * r e s & & r e s \. t o t a l C o u n t ! = = u n d e f i n e d / ) ;
138161 assert . match ( appScript , / m e s s a g e C o u n t : \s * N u m b e r \. i s F i n i t e \( N u m b e r \( r e s u l t & & r e s u l t \. m e s s a g e C o u n t \) \) / ) ;
139162 assert . match ( appScript , / c l e a r A c t i v e S e s s i o n S t a t e \( \) / ) ;
140163 assert . match ( appScript , / r e m o v e S e s s i o n F r o m C u r r e n t L i s t \( s e s s i o n \) / ) ;
@@ -159,11 +182,13 @@ test('session helper deferred claude refresh validates live tab and mode before
159182 assert . match ( helperScript , / f o r c e R e f r e s h : t h i s \. s e t t i n g s T a b = = = ' t r a s h ' & & ! ! t h i s \. s e s s i o n T r a s h L o a d e d O n c e / ) ;
160183 assert . match ( helperScript , / c o n s t s h o u l d P r i m e T r a s h C o u n t O n S e t t i n g s E n t e r = n e x t T a b = = = ' s e t t i n g s ' / ) ;
161184 assert . match ( helperScript , / t h i s \. s e t t i n g s T a b ! = = ' t r a s h ' / ) ;
185+ assert . match ( helperScript , / t h i s \. s e s s i o n T r a s h L o a d e d O n c e = f a l s e ; / ) ;
162186 assert . match ( helperScript , / t h i s \. l o a d S e s s i o n T r a s h C o u n t \( \{ s i l e n t : t r u e \} \) ; / ) ;
163187} ) ;
164188
165189test ( 'trash item styles stay aligned with session card layout and keep mobile usability' , ( ) => {
166190 const styles = readProjectFile ( 'web-ui/styles.css' ) ;
191+ assert . match ( styles , / \. s e s s i o n - s o u r c e \s * \{ / ) ;
167192 assert . match ( styles , / \. t r a s h - i t e m \. s e s s i o n - i t e m \s * \{ [ \s \S ] * h e i g h t : \s * a u t o ; / ) ;
168193 assert . match ( styles , / \. t r a s h - i t e m - t i t l e \s * \{ [ \s \S ] * - w e b k i t - l i n e - c l a m p : \s * 2 ; / ) ;
169194 assert . match ( styles , / \. t r a s h - i t e m - s i d e \s * \{ [ \s \S ] * m i n - w i d t h : \s * 1 3 2 p x ; / ) ;
0 commit comments