Commit 67311e2
authored
feat: Dashboard redesign with modern UI and health check improvements (#84)
* feat: Implement alternate dashboard design with modern mode
- Added DesignModeContext and useDesignMode hook for managing design modes.
- Created a test suite for DesignModeContext with localStorage and URL parameter handling.
- Developed modern-theme.css for the new design system with a teal/cyan palette.
- Implemented Modern mode components and layout structure.
- Enabled design mode switching via URL parameters and localStorage persistence.
- Conducted extensive testing to ensure functionality and accessibility compliance.
- Documented design specifications and tasks for the new dashboard design.
* feat: Enhance health map logic for modern components and improve test coverage for design mode changes
* feat: add ModernServiceStatusCard component for service status display
- Implemented ModernServiceStatusCard to provide a compact summary of service statuses including error, warning, running, and stopped counts.
- Introduced StatusCount component for displaying individual status counts with appropriate icons and animations.
- Integrated loading state handling within the card.
feat: create ServiceOperationsContext for managing service operations
- Added ServiceOperationsContext to handle service lifecycle operations (start, stop, restart) and track their states.
- Implemented bulk operation capabilities for managing multiple services simultaneously.
- Provided utility functions for querying operation states and available actions based on service status.
test: add comprehensive tests for useServiceOperations hook
- Developed unit tests for useServiceOperations to validate operation state management, action availability, and API interactions.
- Mocked fetch calls to simulate API responses for service operations.
test: implement log-utils tests for log processing functions
- Created tests for log utility functions to ensure correct handling of ANSI to HTML conversion, log level detection, and service color assignment.
test: establish custom render utility for testing with context providers
- Introduced custom render function to wrap components with necessary context providers for testing purposes.
* Refactor azd app to eliminate file-based state storage and use gRPC services for configuration
- Removed .azure/services.json and .azure/ports.json, transitioning to in-memory state management.
- Implemented azdconfig package for gRPC UserConfig service interactions.
- Updated port management to utilize azdconfig for service port assignments.
- Refactored logs_config to store user preferences via azdconfig instead of file storage.
- Added /api/ping endpoint to dashboard for health checks.
- Modified azd app commands (info, stop) to query live dashboard API instead of reading from files.
- Ensured all existing functionality is preserved and all tests pass.
* feat: Implement health check improvements for portless services
- Added a design system document for the azd-app marketing website, detailing color tokens, typography, spacing, breakpoints, animations, shadows, border radius, z-index, focus states, motion preferences, dark mode implementation, and accessibility guidelines.
- Defined functional requirements for health checks on portless services, ensuring services without explicit ports do not get assigned ports and utilize process-based health checks.
- Updated `NeedsPort()` logic to return false for services without ports in `azure.yaml`.
- Enhanced health check tests to reflect new behavior and ensure accurate health status reporting.
- Implemented integration tests for portless services to verify correct health check functionality and dashboard display.
* Refactor code structure for improved readability and maintainability
* feat: Prevent regression of running services to starting during health check grace period
* fix: share in-memory config client across port managers for test consistency
When gRPC is not available (e.g., during tests), all port manager instances now share the same in-memory config client. This ensures port assignments saved by one port manager are visible to others within the same process.
Previously, each port manager created its own InMemoryClient, causing port assignments to be invisible across instances. This broke tests that:
1. Create a dashboard server (which uses port manager)
2. Stop the server and clear the servers map
3. Query the port manager for persisted assignments
The fix introduces a shared in-memory client (sharedInMemoryClient) that is lazily initialized once and reused by all port managers when gRPC is unavailable. ClearCacheForTesting() now also resets this shared client for proper test isolation.
* fix: eliminate flaky test by using TryLock instead of goroutine-based lock
The TestExecuteOperation_ConcurrentPrevention test was flaky because the
previous goroutine-based lock acquisition approach had race conditions:
- A timed-out operation's goroutine could acquire and release the lock
after the timeout, interfering with subsequent operations
- The channel-based signaling had edge cases with the default select case
Replaced with a simpler TryLock loop approach that:
- Polls TryLock() every 10ms until timeout
- Has no lingering goroutines after timeout
- Is deterministic and race-free
Also added a small delay in the test after the first operation completes
to ensure any cleanup from timed-out operations settles.
* fix: resolve symlinks in portmanager path normalization for macOS compatibility
On macOS, temp directories use symlinks (e.g., /var -> /private/var).
The dashboard server resolves symlinks via filepath.EvalSymlinks, but
the portmanager did not. This caused path mismatches when caching port
managers, resulting in test failures on macOS where the test and server
would get different port manager instances.
Added filepath.EvalSymlinks to portmanager's path normalization to match
the dashboard server's behavior and ensure consistent caching across
different path representations.
* fix: update portmanager cache tests to use normalized paths
The cache tests were checking for the original tempDir path, but with
symlink resolution now in GetPortManager, the cache key may be different
(e.g., /private/var vs /var on macOS). Updated tests to normalize paths
the same way GetPortManager does before checking the cache.1 parent ec82392 commit 67311e2
File tree
198 files changed
+13710
-28888
lines changed- cli
- dashboard
- design/components
- e2e
- helpers
- src
- components
- modals
- panels
- views
- contexts
- hooks
- lib
- styles
- test
- docs
- commands
- design
- components
- dev
- features
- schema
- specs
- health-check-portless-services
- service-lifecycle
- src
- cmd/app/commands
- internal
- azdconfig
- constants
- dashboard
- healthcheck
- installer
- monitor
- portmanager
- registry
- serviceinfo
- service
- tests/projects/process-services-test
- mcp-server
- docs
- archive
- specs
- dashboard-enhancements
- health-starting-status
- process-services
- service-status-actions-unification
- stopped-service-status
- website
- schemas/v1.1
- web
- public/screenshots
- scripts
- src
- pages/tour
- styles
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
198 files changed
+13710
-28888
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
13 | | - | |
14 | | - | |
15 | | - | |
16 | | - | |
17 | | - | |
18 | | - | |
19 | | - | |
20 | | - | |
21 | | - | |
22 | | - | |
23 | | - | |
24 | | - | |
25 | | - | |
26 | | - | |
27 | | - | |
28 | | - | |
29 | | - | |
30 | | - | |
31 | | - | |
32 | | - | |
33 | | - | |
34 | | - | |
35 | | - | |
36 | | - | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
37 | 16 | | |
38 | 17 | | |
39 | 18 | | |
40 | 19 | | |
41 | | - | |
| 20 | + | |
42 | 21 | | |
43 | 22 | | |
44 | 23 | | |
45 | 24 | | |
46 | 25 | | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
47 | 89 | | |
48 | 90 | | |
49 | 91 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
13 | | - | |
14 | | - | |
15 | | - | |
16 | | - | |
17 | | - | |
18 | | - | |
19 | | - | |
20 | | - | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
21 | 23 | | |
22 | | - | |
23 | | - | |
24 | | - | |
25 | | - | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
26 | 56 | | |
27 | | - | |
28 | | - | |
29 | | - | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
30 | 65 | | |
31 | | - | |
32 | | - | |
33 | | - | |
34 | 66 | | |
35 | | - | |
36 | | - | |
37 | | - | |
38 | 67 | | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
39 | 71 | | |
40 | 72 | | |
41 | | - | |
42 | | - | |
43 | | - | |
44 | | - | |
45 | | - | |
46 | | - | |
47 | | - | |
48 | | - | |
49 | | - | |
50 | | - | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
51 | 81 | | |
52 | 82 | | |
53 | 83 | | |
| |||
0 commit comments