Self-hosted, Self-Improving, Federated Everything App — dev management, agent orchestration, persistent mind, digital twin, second brain, and creative pipeline from a single dashboard over Tailscale to port the user into the OS
JavaScript ai-agentsdashboarddeveloper-toolsdigital-twinquantified-selfsecond-brainself-hostedtailscale
fix(cos): normalize TASKS.md metadata keys for backward compatibility
Adam Eivy15d327700058
diff --git a/server/lib/taskParser.js b/server/lib/taskParser.jsindex f4cd1aa2f8..069f5f9081 100644--- a/server/lib/taskParser.js+++ b/server/lib/taskParser.js@@ -143,8 +143,12 @@ function parseMetadataLine(line) {const match = line.match(/^\s+-\s*(\w+):\s*(.+)$/);if (!match) return null;+ // Normalize key: lowercase first character to handle legacy Title-Case keys (Context→context,+ // App→app) while preserving camelCase keys (openPR stays openPR, useWorktree stays useWorktree)+ const rawKey = match[1];+ const key = rawKey.charAt(0).toLowerCase() + rawKey.slice(1);return {- key: match[1],+ key,value: unescapeNewlines(match[2].trim())};}diff --git a/server/lib/taskParser.test.js b/server/lib/taskParser.test.jsindex 9a4bc4c747..8995e660e1 100644--- a/server/lib/taskParser.test.js+++ b/server/lib/taskParser.test.js@@ -98,18 +98,36 @@ describe('Task Parser', () => {## Pending- [ ] #task-001 | HIGH | Fix the bug- - context: User reported issue- - app: my-app- - model: claude-sonnet`;+ - Context: User reported issue+ - App: my-app+ - Model: claude-sonnet`;const tasks = parseTasksMarkdown(markdown);expect(tasks).toHaveLength(1);+ // Legacy Title-Case keys are normalized to camelCase (Context→context)expect(tasks[0].metadata.context).toBe('User reported issue');expect(tasks[0].metadata.app).toBe('my-app');expect(tasks[0].metadata.model).toBe('claude-sonnet');});+ it('should preserve camelCase metadata keys', () => {+ const markdown = `# Tasks++## Pending+- [ ] #task-001 | HIGH | Fix the bug+ - openPR: true+ - useWorktree: true+ - reviewLoop: false`;++ const tasks = parseTasksMarkdown(markdown);++ expect(tasks).toHaveLength(1);+ expect(tasks[0].metadata.openPR).toBe('true');+ expect(tasks[0].metadata.useWorktree).toBe('true');+ expect(tasks[0].metadata.reviewLoop).toBe('false');+ });+it('should handle empty content', () => {const tasks = parseTasksMarkdown('');expect(tasks).toHaveLength(0);