@@ -221,8 +221,8 @@ test("Models page combines final visibility, atomic actions, discovery status, a
221221 expect ( container . querySelector ( ".badge.badge-amber" ) ?. textContent ) . toContain ( "Discovery failed" ) ;
222222 expect ( container . textContent ) . not . toContain ( "Not selected" ) ;
223223
224- await act ( async ( ) => buttonText ( "Context windows" ) . click ( ) ) ;
225- const contextDialog = container . querySelector < HTMLElement > ( '[role="dialog"][aria-label="Context windows"]' ) ! ;
224+ await act ( async ( ) => buttonText ( "Custom windows" ) . click ( ) ) ;
225+ const contextDialog = container . querySelector < HTMLElement > ( '[role="dialog"][aria-label="Custom windows"]' ) ! ;
226226 const contextInputs = contextDialog . querySelectorAll < HTMLInputElement > ( "input" ) ;
227227 expect ( [ ...contextInputs ] . map ( input => input . value ) ) . toEqual ( [ "256000" , "64000" ] ) ;
228228 const setValue = Object . getOwnPropertyDescriptor (
@@ -275,10 +275,10 @@ test("Models page combines final visibility, atomic actions, discovery status, a
275275 contextWindow : 350_000 ,
276276 modelContextWindows : { "claude-opus" : 100_000 , "claude-sonnet" : 80_000 } ,
277277 } ) ;
278- expect ( container . querySelector ( '[role="dialog"][aria-label="Context windows"]' ) ) . toBeNull ( ) ;
278+ expect ( container . querySelector ( '[role="dialog"][aria-label="Custom windows"]' ) ) . toBeNull ( ) ;
279279
280- await act ( async ( ) => buttonText ( "Context windows" ) . click ( ) ) ;
281- const refreshFailureDialog = container . querySelector < HTMLElement > ( '[role="dialog"][aria-label="Context windows"]' ) ! ;
280+ await act ( async ( ) => buttonText ( "Custom windows" ) . click ( ) ) ;
281+ const refreshFailureDialog = container . querySelector < HTMLElement > ( '[role="dialog"][aria-label="Custom windows"]' ) ! ;
282282 failCatalog = true ;
283283 // Make an actual edit. Apply now compares against the values the modal opened with, so a
284284 // reopened-and-untouched dialog sends nothing — which would leave this case asserting the
@@ -296,15 +296,15 @@ test("Models page combines final visibility, atomic actions, discovery status, a
296296 } ) ;
297297 expect ( contextBodies ) . toHaveLength ( 2 ) ;
298298 expect ( contextBodies . at ( - 1 ) ) . toEqual ( { contextWindow : 360_000 } ) ;
299- expect ( container . querySelector ( '[role="dialog"][aria-label="Context windows"]' ) ) . toBeNull ( ) ;
299+ expect ( container . querySelector ( '[role="dialog"][aria-label="Custom windows"]' ) ) . toBeNull ( ) ;
300300 expect ( container . textContent ) . toContain ( "Context windows updated" ) ;
301301 failCatalog = false ;
302302
303303 // An edit that is typed and then restored is not a change — and neither is retyping the
304304 // same number in a different shape. Comparing raw text instead of parsed values would
305305 // treat "64,000" as an edit and stamp a stale number over whatever else moved.
306- await act ( async ( ) => buttonText ( "Context windows" ) . click ( ) ) ;
307- const revertDialog = container . querySelector < HTMLElement > ( '[role="dialog"][aria-label="Context windows"]' ) ! ;
306+ await act ( async ( ) => buttonText ( "Custom windows" ) . click ( ) ) ;
307+ const revertDialog = container . querySelector < HTMLElement > ( '[role="dialog"][aria-label="Custom windows"]' ) ! ;
308308 const revertInput = revertDialog . querySelectorAll < HTMLInputElement > ( "input.input" ) [ 0 ] ! ;
309309 const openingValue = revertInput . value ;
310310 await act ( async ( ) => {
@@ -320,10 +320,10 @@ test("Models page combines final visibility, atomic actions, discovery status, a
320320 await new Promise ( resolve => testWindow . setTimeout ( resolve , 0 ) ) ;
321321 } ) ;
322322 expect ( contextBodies ) . toHaveLength ( 2 ) ;
323- expect ( container . querySelector ( '[role="dialog"][aria-label="Context windows"]' ) ) . toBeNull ( ) ;
323+ expect ( container . querySelector ( '[role="dialog"][aria-label="Custom windows"]' ) ) . toBeNull ( ) ;
324324
325- await act ( async ( ) => buttonText ( "Context windows" ) . click ( ) ) ;
326- const reformatDialog = container . querySelector < HTMLElement > ( '[role="dialog"][aria-label="Context windows"]' ) ! ;
325+ await act ( async ( ) => buttonText ( "Custom windows" ) . click ( ) ) ;
326+ const reformatDialog = container . querySelector < HTMLElement > ( '[role="dialog"][aria-label="Custom windows"]' ) ! ;
327327 const reformatInput = reformatDialog . querySelectorAll < HTMLInputElement > ( "input.input" ) [ 0 ] ! ;
328328 const commaFormatted = reformatInput . value . replace ( / \B (? = ( \d { 3 } ) + (? ! \d ) ) / g, "," ) ;
329329 await act ( async ( ) => {
@@ -353,8 +353,8 @@ test("Models page combines final visibility, atomic actions, discovery status, a
353353 // The poll has to actually run: mutating the mock alone leaves React's `groups` on the
354354 // opening values, and then comparing drafts against LIVE state — the defect — would look
355355 // identical to comparing against the snapshot.
356- await act ( async ( ) => buttonText ( "Context windows" ) . click ( ) ) ;
357- const concurrentDialog = container . querySelector < HTMLElement > ( '[role="dialog"][aria-label="Context windows"]' ) ! ;
356+ await act ( async ( ) => buttonText ( "Custom windows" ) . click ( ) ) ;
357+ const concurrentDialog = container . querySelector < HTMLElement > ( '[role="dialog"][aria-label="Custom windows"]' ) ! ;
358358 providerContextWindow = 300_000 ;
359359 providerModelContextWindows = { ...providerModelContextWindows , "claude-opus" : 96_000 } ;
360360 await act ( async ( ) => { poll ( ) ; await new Promise ( resolve => testWindow . setTimeout ( resolve , 0 ) ) ; } ) ;
@@ -379,8 +379,8 @@ test("Models page combines final visibility, atomic actions, discovery status, a
379379 // `groups` instead of the opening snapshot. The cases above cannot see that swap, because
380380 // in each of them the user's value genuinely differs from both. This one does — the user
381381 // touches a field and puts it back, while the server moves underneath.
382- await act ( async ( ) => buttonText ( "Context windows" ) . click ( ) ) ;
383- const staleDialog = container . querySelector < HTMLElement > ( '[role="dialog"][aria-label="Context windows"]' ) ! ;
382+ await act ( async ( ) => buttonText ( "Custom windows" ) . click ( ) ) ;
383+ const staleDialog = container . querySelector < HTMLElement > ( '[role="dialog"][aria-label="Custom windows"]' ) ! ;
384384 const staleDefaultInput = staleDialog . querySelectorAll < HTMLInputElement > ( "input.input" ) [ 0 ] ! ;
385385 const staleOpeningDefault = staleDefaultInput . value ;
386386 await act ( async ( ) => {
@@ -419,8 +419,8 @@ test("Models page combines final visibility, atomic actions, discovery status, a
419419 // anyone whose config was hand-edited before the safe-integer bound existed.
420420 providerContextWindow = 1e100 ;
421421 await act ( async ( ) => { poll ( ) ; await new Promise ( resolve => testWindow . setTimeout ( resolve , 0 ) ) ; } ) ;
422- await act ( async ( ) => buttonText ( "Context windows" ) . click ( ) ) ;
423- const unsafeDefaultDialog = container . querySelector < HTMLElement > ( '[role="dialog"][aria-label="Context windows"]' ) ! ;
422+ await act ( async ( ) => buttonText ( "Custom windows" ) . click ( ) ) ;
423+ const unsafeDefaultDialog = container . querySelector < HTMLElement > ( '[role="dialog"][aria-label="Custom windows"]' ) ! ;
424424 await pickContextModel ( "claude-sonnet" , unsafeDefaultDialog ) ;
425425 const unsafeSiblingInput = unsafeDefaultDialog . querySelectorAll < HTMLInputElement > ( "input.input" ) [ 1 ] ! ;
426426 await act ( async ( ) => {
@@ -438,8 +438,8 @@ test("Models page combines final visibility, atomic actions, discovery status, a
438438 // `Number.isInteger(1e100)` is true, and the server rejects it. Accepting it in the form
439439 // would turn a typo into a round-trip error instead of inline feedback.
440440 const patchesBeforeUnsafe = contextBodies . length ;
441- await act ( async ( ) => buttonText ( "Context windows" ) . click ( ) ) ;
442- const unsafeDialog = container . querySelector < HTMLElement > ( '[role="dialog"][aria-label="Context windows"]' ) ! ;
441+ await act ( async ( ) => buttonText ( "Custom windows" ) . click ( ) ) ;
442+ const unsafeDialog = container . querySelector < HTMLElement > ( '[role="dialog"][aria-label="Custom windows"]' ) ! ;
443443 const unsafeInput = unsafeDialog . querySelectorAll < HTMLInputElement > ( "input.input" ) [ 0 ] ! ;
444444 await act ( async ( ) => {
445445 setValue . call ( unsafeInput , "1e100" ) ;
@@ -454,7 +454,7 @@ test("Models page combines final visibility, atomic actions, discovery status, a
454454 // Relative, not absolute: an absolute count silently re-targets whenever a case is added
455455 // above, and the property under test is "this Apply wrote nothing".
456456 expect ( contextBodies ) . toHaveLength ( patchesBeforeUnsafe ) ;
457- expect ( container . querySelector ( '[role="dialog"][aria-label="Context windows"]' ) ) . not . toBeNull ( ) ;
457+ expect ( container . querySelector ( '[role="dialog"][aria-label="Custom windows"]' ) ) . not . toBeNull ( ) ;
458458 // The modal staying open is not the point — the user has to be TOLD why. Without this the
459459 // test passes on a silent no-op that looks identical to a hang.
460460 expect ( unsafeDialog . textContent ) . toContain ( "Context windows must be positive whole numbers" ) ;
0 commit comments