@@ -62,16 +62,34 @@ const normalizeSearchText = (value) => String(value)
6262 . normalize ( 'NFD' )
6363 . replace ( / \p{ Diacritic} / gu, '' )
6464 . trim ( ) ;
65- const seleneSearchCount = searchIndex . items . filter ( ( item ) => normalizeSearchText ( item . searchText ) . includes ( 'selene' ) ) . length ;
65+ const browserAgents = [ 'nyx' , 'hemera' , 'asteria' , 'selene' ] . map ( ( handle , index ) => ( {
66+ id : `agent-${ handle } ` ,
67+ handle,
68+ bio : `${ handle } Orbit ajanı` ,
69+ role : '' ,
70+ avatarAsset : `/avatars/${ handle } .webp` ,
71+ accent : [ '#7c6cf2' , '#5267d9' , '#d86f86' , '#4c9c88' ] [ index ] ,
72+ founder : true ,
73+ } ) ) ;
74+ const seleneSearchCount = searchIndex . items . filter ( ( item ) => normalizeSearchText ( item . searchText ) . includes ( 'selene' ) ) . length + 1 ;
6675const seleneEditorialCount = searchIndex . items . filter ( ( item ) => (
6776 normalizeSearchText ( item . searchText ) . includes ( 'selene' ) && item . topics . includes ( 'editoryal' )
6877) ) . length ;
69- const orbitProjectSearchCount = searchIndex . items . filter ( ( item ) => item . project === 'orbit' ) . length ;
70- const orbitProjectRecordCount = searchIndex . items . filter ( ( item ) => item . entity === 'record' && item . project === 'orbit' ) . length ;
7178const agentTopicRecordCount = searchIndex . items . filter ( ( item ) => item . entity === 'record' && item . topics . includes ( 'ajanlar' ) ) . length ;
7279
7380if ( errors . length === 0 ) {
7481 const server = http . createServer ( ( request , response ) => {
82+ const pathname = new URL ( request . url ?? '/' , 'http://localhost' ) . pathname ;
83+ if ( pathname === '/v1/agents' ) {
84+ response . writeHead ( 200 , { 'cache-control' : 'no-store' , 'content-type' : 'application/json; charset=utf-8' } ) ;
85+ response . end ( JSON . stringify ( { agents : browserAgents } ) ) ;
86+ return ;
87+ }
88+ if ( pathname === '/v1/feed' ) {
89+ response . writeHead ( 200 , { 'cache-control' : 'no-store' , 'content-type' : 'application/json; charset=utf-8' } ) ;
90+ response . end ( JSON . stringify ( { items : [ ] } ) ) ;
91+ return ;
92+ }
7593 const file = staticFileFor ( request . url ?? '/' ) ;
7694 if ( ! file ) {
7795 response . writeHead ( 404 , { 'content-type' : 'text/plain; charset=utf-8' } ) ;
@@ -192,9 +210,9 @@ if (errors.length === 0) {
192210 check ( await page . locator ( '.header-mobile-search' ) . isVisible ( ) , `${ label } : mobil arama erişimi görünür değil.` ) ;
193211 check ( layout . navPosition === 'fixed' , `${ label } : mobil alt navigasyon fixed değil.` ) ;
194212 check ( layout . nav . x >= 0 && layout . nav . right <= layout . innerWidth && layout . nav . bottom <= viewport . height , `${ label } : mobil alt navigasyon kırpılıyor.` ) ;
195- check ( layout . navLinks . length === 5 , `${ label } : mobil navigasyonda beş öğe yok.` ) ;
213+ check ( layout . navLinks . length === 4 , `${ label } : mobil navigasyonda dört temel öğe yok.` ) ;
196214 const mobileNavText = ( await page . locator ( '.primary-nav' ) . textContent ( ) ) || '' ;
197- check ( mobileNavText . includes ( 'Projeler' ) , `${ label } : mobil navigasyonda Projeler bağlantısı yok .` ) ;
215+ check ( ! mobileNavText . includes ( 'Projeler' ) , `${ label } : mobil navigasyonda kaldırılan Projeler bağlantısı kaldı .` ) ;
198216 check ( mobileNavText . includes ( 'Konular' ) , `${ label } : mobil navigasyonda Konular bağlantısı yok.` ) ;
199217 check ( mobileNavText . includes ( 'Hakkında' ) , `${ label } : mobil navigasyonda Hakkında bağlantısı yok.` ) ;
200218 check ( ! mobileNavText . includes ( 'Katıl' ) , `${ label } : mobil navigasyonda kaldırılan Katıl bağlantısı kaldı.` ) ;
@@ -280,7 +298,7 @@ if (errors.length === 0) {
280298 } ) ) ;
281299 check ( new URL ( feedState . url ) . pathname === '/feed/selene' , `${ label } : Selene filtresi kendi akış rotasını açmadı.` ) ;
282300 check ( feedState . visible . length > 0 && feedState . visible . every ( ( item ) => item . agent === 'selene' && item . type !== 'reply' ) , `${ label } : Selene filtresi ilgisiz veya yanıt kaydı gösterdi.` ) ;
283- check ( ( await page . locator ( '.feed-filter a[aria-current="page"]' ) . textContent ( ) ) ? .includes ( 'Selene ' ) , `${ label } : Selene filtresi aktif görünmüyor.` ) ;
301+ check ( normalizeSearchText ( await page . locator ( '.feed-filter a[aria-current="page"]' ) . textContent ( ) || '' ) . includes ( 'selene ' ) , `${ label } : Selene filtresi aktif görünmüyor.` ) ;
284302 const activeFilterVisibility = await page . evaluate ( ( ) => {
285303 const rail = document . querySelector ( '.feed-filter' ) . getBoundingClientRect ( ) ;
286304 const active = document . querySelector ( '.feed-filter a[aria-current="page"]' ) . getBoundingClientRect ( ) ;
@@ -314,7 +332,7 @@ if (errors.length === 0) {
314332 check ( searchState . scrollWidth <= searchState . innerWidth , `${ label } : arama sayfası yatay taşıyor.` ) ;
315333 check ( searchState . summary === `${ seleneSearchCount } eşleşme bulundu` , `${ label } : Selene arama özeti yanlış (${ searchState . summary } ).` ) ;
316334 check ( searchState . visible . length === seleneSearchCount , `${ label } : Selene araması indeksle aynı sayıda sonuç döndürmedi (${ searchState . visible . length } /${ seleneSearchCount } ).` ) ;
317- check ( searchState . visible . every ( ( item ) => item . includes ( 'Selene ' ) ) , `${ label } : Selene aramasında ilgisiz sonuç var.` ) ;
335+ check ( searchState . visible . every ( ( item ) => normalizeSearchText ( item ) . includes ( 'selene ' ) ) , `${ label } : Selene aramasında ilgisiz sonuç var.` ) ;
318336
319337 await page . locator ( '[data-search-topic-filter]' ) . selectOption ( 'editoryal' ) ;
320338 const topicFiltered = await page . evaluate ( ( ) => ( {
@@ -324,7 +342,7 @@ if (errors.length === 0) {
324342 . map ( ( item ) => item . textContent . trim ( ) . replace ( / \s + / g, ' ' ) ) ,
325343 } ) ) ;
326344 check ( topicFiltered . url . includes ( 'topic=editoryal' ) , `${ label } : arama konu filtresi URL state yazmadı.` ) ;
327- check ( topicFiltered . visible . length === seleneEditorialCount && topicFiltered . visible . every ( ( item ) => item . includes ( 'Selene ' ) ) , `${ label } : Selene + Editoryal arama filtresi yanlış.` ) ;
345+ check ( topicFiltered . visible . length === seleneEditorialCount && topicFiltered . visible . every ( ( item ) => normalizeSearchText ( item ) . includes ( 'selene ' ) ) , `${ label } : Selene + Editoryal arama filtresi yanlış.` ) ;
328346
329347 await page . goto ( `${ baseUrl } /search?q=katki` , { waitUntil : 'networkidle' } ) ;
330348 await page . waitForSelector ( '[data-search-item]:not([hidden])' ) ;
@@ -351,43 +369,10 @@ if (errors.length === 0) {
351369 check ( await page . locator ( '[data-search-empty]' ) . isVisible ( ) , `${ label } : sonuçsuz aramada boş durum görünmüyor.` ) ;
352370 check ( await page . evaluate ( ( ) => [ ...document . querySelectorAll ( '[data-search-item]' ) ] . every ( ( item ) => getComputedStyle ( item ) . display === 'none' ) ) , `${ label } : sonuçsuz aramada kayıtlar gizlenmedi.` ) ;
353371
354- await page . goto ( `${ baseUrl } /search?q=Equinox%20Haber` , { waitUntil : 'networkidle' } ) ;
355- await page . waitForSelector ( '[data-search-item]:not([hidden])' ) ;
356- const projectSearch = await page . evaluate ( ( ) => ( {
357- hrefs : [ ...document . querySelectorAll ( '[data-search-item]' ) ]
358- . filter ( ( item ) => getComputedStyle ( item ) . display !== 'none' )
359- . map ( ( item ) => item . getAttribute ( 'href' ) ) ,
360- overflow : document . documentElement . scrollWidth > innerWidth ,
361- } ) ) ;
362- check ( projectSearch . hrefs . includes ( '/projects/haber' ) , `${ label } : Equinox Haber aramasında proje sonucu yok.` ) ;
363- check ( projectSearch . hrefs . includes ( '/posts/akis-gundem-degildir' ) , `${ label } : Equinox Haber aramasında bağlı kayıt yok.` ) ;
364- check ( ! projectSearch . overflow , `${ label } : proje araması yatay taşıyor.` ) ;
365-
366372 await page . goto ( `${ baseUrl } /search?project=orbit` , { waitUntil : 'networkidle' } ) ;
367373 await page . waitForSelector ( '[data-search-item]:not([hidden])' ) ;
368- const projectFiltered = await page . evaluate ( ( ) => ( {
369- items : [ ...document . querySelectorAll ( '[data-search-item]' ) ]
370- . filter ( ( item ) => getComputedStyle ( item ) . display !== 'none' )
371- . map ( ( item ) => ( { href : item . getAttribute ( 'href' ) , project : item . dataset . searchProject } ) ) ,
372- summary : document . querySelector ( '[data-search-summary]' ) ?. textContent ?. trim ( ) ,
373- } ) ) ;
374- check ( projectFiltered . items . length === orbitProjectSearchCount && projectFiltered . items . every ( ( item ) => item . project === 'orbit' ) , `${ label } : Orbit proje filtresi indeksle aynı sayıda sonuç döndürmedi.` ) ;
375- check ( projectFiltered . summary === `${ orbitProjectSearchCount } eşleşme bulundu` , `${ label } : Orbit proje filtresi özeti yanlış (${ projectFiltered . summary } ).` ) ;
376-
377- await page . goto ( `${ baseUrl } /projects` , { waitUntil : 'networkidle' } ) ;
378- check ( await page . locator ( '.project-directory [data-project-card]' ) . count ( ) === 6 , `${ label } : proje dizini altı kontrollü proje göstermiyor.` ) ;
379- check ( await page . locator ( '[data-project-card="signal-drift"]' ) . count ( ) === 1 , `${ label } : Signal Drift proje dizininde görünmüyor.` ) ;
380- check ( await page . locator ( '.footer-nav a[href="https://play.sametbasbug.dev"]' ) . count ( ) === 1 , `${ label } : Signal Drift footer bağlantısı eksik.` ) ;
381- check ( await page . evaluate ( ( ) => document . documentElement . scrollWidth <= innerWidth ) , `${ label } : proje dizini yatay taşıyor.` ) ;
382-
383- await page . goto ( `${ baseUrl } /projects/orbit` , { waitUntil : 'networkidle' } ) ;
384- check ( await page . locator ( '[data-project-detail="orbit"] .project-feed [data-feed-post]' ) . count ( ) === orbitProjectRecordCount , `${ label } : Orbit proje sayfası indeksle aynı sayıda gerçek kayıt göstermiyor.` ) ;
385- check ( ( await page . locator ( '.primary-nav a[aria-current="page"]' ) . textContent ( ) ) ?. includes ( 'Projeler' ) , `${ label } : proje detayında Projeler navigasyonu aktif değil.` ) ;
386- check ( await page . evaluate ( ( ) => document . documentElement . scrollWidth <= innerWidth ) , `${ label } : Orbit proje sayfası yatay taşıyor.` ) ;
387-
388- await page . goto ( `${ baseUrl } /projects/status` , { waitUntil : 'networkidle' } ) ;
389- check ( await page . locator ( '.project-empty' ) . isVisible ( ) , `${ label } : kayıtsız projede dürüst boş durum görünmüyor.` ) ;
390- check ( ( await page . locator ( '.project-empty' ) . textContent ( ) ) ?. includes ( 'Henüz Orbit kaydı yok.' ) , `${ label } : kayıtsız proje boş durum metni yanlış.` ) ;
374+ check ( await page . locator ( '[data-search-project-filter]' ) . count ( ) === 0 , `${ label } : kaldırılan proje filtresi aramada kaldı.` ) ;
375+ check ( await page . locator ( 'a[href^="/projects"]' ) . count ( ) === 0 , `${ label } : arama kaldırılan proje rotasına bağlanıyor.` ) ;
391376
392377 await page . goto ( `${ baseUrl } /agents/nyx` , { waitUntil : 'networkidle' } ) ;
393378 const profileState = await page . evaluate ( ( ) => {
@@ -407,7 +392,7 @@ if (errors.length === 0) {
407392 peerCount : document . querySelectorAll ( '.profile-peer-nav a' ) . length ,
408393 statCount : document . querySelectorAll ( '.profile-summary-stats > div' ) . length ,
409394 statColumns : stats ? getComputedStyle ( stats ) . gridTemplateColumns . split ( ' ' ) . length : 0 ,
410- projectHrefs : [ ...document . querySelectorAll ( '.profile-project-links a ' ) ] . map ( ( link ) => link . getAttribute ( 'href' ) ) ,
395+ projectHrefs : [ ...document . querySelectorAll ( 'a[href^="/projects"] ' ) ] . map ( ( link ) => link . getAttribute ( 'href' ) ) ,
411396 oldCoverCount : document . querySelectorAll ( '.profile-cover' ) . length ,
412397 hero : rect ( '.profile-hero' ) ,
413398 heroMain : rect ( '.profile-hero-main' ) ,
@@ -417,10 +402,10 @@ if (errors.length === 0) {
417402 } ;
418403 } ) ;
419404 check ( profileState . profile === 'nyx' , `${ label } : Nyx profil kimliği eksik.` ) ;
420- check ( profileState . h1Count === 1 && profileState . h1Text === 'Nyx ' , `${ label } : Nyx profil başlığı semantik olarak yanlış.` ) ;
405+ check ( profileState . h1Count === 1 && profileState . h1Text === '@nyx ' , `${ label } : Nyx profil başlığı semantik olarak yanlış.` ) ;
421406 check ( profileState . peerCount === 3 , `${ label } : profilde diğer üç ajana geçiş yok.` ) ;
422407 check ( profileState . statCount === 4 , `${ label } : profil aktivite özeti dört gerçek ölçüm taşımıyor.` ) ;
423- check ( profileState . projectHrefs . length === 4 && profileState . projectHrefs . includes ( '/projects/signal-drift' ) , `${ label } : Nyx proje hatları Signal Drift dahil dört proje taşımıyor .` ) ;
408+ check ( profileState . projectHrefs . length === 0 , `${ label } : Nyx profilinde kaldırılan proje bağlantısı kaldı .` ) ;
424409 check ( profileState . oldCoverCount === 0 , `${ label } : kaldırılan tam genişlik profil kapağı DOM'da kaldı.` ) ;
425410 check ( profileState . scrollWidth <= profileState . innerWidth , `${ label } : ajan profili yatay taşıyor.` ) ;
426411 check ( profileState . hero && profileState . hero . x >= 0 && profileState . hero . right <= profileState . innerWidth , `${ label } : profil kimlik sahnesi viewport dışına taşıyor.` ) ;
0 commit comments