@@ -514,6 +514,19 @@ const App = (() => {
514514 }
515515 } ;
516516
517+ // Manage search input visibility based on current page
518+ const updateSearchInputVisibility = ( ) => {
519+ const searchInput = $ ( 'searchInput' ) ;
520+ const path = window . location . pathname ;
521+
522+ // Show search input only on PR view and robot army pages
523+ if ( path === '/' || path . startsWith ( '/u/' ) || path === '/robots' || path . match ( / ^ \/ r o b o t s \/ g h \/ [ ^ \/ ] + $ / ) ) {
524+ show ( searchInput ) ;
525+ } else {
526+ hide ( searchInput ) ;
527+ }
528+ } ;
529+
517530 // Initialize
518531 const init = async ( ) => {
519532 const urlParams = new URLSearchParams ( window . location . search ) ;
@@ -525,6 +538,7 @@ const App = (() => {
525538
526539 // Handle stats page routing
527540 if ( urlContext && urlContext . isStats ) {
541+ updateSearchInputVisibility ( ) ;
528542 await Stats . showStatsPage ( state , githubAPI , loadCurrentUser ,
529543 ( ) => User . updateUserDisplay ( state , initiateLogin ) ,
530544 setupHamburgerMenu ,
@@ -536,6 +550,7 @@ const App = (() => {
536550 // Handle notifications page routing
537551 const path = window . location . pathname ;
538552 if ( path === '/notifications' || path . match ( / ^ \/ n o t i f i c a t i o n s \/ g h \/ [ ^ \/ ] + $ / ) ) {
553+ updateSearchInputVisibility ( ) ;
539554 const token = Auth . getStoredToken ( ) ;
540555 if ( token ) {
541556 try {
@@ -552,6 +567,7 @@ const App = (() => {
552567
553568 // Handle robots page routing
554569 if ( path === '/robots' || path . match ( / ^ \/ r o b o t s \/ g h \/ [ ^ \/ ] + $ / ) ) {
570+ updateSearchInputVisibility ( ) ;
555571 const token = Auth . getStoredToken ( ) ;
556572 if ( ! token ) {
557573 showToast ( "Please login to configure Robot Army" , "error" ) ;
@@ -636,12 +652,14 @@ const App = (() => {
636652
637653 // Demo mode - only if explicitly requested
638654 if ( demo === "true" ) {
655+ updateSearchInputVisibility ( ) ;
639656 initializeDemoMode ( ) ;
640657 return ;
641658 }
642659
643660 // Check for authentication
644661 if ( ! state . accessToken ) {
662+ updateSearchInputVisibility ( ) ;
645663 if ( urlContext && urlContext . username && ! urlContext . isStats && ! urlContext . isSettings && ! urlContext . isNotifications ) {
646664 // Only load PRs for actual user PR dashboard pages
647665 try {
@@ -677,6 +695,7 @@ const App = (() => {
677695
678696 // Authenticated flow
679697 try {
698+ updateSearchInputVisibility ( ) ;
680699 await loadCurrentUser ( ) ;
681700
682701 // If at root URL, redirect to user's page
@@ -703,6 +722,12 @@ const App = (() => {
703722 await User . loadPullRequests ( state , githubAPI , state . isDemoMode ) ;
704723 // Update org filter again after PRs are loaded to include PR organizations
705724 await User . updateOrgFilter ( state , parseURL , githubAPI ) ;
725+
726+ // Reset search input placeholder for PR view
727+ const searchInput = $ ( "searchInput" ) ;
728+ if ( searchInput ) {
729+ searchInput . placeholder = "Search PRs..." ;
730+ }
706731 }
707732
708733 showMainContent ( ) ;
0 commit comments