Implement Knowledge City platform, organizer and DAV integration

Capture accumulated application, UI, CLI, regression tests and design documentation changes, including task project mapping and default CalDAV list naming.

Keep deployment data, backups, local credentials and build artifacts out of Git. Move the Compose enrollment token to an ignored local environment file.
This commit is contained in:
Anya Tokugawa committed 2026-09-27 14:44:43 +09:00
1 parent 288e6e94ac
commit c1175d389f
699 files changed
+110197 -4117

No files matched your search

+36
View File
@@ -0,0 +1,36 @@
;(async () => {
const assert = (value, message) => { if (!value) throw new Error(message) }
const phase = sessionStorage.getItem('auth-flow-phase') || 'login'
if (phase === 'login') {
const form = document.querySelector('form[action="/_/auth/login"]')
assert(form, 'Login form missing')
form.elements.username.value = 'admin'
form.elements.password.value = 'a long test password'
sessionStorage.setItem('auth-flow-phase', 'authenticated')
form.requestSubmit()
return
}
if (phase === 'authenticated') {
assert(location.pathname === '/-/sys/config', 'Cookie login did not return to configuration')
assert(document.querySelector('.auth-user-name')?.textContent.includes('Test Admin'), 'Authenticated account missing')
assert(!document.cookie.includes('pageswiki_session'), 'Session cookie is not HttpOnly')
const confirmation = await fetch('/_/auth/logout')
assert(confirmation.ok && (await confirmation.text()).includes('action="/_/auth/logout"'), 'Logout GET is not confirmation')
const api = await fetch('/_/api/v1/queue')
assert(api.ok, 'Logout GET revoked the browser session')
const form = document.querySelector('.auth-menu-popover form[action="/_/auth/logout"]')
assert(form?.method === 'post', 'Account menu logout is not POST')
sessionStorage.setItem('auth-flow-phase', 'logged-out')
form.requestSubmit()
return
}
assert(location.pathname === '/_/auth/login', 'Logout did not return to login')
const denied = await fetch('/_/api/v1/queue')
assert(denied.status === 401, 'Logged-out cookie still authenticated')
document.body.dataset.vimReady = 'true'
})().catch(error => {
const element = document.createElement('pre')
element.id = 'error'
element.textContent = error.stack || String(error)
document.body.append(element)
})