Commit 47e48ec
feat(api): integrate NATS for project slug-to-ID resolution (#53)
* docs(chore): remove subagent system and simplify claude instructions
Remove Claude Code subagent system configuration files and simplify
CLAUDE.md documentation to reduce complexity and maintenance overhead.
- Delete .claude/agents/angular-ui-expert.md
- Delete .claude/agents/jira-project-manager.md
- Remove subagent system section from CLAUDE.md
- Simplify commit workflow documentation
LFXV2-334
Generated with [Claude Code](https://claude.ai/code)
Signed-off-by: Asitha de Silva <[email protected]>
* feat(ui): refactor meeting-create to meeting-manage with edit support
- Rename meeting-create component to meeting-manage for both create/edit functionality
- Add confirmation dialog for attachment deletion with proper refresh mechanism
- Fix attachment saving in edit mode to properly add new attachments to existing meetings
- Improve error handling: replace forkJoin all-or-nothing with individual attachment error handling
- Add loading state signal for attachment deletion progress tracking
- Extract reusable code to shared package for better maintainability:
- Move constants (TOTAL_STEPS, DEFAULT_DURATION, etc.) to shared/constants/meeting.ts
- Create validators directory with meeting-specific form validators
- Add date/time utilities (combineDateTime, formatTo12Hour, etc.) to shared/utils
- Refactor component to use extracted utilities, reducing code duplication by 700+ lines
- Add Angular forms as peer dependency to shared package for validators
- Update routing to support both /meetings/create and /meetings/:id/edit paths
- Implement loading spinner for delete attachment button
Addresses LFXV2-286: Meeting create/edit functionality consolidation
Generated with [Claude Code](https://claude.ai/code)
Signed-off-by: Asitha de Silva <[email protected]>
* fix: update shared package deps
Signed-off-by: Asitha de Silva <[email protected]>
* fix(shared): correct MS_IN_DAY calculation and add comprehensive JSDoc
- Fix critical bug in MS_IN_DAY constant calculation
- Was incorrectly calculating milliseconds in a week (604,800,000)
- Now correctly calculates milliseconds in a day (86,400,000)
- Removed erroneous DAYS_IN_WEEK multiplication
- Add comprehensive JSDoc documentation to all meeting constants
- Time calculation constants with mathematical explanations
- Meeting configuration defaults with usage examples
- Form validation and navigation constants
- Access control and recurrence mapping enums
- Organize constants into logical sections with clear headers
- Validate all time arithmetic is mathematically correct
- Ensure date operations (like week addition) now work properly
This fixes potential date calculation bugs in meeting recurrence logic.
Generated with [Claude Code](https://claude.ai/code)
Signed-off-by: Asitha de Silva <[email protected]>
* feat(shared): standardize file naming and add comprehensive JSDoc
- Standardize file naming with consistent suffixes (.constants, .interface, .enum, .validators, .utils)
- Add comprehensive JSDoc documentation to all constants, enums, and interfaces
- Fix critical MS_IN_DAY calculation bug (was calculating weeks instead of days)
- Consolidate date and timezone utilities into date-time.utils.ts
- Update all import/export statements to maintain compatibility
- Improve code maintainability with self-documenting interfaces
Generated with [Claude Code](https://claude.ai/code)
LFXV2-286
Signed-off-by: Asitha de Silva <[email protected]>
* fix(meeting): implement timezone-aware datetime handling
- Add date-fns-tz dependency for proper timezone support
- Update combineDateTime to accept timezone parameter and use fromZonedTime for UTC conversion
- Replace brittle toLocaleString/new Date parsing with timezone-aware utility functions
- Add timezone utility functions: compareDateTimesInTimezone, getCurrentTimeInTimezone, isDateTimeInFutureForTimezone
- Update futureDateTimeValidator to use proper timezone handling
- Remove duplicate validator and utility functions from meeting form component
- Ensure meeting scheduling works correctly across different timezones
LFXV2-286
Signed-off-by: Asitha de Silva <[email protected]>
* fix(validation): prevent NaN duration and improve form validation
- Replace ad-hoc custom duration validation with shared customDurationValidator
- Add explicit time format validation using timeFormatValidator
- Add topic and agenda content validators for better input validation
- Add runtime safety check to prevent NaN duration from bypassing validation
- Ensure consistent validation patterns across all meeting form components
- Fix dependency management by removing duplicates from app package.json
LFXV2-286
Signed-off-by: Asitha de Silva <[email protected]>
* feat(api): integrate NATS for project slug-to-ID resolution
- Add NATS.js SDK dependency for cluster messaging
- Implement lazy-loading NATS service with request/reply pattern
- Create consolidated getProjectBySlug method using NATS resolution
- Add NATS interfaces and configuration for lfx.projects-api.slug_to_uid subject
- Update project routes to use NATS for slug resolution
- Configure cluster DNS connection to lfx-platform-nats.lfx.svc.cluster.local:4222
- Add graceful shutdown handling for NATS connections
Resolves LFXV2-337
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <[email protected]>
Signed-off-by: Asitha de Silva <[email protected]>
* refactor(api): improve NATS service architecture and thread safety
- Extract hardcoded NATS URL to configuration constants in nats.config.ts
- Implement thread-safe connection management with promise-based synchronization
- Fix NatsService instantiation by using dependency injection instead of per-request instances
- Add proper connection pooling and prevent race conditions during concurrent requests
- Use configuration constants for timeouts and server URLs
Performance improvements:
- Reuse single NatsService instance across all slug lookups
- Prevent multiple concurrent connection attempts with connectionPromise
- Centralized configuration management for better maintainability
Resolves architecture feedback on LFXV2-337
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <[email protected]>
Signed-off-by: Asitha de Silva <[email protected]>
* feat(test): add playwright API mocking for NATS-dependent endpoints
- Create organized mock data structure for projects in e2e/fixtures/mock-data/
- Add ApiMockHelper class to intercept /api/projects/:slug endpoint
- Update project-dashboard.spec.ts and project-dashboard-robust.spec.ts to use mocks
- Mock data includes ASWF, CNCF, and Kubernetes projects for testing
- Prevents test failures when NATS server is unavailable in test environment
🤖 Generated with [Claude Code](https://claude.ai/code)
Signed-off-by: Asitha de Silva <[email protected]>
* fix(api): correct project query parameter from uid to tags
- Update getProjectById to use tags parameter for project ID lookup
- Ensures proper project resolution after NATS slug-to-ID conversion
🤖 Generated with [Claude Code](https://claude.ai/code)
Signed-off-by: Asitha de Silva <[email protected]>
* refactor(api): implement self-contained dependency injection pattern
Controllers and services now initialize their own dependencies internally for cleaner architecture and simplified instantiation.
🤖 Generated with [Claude Code](https://claude.ai/code)
LFXV2-337
Signed-off-by: Asitha de Silva <[email protected]>
* refactor(api): move NATS config to shared package
Move NATS configuration constants from app-specific config to shared package for better reusability and centralized configuration management.
🤖 Generated with [Claude Code](https://claude.ai/code)
LFXV2-337
Signed-off-by: Asitha de Silva <[email protected]>
---------
Signed-off-by: Asitha de Silva <[email protected]>
Co-authored-by: Claude <[email protected]>1 parent 9fcea72 commit 47e48ec
File tree
24 files changed
+703
-253
lines changed- .vscode
- apps/lfx-pcc
- e2e
- fixtures/mock-data
- helpers
- src
- app
- layouts/project-layout
- modules/project/dashboard/project-dashboard
- server
- controllers
- routes
- services
24 files changed
+703
-253
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
| 4 | + | |
4 | 5 | | |
| 6 | + | |
5 | 7 | | |
6 | 8 | | |
7 | 9 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
21 | 21 | | |
22 | 22 | | |
23 | 23 | | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
24 | 28 | | |
25 | 29 | | |
26 | 30 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 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 | + | |
| 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 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 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 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
| 6 | + | |
| 7 | + | |
6 | 8 | | |
7 | 9 | | |
8 | 10 | | |
| |||
112 | 114 | | |
113 | 115 | | |
114 | 116 | | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
115 | 120 | | |
116 | 121 | | |
117 | 122 | | |
| |||
144 | 149 | | |
145 | 150 | | |
146 | 151 | | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
147 | 155 | | |
148 | 156 | | |
149 | 157 | | |
| |||
167 | 175 | | |
168 | 176 | | |
169 | 177 | | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
170 | 181 | | |
171 | 182 | | |
172 | 183 | | |
| |||
176 | 187 | | |
177 | 188 | | |
178 | 189 | | |
179 | | - | |
180 | | - | |
181 | | - | |
182 | 190 | | |
183 | 191 | | |
184 | 192 | | |
185 | 193 | | |
186 | 194 | | |
187 | 195 | | |
188 | 196 | | |
189 | | - | |
| 197 | + | |
190 | 198 | | |
191 | 199 | | |
192 | 200 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
| 6 | + | |
| 7 | + | |
6 | 8 | | |
7 | 9 | | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
8 | 13 | | |
9 | 14 | | |
10 | 15 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
| 6 | + | |
| 7 | + | |
6 | 8 | | |
7 | 9 | | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
8 | 13 | | |
9 | 14 | | |
10 | 15 | | |
| |||
68 | 73 | | |
69 | 74 | | |
70 | 75 | | |
71 | | - | |
72 | | - | |
73 | | - | |
74 | | - | |
75 | | - | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
76 | 82 | | |
77 | 83 | | |
78 | 84 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
39 | 39 | | |
40 | 40 | | |
41 | 41 | | |
| 42 | + | |
42 | 43 | | |
43 | 44 | | |
44 | 45 | | |
| |||
Lines changed: 7 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
43 | 43 | | |
44 | 44 | | |
45 | 45 | | |
46 | | - | |
| 46 | + | |
47 | 47 | | |
48 | 48 | | |
49 | 49 | | |
50 | | - | |
| 50 | + | |
51 | 51 | | |
52 | 52 | | |
53 | 53 | | |
| |||
62 | 62 | | |
63 | 63 | | |
64 | 64 | | |
| 65 | + | |
65 | 66 | | |
66 | 67 | | |
67 | 68 | | |
| |||
74 | 75 | | |
75 | 76 | | |
76 | 77 | | |
| 78 | + | |
77 | 79 | | |
78 | 80 | | |
79 | | - | |
| 81 | + | |
80 | 82 | | |
81 | 83 | | |
82 | 84 | | |
| |||
85 | 87 | | |
86 | 88 | | |
87 | 89 | | |
| 90 | + | |
88 | 91 | | |
89 | 92 | | |
90 | | - | |
| 93 | + | |
91 | 94 | | |
92 | 95 | | |
93 | 96 | | |
| |||
0 commit comments