Epic: B
Depends on: TP-10, TP-11
Source: docs/theme-parser-github-issues.md
Goal
Scan app support theme folder and return lightweight ThemeDefinition objects.
Files
lib/core/theme/theme_registry_service.dart
test/core/theme/theme_registry_service_test.dart
Implementation
Add:
class ThemeRegistryService {
Future<List<ThemeDefinition>> loadThemeDefinitions();
}
For .json and .jsonc files:
- Read file async.
- Detect format:
- if root
schema == querya.theme.v1 -> custom;
- otherwise try VS Code manifest.
- Extract only metadata:
- id
- name
- type/isDark
- format
- path
- lastModified
- contentHash
- Skip broken files from list or return a disabled/error definition. Prefer disabled/error definition if UI should show it later.
Performance Notes
- Do not construct
QueryaTheme.
- Do not construct
ThemeData.
- Hash file content once during scan.
- Async file IO only.
Acceptance Criteria
- Valid custom files appear.
- Valid VS Code files appear.
- Broken file does not crash scan.
- Only
.json / .jsonc are considered.
Tests
- temp dir with 2 valid themes and 1 broken;
- stable ordering by name;
- content hash changes when file changes.
Epic: B
Depends on: TP-10, TP-11
Source:
docs/theme-parser-github-issues.mdGoal
Scan app support theme folder and return lightweight
ThemeDefinitionobjects.Files
lib/core/theme/theme_registry_service.darttest/core/theme/theme_registry_service_test.dartImplementation
Add:
For
.jsonand.jsoncfiles:schema == querya.theme.v1-> custom;Performance Notes
QueryaTheme.ThemeData.Acceptance Criteria
.json/.jsoncare considered.Tests