Commit 768842c
Show discovered AppHosts in Aspire pane (#17506)
* Show idle AppHosts in Aspire pane with Run/Debug context menu
* Rename view ID from runningAppHosts to appHosts
* Rename context key from noRunningAppHosts to noAppHosts
* Keep panel visible when stopped AppHost has workspace candidates
When an AppHost stops, the noAppHosts context key now considers
workspace candidates. This ensures the panel shows idle AppHosts
instead of the empty welcome view after a running AppHost is stopped.
* Fix noAppHosts assertions: workspace candidates keep panel visible
The _updateWorkspaceContext change (0e312f9) added !hasWorkspaceCandidates
to the noAppHosts condition, meaning the panel stays visible when idle
AppHosts are discovered. Two tests asserted noAppHosts=true after describe
exit, but the legacy format candidate is treated as buildable (toAppHostCandidate
defaults null status to 'buildable'), so workspace candidates persist and
noAppHosts is correctly false.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* Make workspace AppHosts expandable with launch actions
* Address review feedback for PR #17506
Fix #1: Rename command IDs in package.json menus and walkthrough so
they target the new aspire-vscode.runAppHostCommand and
aspire-vscode.debugAppHostCommand registrations introduced in this PR.
Without this the editor title bar, explorer context menu, and Get
Started walkthrough Run/Debug buttons silently no-op.
Fix #2: Wrap vscode.debug.startDebugging in try/catch in
AppHostLaunchService.launch so a 'false' return value (debug adapter
rejected) or thrown error clears the launching state. Otherwise the
tree item is stuck showing the 'Starting...' spinner forever and the
user cannot retry.
Fix #3: Make AspireAppHostTreeProvider.runAppHost async and await
launch so launch failures surface via showErrorMessage instead of
being dropped as unhandled promise rejections.
Fix #4: In workspace mode with multiple candidate AppHost paths, match
running AppHosts to candidates by directory equivalence
(isMatchingAppHostPath) rather than exact path. This is the same
matching used elsewhere in AppHostDataRepository when correlating
'aspire ps' output to candidate paths, so canonicalization
differences (case, separators, trailing slashes) no longer cause a
running AppHost to display as idle.
Fix #5: Introduce aspire.noRunningAppHosts context key so the Open
Dashboard palette command is only enabled when at least one AppHost
is actually running. Previously the palette appeared when only idle
candidates were known and then silently no-oped.
Fix #6: Widen the workspaceResources contextValue regex in
package.json so the read-only 'Open AppHost Source' and 'Copy AppHost
Path' actions appear on bare 'workspaceResources' items, not only on
'workspaceResources:hasAppHost'. The destructive 'Stop AppHost' menu
remains gated on :hasAppHost.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
---------
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Adam Ratzman <adam@adamratzman.com>1 parent 12c9980 commit 768842c
16 files changed
Lines changed: 966 additions & 156 deletions
File tree
- extension
- loc/xlf
- src
- editor
- loc
- server
- services
- test
- views
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
66 | 66 | | |
67 | 67 | | |
68 | 68 | | |
69 | | - | |
70 | | - | |
| 69 | + | |
| 70 | + | |
71 | 71 | | |
72 | 72 | | |
73 | 73 | | |
74 | 74 | | |
75 | 75 | | |
76 | | - | |
77 | | - | |
| 76 | + | |
| 77 | + | |
78 | 78 | | |
79 | 79 | | |
80 | 80 | | |
81 | | - | |
82 | | - | |
83 | | - | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
84 | 84 | | |
85 | 85 | | |
86 | | - | |
87 | | - | |
88 | | - | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
89 | 89 | | |
90 | 90 | | |
91 | | - | |
92 | | - | |
| 91 | + | |
| 92 | + | |
93 | 93 | | |
94 | 94 | | |
95 | 95 | | |
| |||
261 | 261 | | |
262 | 262 | | |
263 | 263 | | |
264 | | - | |
265 | | - | |
| 264 | + | |
| 265 | + | |
| 266 | + | |
| 267 | + | |
| 268 | + | |
| 269 | + | |
| 270 | + | |
| 271 | + | |
| 272 | + | |
| 273 | + | |
| 274 | + | |
| 275 | + | |
| 276 | + | |
| 277 | + | |
| 278 | + | |
| 279 | + | |
| 280 | + | |
| 281 | + | |
| 282 | + | |
| 283 | + | |
266 | 284 | | |
267 | 285 | | |
268 | 286 | | |
| |||
443 | 461 | | |
444 | 462 | | |
445 | 463 | | |
446 | | - | |
| 464 | + | |
447 | 465 | | |
448 | 466 | | |
449 | 467 | | |
450 | 468 | | |
451 | | - | |
| 469 | + | |
452 | 470 | | |
453 | 471 | | |
454 | 472 | | |
455 | 473 | | |
456 | 474 | | |
457 | 475 | | |
458 | | - | |
| 476 | + | |
459 | 477 | | |
460 | 478 | | |
461 | 479 | | |
462 | 480 | | |
463 | | - | |
| 481 | + | |
464 | 482 | | |
465 | 483 | | |
466 | 484 | | |
| |||
475 | 493 | | |
476 | 494 | | |
477 | 495 | | |
478 | | - | |
| 496 | + | |
| 497 | + | |
| 498 | + | |
| 499 | + | |
| 500 | + | |
| 501 | + | |
| 502 | + | |
| 503 | + | |
| 504 | + | |
| 505 | + | |
| 506 | + | |
| 507 | + | |
| 508 | + | |
479 | 509 | | |
480 | 510 | | |
481 | 511 | | |
| |||
582 | 612 | | |
583 | 613 | | |
584 | 614 | | |
585 | | - | |
| 615 | + | |
586 | 616 | | |
587 | 617 | | |
588 | 618 | | |
589 | 619 | | |
590 | | - | |
| 620 | + | |
591 | 621 | | |
592 | 622 | | |
593 | 623 | | |
594 | | - | |
595 | | - | |
| 624 | + | |
| 625 | + | |
| 626 | + | |
| 627 | + | |
| 628 | + | |
| 629 | + | |
| 630 | + | |
596 | 631 | | |
597 | 632 | | |
598 | 633 | | |
599 | 634 | | |
600 | 635 | | |
601 | 636 | | |
602 | | - | |
| 637 | + | |
603 | 638 | | |
604 | 639 | | |
605 | 640 | | |
606 | 641 | | |
607 | | - | |
| 642 | + | |
608 | 643 | | |
609 | 644 | | |
610 | 645 | | |
611 | 646 | | |
612 | | - | |
| 647 | + | |
613 | 648 | | |
614 | 649 | | |
| 650 | + | |
| 651 | + | |
| 652 | + | |
| 653 | + | |
| 654 | + | |
| 655 | + | |
| 656 | + | |
| 657 | + | |
| 658 | + | |
| 659 | + | |
615 | 660 | | |
616 | 661 | | |
617 | | - | |
| 662 | + | |
618 | 663 | | |
619 | 664 | | |
620 | 665 | | |
621 | 666 | | |
622 | | - | |
| 667 | + | |
623 | 668 | | |
624 | 669 | | |
625 | 670 | | |
626 | 671 | | |
627 | | - | |
| 672 | + | |
628 | 673 | | |
629 | 674 | | |
630 | 675 | | |
631 | 676 | | |
632 | | - | |
| 677 | + | |
633 | 678 | | |
634 | 679 | | |
635 | 680 | | |
636 | 681 | | |
637 | | - | |
| 682 | + | |
638 | 683 | | |
639 | 684 | | |
640 | 685 | | |
641 | 686 | | |
642 | | - | |
| 687 | + | |
643 | 688 | | |
644 | 689 | | |
645 | 690 | | |
646 | 691 | | |
647 | | - | |
| 692 | + | |
648 | 693 | | |
649 | 694 | | |
650 | 695 | | |
651 | 696 | | |
652 | | - | |
| 697 | + | |
653 | 698 | | |
654 | 699 | | |
655 | 700 | | |
656 | 701 | | |
657 | | - | |
| 702 | + | |
658 | 703 | | |
659 | 704 | | |
660 | 705 | | |
661 | 706 | | |
662 | | - | |
| 707 | + | |
663 | 708 | | |
664 | 709 | | |
665 | 710 | | |
666 | 711 | | |
667 | | - | |
| 712 | + | |
668 | 713 | | |
669 | 714 | | |
670 | 715 | | |
671 | 716 | | |
672 | | - | |
| 717 | + | |
673 | 718 | | |
674 | 719 | | |
675 | 720 | | |
676 | 721 | | |
677 | | - | |
| 722 | + | |
678 | 723 | | |
679 | 724 | | |
680 | 725 | | |
681 | 726 | | |
682 | | - | |
| 727 | + | |
683 | 728 | | |
684 | 729 | | |
685 | 730 | | |
| |||
855 | 900 | | |
856 | 901 | | |
857 | 902 | | |
858 | | - | |
859 | | - | |
| 903 | + | |
| 904 | + | |
860 | 905 | | |
861 | 906 | | |
862 | 907 | | |
| |||
0 commit comments