@@ -15,6 +15,7 @@ import { Table, createTextColumn, createComponentColumn } from '../../components
1515import { createExecutor } from '../../utils/CommandExecutor.js' ;
1616import { DevboxDetailPage } from '../../components/DevboxDetailPage.js' ;
1717import { DevboxCreatePage } from '../../components/DevboxCreatePage.js' ;
18+ import { DevboxActionsMenu } from '../../components/DevboxActionsMenu.js' ;
1819
1920// Format time ago in a succinct way
2021const formatTimeAgo = ( timestamp : number ) : string => {
@@ -56,6 +57,7 @@ const ListDevboxesUI: React.FC<{ status?: string }> = ({ status }) => {
5657 const [ selectedIndex , setSelectedIndex ] = React . useState ( 0 ) ;
5758 const [ showDetails , setShowDetails ] = React . useState ( false ) ;
5859 const [ showCreate , setShowCreate ] = React . useState ( false ) ;
60+ const [ showActions , setShowActions ] = React . useState ( false ) ;
5961 const [ refreshing , setRefreshing ] = React . useState ( false ) ;
6062 const [ refreshIcon , setRefreshIcon ] = React . useState ( 0 ) ;
6163
@@ -135,25 +137,25 @@ const ListDevboxesUI: React.FC<{ status?: string }> = ({ status }) => {
135137
136138 // Poll every 3 seconds (increased from 2), but only when in list view
137139 const interval = setInterval ( ( ) => {
138- if ( ! showDetails && ! showCreate ) {
140+ if ( ! showDetails && ! showCreate && ! showActions ) {
139141 list ( false ) ;
140142 }
141143 } , 3000 ) ;
142144
143145 return ( ) => clearInterval ( interval ) ;
144- } , [ showDetails , showCreate ] ) ;
146+ } , [ showDetails , showCreate , showActions ] ) ;
145147
146148 // Animate refresh icon only when in list view
147149 React . useEffect ( ( ) => {
148- if ( showDetails || showCreate ) {
150+ if ( showDetails || showCreate || showActions ) {
149151 return ; // Don't animate when not in list view
150152 }
151153
152154 const interval = setInterval ( ( ) => {
153155 setRefreshIcon ( ( prev ) => ( prev + 1 ) % 10 ) ;
154156 } , 80 ) ;
155157 return ( ) => clearInterval ( interval ) ;
156- } , [ showDetails , showCreate ] ) ;
158+ } , [ showDetails , showCreate , showActions ] ) ;
157159
158160 useInput ( ( input , key ) => {
159161 const pageDevboxes = currentDevboxes . length ;
@@ -168,6 +170,11 @@ const ListDevboxesUI: React.FC<{ status?: string }> = ({ status }) => {
168170 return ;
169171 }
170172
173+ // Skip input handling when in actions view - let DevboxActionsMenu handle it
174+ if ( showActions ) {
175+ return ;
176+ }
177+
171178 // Handle list view
172179 if ( key . upArrow && selectedIndex > 0 ) {
173180 setSelectedIndex ( selectedIndex - 1 ) ;
@@ -182,6 +189,9 @@ const ListDevboxesUI: React.FC<{ status?: string }> = ({ status }) => {
182189 } else if ( key . return ) {
183190 console . clear ( ) ;
184191 setShowDetails ( true ) ;
192+ } else if ( input === 'a' ) {
193+ console . clear ( ) ;
194+ setShowActions ( true ) ;
185195 } else if ( input === 'c' ) {
186196 console . clear ( ) ;
187197 setShowCreate ( true ) ;
@@ -236,6 +246,20 @@ const ListDevboxesUI: React.FC<{ status?: string }> = ({ status }) => {
236246 ) ;
237247 }
238248
249+ // Actions view
250+ if ( showActions && selectedDevbox ) {
251+ return (
252+ < DevboxActionsMenu
253+ devbox = { selectedDevbox }
254+ onBack = { ( ) => setShowActions ( false ) }
255+ breadcrumbItems = { [
256+ { label : 'Devboxes' } ,
257+ { label : selectedDevbox . name || selectedDevbox . id , active : true }
258+ ] }
259+ />
260+ ) ;
261+ }
262+
239263 // Details view
240264 if ( showDetails && selectedDevbox ) {
241265 return < DevboxDetailPage devbox = { selectedDevbox } onBack = { ( ) => setShowDetails ( false ) } /> ;
@@ -396,7 +420,7 @@ const ListDevboxesUI: React.FC<{ status?: string }> = ({ status }) => {
396420 </ Text >
397421 ) }
398422 < Text color = "gray" dimColor >
399- { ' ' } • [Enter] Operations • [c] Create • [o] Browser • [q] Quit
423+ { ' ' } • [Enter] Details • [a] Actions • [c] Create • [o] Browser • [q] Quit
400424 </ Text >
401425 </ Box >
402426 </ >
0 commit comments