feat(memories): add quick moments alongside daily summaries

This commit is contained in:
Codex committed 2026-10-12 19:57:05 -06:00
1 parent eaa4894894
commit dc92415706
27 files changed
+264 -32

No files matched your search

+11 -1
View File
@@ -284,7 +284,7 @@ assert.ok(command('date').message.length > 8);
assert.ok(command('time').message.includes(':'));
assert.ok(command('datetime').message.length > 12);
assert.equal(command('uptime').message, 'terminal.uptime');
assert.equal(command('version').message, 'Life OS v1.22.1');
assert.equal(command('version').message, 'Life OS v1.23.0');
assert.equal(command('status').message, 'terminal.status');
assert.match(command('apps').message, /calendar/);
assert.equal(command('echo "hello Life OS"').message, 'hello Life OS');
@@ -604,3 +604,13 @@ holidayContext.setCalendarHolidayCountry('FR');
assert.equal(holidayStore.getItem('lifeos_holiday_country_v1'), 'FR');
assert.match(holidayNode.innerHTML, /<option value="FR" selected>/);
console.log(`Life OS artifact valid · ${enKeys.length} keys across ${Object.keys(allLocales).length} locales`);
uiStorage.setItem('lifeos_memories', JSON.stringify([
{id:'quick-first',kind:'moment',date:'2026-10-13',text:'MOMENT TEXT',createdAt:'2026-10-13T01:00:00Z',contextRecorded:false},
{id:'legacy-daily',date:'2026-10-13',text:'DAILY TEXT',mood:'clear',energy:5}
]));
vm.runInContext("todayTargetDate='2026-10-13';todayDraft=null;todayTitleDraft=null",uiContext);
const dailySurface={innerHTML:'',insertAdjacentHTML(_,markup){this.innerHTML+=markup;}};
uiContext.today(dailySurface);
assert.match(dailySurface.innerHTML, /<textarea[^>]*>DAILY TEXT<\/textarea>/, 'daily editor never loads a same-day moment');
assert.match(dailySurface.innerHTML, /MOMENT TEXT/, 'today lists saved same-day moments separately');
assert.equal(uiContext.longest([{date:'2026-10-11'},{date:'2026-10-12'},{date:'2026-10-12'},{date:'2026-10-13'}]),3,'duplicate dates do not break streaks');