feat: atomically capture task mail into Wiki and persist destination defaults
Build and publish container images / images (push) Successful in 11m26s
Release container images / release (push) Successful in 20s

This commit is contained in:
Anya Tokugawa committed 2026-11-06 08:34:29 +09:00
1 parent 52b501d1ce
commit 80d297dab4
14 files changed
+525 -30

No files matched your search

+5
View File
@@ -31,7 +31,12 @@ window.addEventListener('load',async()=>{const wait=async(fn)=>{for(let i=0;i<12
const exported=await fetch('/_/api/v1/extension/organizer.contacts/export.vcf').then(r=>r.text());if(!exported.includes('ブラウザ連絡先'))throw Error('Export missing');
document.querySelector('#tasks-dav-open').click();await wait(()=>document.querySelector('#tasks-dav-dialog').open);const dav=document.querySelector('#tasks-dav-dialog');if(getComputedStyle(dav.querySelector('.dav-compat-toggle')).display!=='none')throw Error('CalDAV-only compatibility visible');fill(dav.querySelector('form>input'),'Browser contact client');dav.querySelector('form').requestSubmit();await wait(()=>!dav.querySelector('section').hidden);const credentials=await fetch('/_/api/v1/caldav-credentials').then(r=>r.json());if(credentials.items.length!==1||credentials.items[0].scope!=='contacts')throw Error('Wrong credential scope');dav.querySelector('tbody button').click();await wait(()=>!dav.querySelector('tbody button'));dav.querySelector('header button').click();
}else if(path==='/-/sys/config'){
await wait(()=>document.querySelector('[name=project_uuid] option:checked')?.textContent==='Saved default project');
const savedProject=document.querySelector('[name=project_uuid]').value;
document.querySelector('.productivity-settings').reset();if(document.querySelector('[name=project_uuid]').value!==savedProject)throw Error('Default project reset lost selection');
fill(document.querySelector('[name=wiki_prefix]'),'/private/mail');
await wait(()=>document.querySelector('[name=due_days]'));fill(document.querySelector('[name=due_days]'),'2');document.querySelector('[name=notify_due]').click();document.querySelector('[name=notify_planned]').click();fill(document.querySelector('[name=reminder_time]'),'08:45');document.querySelector('.productivity-settings').requestSubmit();await wait(()=>document.querySelector('#productivity-status').textContent.includes('保存'));const d=await fetch('/_/api/v1/extension/organizer.tasks/preferences').then(r=>r.json());if(d.preferences.due_days!==2||!d.preferences.notify_due||!d.preferences.notify_planned||d.preferences.reminder_time!=='08:45'||!d.defaults.notify_due||d.defaults.notify_planned)throw Error('Preferences missing');
if(d.preferences.project_uuid!==savedProject||d.preferences.wiki_prefix!=='/private/mail')throw Error('Wiki destination or existing default project lost');
}else if(path==='/v/plan/dashboard'){
await wait(()=>document.querySelectorAll('.productivity-day').length>300);if(!document.querySelector('.productivity-day[data-level="2"]'))throw Error('Seven-point completion missing');
if(document.querySelectorAll('[data-widget]').length!==6)throw Error('Widget registry missing');