|
| 1 | +# Clean Up Legacy `generated.yaml` References |
| 2 | + |
| 3 | +## Issue Description |
| 4 | +The codebase contains references to the deprecated `generated.yaml` file format that has been replaced by the newer `model.yaml` structure. While the code handles legacy format gracefully, these outdated references should be removed for code cleanliness and to avoid confusion for new contributors. |
| 5 | + |
| 6 | +## Current State |
| 7 | +The application transitioned from a monolithic `generated.yaml` to a split architecture: |
| 8 | +- `generated.yaml` (deprecated) → `model.yaml` (activities) + `team-progress.yaml` (progress) |
| 9 | + |
| 10 | +However, legacy references remain in the codebase. |
| 11 | + |
| 12 | +## References to Clean Up |
| 13 | + |
| 14 | +### 1. **File: `src/assets/YAML/meta.yaml` (Line 29)** |
| 15 | +**Current:** |
| 16 | +```yaml |
| 17 | +activityFiles: |
| 18 | + # - generated/generated.yaml # Old structure - No longer used |
| 19 | + - default/model.yaml |
| 20 | +``` |
| 21 | +
|
| 22 | +**Action:** Remove the commented-out reference to `generated/generated.yaml` |
| 23 | + |
| 24 | +**Proposed Fix:** |
| 25 | +```yaml |
| 26 | +activityFiles: |
| 27 | + - default/model.yaml |
| 28 | +``` |
| 29 | + |
| 30 | +--- |
| 31 | + |
| 32 | +### 2. **File: `src/app/component/modal-message/modal-message.component.ts` (Lines 24-31)** |
| 33 | + |
| 34 | +**Current:** The component has a hardcoded error template specifically for the legacy `generated.yaml` file: |
| 35 | +```typescript |
| 36 | +if (this.dialogInfo?.title === 'generated_yaml') { |
| 37 | + this.template = { ...this.generatedYamlTemplate }; |
| 38 | + // ... template for downloading generated.yaml |
| 39 | +} |
| 40 | +``` |
| 41 | + |
| 42 | +**Issue:** This template references the deprecated file format and is no longer relevant. |
| 43 | + |
| 44 | +**Action:** Consider whether this template should be: |
| 45 | +1. Removed entirely (preferred, since it's legacy) |
| 46 | +2. Kept for backward compatibility with existing error handling |
| 47 | + |
| 48 | +**Recommended Fix:** Remove this conditional block and the associated `generatedYamlTemplate` definition. |
| 49 | + |
| 50 | +--- |
| 51 | + |
| 52 | +### 3. **File: `src/app/service/loader/data-loader.service.ts` (Lines 158, 177-178)** |
| 53 | + |
| 54 | +**Current:** Special handling for legacy validation errors: |
| 55 | +```typescript |
| 56 | +usingLegacyYamlFile ||= filename.endsWith('generated/generated.yaml'); |
| 57 | +
|
| 58 | +// Legacy generated.yaml has several data validation problems. Do not report these |
| 59 | +if (!usingLegacyYamlFile) { |
| 60 | + throw new DataValidationError(...); |
| 61 | +} |
| 62 | +``` |
| 63 | + |
| 64 | +**Action:** This code can be removed once: |
| 65 | +1. All users have migrated from `generated.yaml` to `model.yaml` |
| 66 | +2. The legacy error template is removed |
| 67 | +3. Only `model.yaml` is actively supported |
| 68 | + |
| 69 | +**Recommended Fix:** Remove the `usingLegacyYamlFile` flag and the conditional error suppression once legacy format is no longer needed. |
| 70 | + |
| 71 | +--- |
| 72 | + |
| 73 | +## Impact |
| 74 | +- **Scope:** Minor cleanup, no functional impact |
| 75 | +- **Risk:** Very low — only affects code clarity and maintainability |
| 76 | +- **Breaking Changes:** None |
| 77 | +- **Dependencies:** None |
| 78 | + |
| 79 | +## Testing |
| 80 | +1. Verify the application loads correctly with `model.yaml` (the current standard) |
| 81 | +2. Ensure no error messages reference the deprecated `generated.yaml` format |
| 82 | +3. Confirm all existing functionality remains intact |
| 83 | + |
| 84 | +## Related Documentation |
| 85 | +- Migration notes should clarify that `generated.yaml` is deprecated in favor of `model.yaml` + `team-progress.yaml` |
| 86 | +- INSTALL.md can be updated to remove any references to manual `generated.yaml` download if not needed |
0 commit comments