All checks were successful
CI/CD / detect-changes (pull_request) Successful in 4s
CI/CD / test-runners (pull_request) Has been skipped
CI/CD / test-frontend (pull_request) Successful in 7s
CI/CD / test-sqlite (pull_request) Successful in 2m48s
CI/CD / test-go-pg (pull_request) Successful in 2m53s
CI/CD / build-and-deploy (pull_request) Successful in 1m8s
Migrate Chat, Notes, and Schedules from legacy sw.shell.Topbar to the v0.7.0 shell topbar contract (sw.shell.topbar.setTitle/setSlot), eliminating double topbars on all extension surfaces. - Chat v0.3.0: reactive slot for thread title + People button - Notes v0.9.0: slot for New/Import/Graph buttons - Schedules v0.2.0: reactive slot for count + New button - 6 new shell-topbar runner tests (2 per surface) - Headless E2E deferred to v0.7.5 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
65 lines
1.9 KiB
JavaScript
65 lines
1.9 KiB
JavaScript
/**
|
|
* Chat Runner — Entry Point
|
|
*
|
|
* Boot SDK, load test modules in dependency order.
|
|
* Each module is an IIFE that registers suites via sw.testing.suite().
|
|
*/
|
|
(async function () {
|
|
'use strict';
|
|
|
|
try {
|
|
var base = window.__BASE__ || '';
|
|
var ver = window.__VERSION__ || '0';
|
|
if (!window.preact) {
|
|
var { h, render } = await import(base + '/js/sw/vendor/preact.module.js');
|
|
var hooksModule = await import(base + '/js/sw/vendor/hooks.module.js');
|
|
var htmModule = await import(base + '/js/sw/vendor/htm.module.js');
|
|
window.preact = { h, render };
|
|
window.hooks = hooksModule;
|
|
window.html = htmModule.default.bind(h);
|
|
}
|
|
var sdk = await import(base + '/js/sw/sdk/index.js?v=' + ver);
|
|
await sdk.boot();
|
|
} catch (e) {
|
|
console.warn('[ChatRunner] SDK boot failed:', e.message);
|
|
}
|
|
|
|
window.CR = {
|
|
base: window.__BASE__ || '',
|
|
api: sw.api.ext('chat-core')
|
|
};
|
|
|
|
var surfaceId = 'chat-runner';
|
|
var assetBase = '/surfaces/' + surfaceId + '/js/';
|
|
if (window.CR.base) assetBase = window.CR.base + assetBase;
|
|
|
|
var modules = [
|
|
'conversations.js',
|
|
'messaging.js',
|
|
'shell-topbar.js'
|
|
];
|
|
|
|
var loaded = 0;
|
|
function loadNext() {
|
|
if (loaded >= modules.length) { onReady(); return; }
|
|
var script = document.createElement('script');
|
|
script.src = assetBase + modules[loaded] + '?v=' + (window.__VERSION__ || '0') + '.' + Date.now();
|
|
script.onload = function () { loaded++; loadNext(); };
|
|
script.onerror = function () {
|
|
console.error('[ChatRunner] Failed to load: ' + modules[loaded]);
|
|
loaded++; loadNext();
|
|
};
|
|
document.body.appendChild(script);
|
|
}
|
|
|
|
function onReady() {
|
|
console.log('[ChatRunner] All modules loaded — ' + sw.testing.suites().length + ' suites registered');
|
|
var manifest = window.__MANIFEST__ || {};
|
|
if (manifest.id === surfaceId) {
|
|
window.location.href = (window.__BASE__ || '') + '/s/test-runners';
|
|
}
|
|
}
|
|
|
|
loadNext();
|
|
})();
|