Extract Grammaratur, Dregarnuhr, Geduldh, Mestionora, Ordoschnellic, Schutzaria, Kunstzeal and Seheweit behind compatible application contracts. Include accumulated editor resilience, navigation and theme UX, remote CLI, storage/schema and DR groundwork, tests and design/operations documentation. Verified: uncached full Go suite; go vet ./...; race tests for all eight components; 11 targeted Chromium tests; Node suites; 19 Python CLI tests; reproducible editor build. No push, release tag or deployment in this checkpoint.
33 lines
1.9 KiB
JavaScript
33 lines
1.9 KiB
JavaScript
(async () => {
|
|
const assert = (ok, message) => { if (!ok) throw Error(message); };
|
|
const frame = document.createElement('iframe');
|
|
frame.style = 'display:block;width:100%;height:880px;border:0'; document.body.append(frame);
|
|
const load = path => new Promise(resolve => { frame.onload = resolve; frame.src = path; });
|
|
try {
|
|
await load('/u/admin/_/edit');
|
|
let d = frame.contentDocument;
|
|
let form = d.querySelector('[name=contact_version]').form;
|
|
assert(form.querySelector('[name=contact_visibility]').value === 'private', 'Default is not private');
|
|
assert(!form.querySelector('[name=contact_confirm_public]').checked, 'Consent was preselected');
|
|
const field = form.querySelector('[name=phone]');
|
|
assert(field.type === 'tel', 'Phone keyboard hint missing');
|
|
field.value = '+81 (90) 1234-5678';
|
|
await new Promise(resolve => { frame.onload = resolve; form.requestSubmit(); });
|
|
d = frame.contentDocument;
|
|
assert(frame.contentWindow.location.search === '?contact=saved', 'Save did not redirect back');
|
|
assert(d.querySelector('[name=phone]').value === '+81 (90) 1234-5678', 'Phone display was not retained');
|
|
await load('/u/admin'); d = frame.contentDocument;
|
|
assert(d.querySelector('.profile-phone a').getAttribute('href') === 'tel:+819012345678', 'tel link malformed');
|
|
await load('/u/admin/_/edit#contact'); d = frame.contentDocument;
|
|
form = d.querySelector('[name=contact_version]').form;
|
|
for (const el of form.querySelectorAll('input:not([type=hidden]),select,button')) {
|
|
const r = el.getBoundingClientRect();
|
|
assert(r.left >= 0 && r.right <= frame.clientWidth + 1, 'Contact control overflows viewport');
|
|
}
|
|
d.querySelector('#contact').scrollIntoView();
|
|
document.body.dataset.vimReady = '1';
|
|
} catch (error) {
|
|
const out = document.createElement('pre'); out.id = 'error'; out.textContent = error.stack; document.body.append(out);
|
|
}
|
|
})();
|