Commit e295690
committed
feat(core): add nx cloud connect flow to the tui performance report
## Current Behavior
The TUI performance report shows run stats but no way to act on the remote-cache
recommendation. Connecting means quitting the run and running `nx connect`.
## Expected Behavior
- While the workspace is not connected, the performance report footer offers
`enable remote cache: <shift>+c` (clickable). Pressing it runs `nx connect`
logic headlessly and shows the onboarding URL inline under the stats, so the
whole flow stays in the TUI.
- The browser is never opened automatically: `o` (or a click on the link) opens
the URL; the report stays open. `<shift>+c` retries after a failure.
- A missing VCS remote does not block: the URL is generated anyway and the
report nudges to https://github.com/new (Nx Cloud covers VCS in the browser).
- The connect experience is a reusable `ConnectFlow` component that owns its own
lifecycle state and rendering; the report embeds it and forwards keys via a
small intent enum. Other popups can embed it later without touching the report.
- Its state lives in `TuiState` so it survives F11 mode switches. The URL is a
registry-backed clickable link, not OSC 8 (which breaks ratatui layout).
- Connection crosses napi as the constructor's existing optional bool:
undefined = cloud off, true = connected, false = not connected.
## Related Issue(s)
NXC-47011 parent f31588f commit e295690
12 files changed
Lines changed: 1054 additions & 53 deletions
File tree
- packages/nx/src
- command-line/nx-cloud/connect
- native
- tui
- components
- nx-cloud/generators/connect-to-nx-cloud
- tasks-runner
Lines changed: 63 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
242 | 242 | | |
243 | 243 | | |
244 | 244 | | |
| 245 | + | |
| 246 | + | |
| 247 | + | |
| 248 | + | |
| 249 | + | |
| 250 | + | |
| 251 | + | |
| 252 | + | |
| 253 | + | |
| 254 | + | |
| 255 | + | |
| 256 | + | |
| 257 | + | |
| 258 | + | |
| 259 | + | |
| 260 | + | |
| 261 | + | |
| 262 | + | |
| 263 | + | |
| 264 | + | |
| 265 | + | |
| 266 | + | |
| 267 | + | |
| 268 | + | |
| 269 | + | |
| 270 | + | |
| 271 | + | |
| 272 | + | |
| 273 | + | |
| 274 | + | |
| 275 | + | |
| 276 | + | |
| 277 | + | |
| 278 | + | |
| 279 | + | |
| 280 | + | |
| 281 | + | |
| 282 | + | |
| 283 | + | |
| 284 | + | |
| 285 | + | |
| 286 | + | |
| 287 | + | |
| 288 | + | |
| 289 | + | |
| 290 | + | |
| 291 | + | |
| 292 | + | |
| 293 | + | |
| 294 | + | |
| 295 | + | |
| 296 | + | |
| 297 | + | |
| 298 | + | |
| 299 | + | |
| 300 | + | |
| 301 | + | |
| 302 | + | |
| 303 | + | |
| 304 | + | |
| 305 | + | |
| 306 | + | |
| 307 | + | |
245 | 308 | | |
246 | 309 | | |
247 | 310 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
32 | 32 | | |
33 | 33 | | |
34 | 34 | | |
35 | | - | |
| 35 | + | |
36 | 36 | | |
37 | 37 | | |
38 | 38 | | |
| |||
57 | 57 | | |
58 | 58 | | |
59 | 59 | | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
60 | 79 | | |
61 | 80 | | |
62 | 81 | | |
| |||
0 commit comments