(path: string)
| 90 | }, [job?.name, job?.status, job?.phase]); |
| 91 | |
| 92 | const browse = async (path: string): Promise<void> => { |
| 93 | const ticket = ++browseTicket.current; |
| 94 | setBrowsing(true); setBrowseError(''); setPathInput(path); |
| 95 | try { |
| 96 | const next = await source.browse(path); |
| 97 | if (!alive.current || ticket !== browseTicket.current) return; |
| 98 | setLevel(next); setPathInput(previous => previous === path ? next.path : previous); |
| 99 | } catch { |
| 100 | if (alive.current && ticket === browseTicket.current) setBrowseError('Could not open this folder. Check the path and try again.'); |
| 101 | } finally { |
| 102 | if (alive.current && ticket === browseTicket.current) setBrowsing(false); |
| 103 | } |
| 104 | }; |
| 105 | const loadProjects = async (): Promise<void> => { |
| 106 | const ticket = ++listTicket.current; |
| 107 | setListStatus('loading'); |
no test coverage detected