OverviewFilesCommitsIssuesDocsReleasesPeers

hyper-booking commits / 27d175d

Fix sign-in: remove noble ES module script tags, use dynamic import only
Root cause: noble-ed25519.js and noble-sha512.js are ES modules (use import/export syntax). Loading them as classic <script src> tags fails silently in browsers. identity.js already loads them via dynamic import() — the script tags were redundant and broken. Removed noble <script> tags from all three page templates (provider landing, booking, dashboard). identity.js handles loading. Tests updated to verify noble tags are NOT in rendered HTML. 17/17 tests pass, 131 assertions. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
27d175d074fdd34f0850f3b55833053f4cb75e16
by plankatron <fleeky@gmail.com> · 2026-03-22T19:11:49.000Z

Changed files (3) +7 -14

lib/routes/dashboard.js +0 -2
……@@ -427,8 +427,6 @@ function serveDashboardPage (res, server, view, params = {}) {
427427 </main>
428428 </div>
429429
430 <script src="${prefix}/web/vendor/noble-ed25519.js"></script>
431 <script src="${prefix}/web/vendor/noble-sha512.js"></script>
432430 <script src="${prefix}/web/js/identity.js"></script>
433431 <script src="${prefix}/web/js/app.js"></script>
434432 <script src="${prefix}/web/js/dashboard.js"></script>
lib/routes/web.js +0 -4
……@@ -98,8 +98,6 @@ export function registerPublicRoutes (router, server) {
9898 </footer>
9999 </div>
100100
101 <script src="${server.pathPrefix}/web/vendor/noble-ed25519.js"></script>
102 <script src="${server.pathPrefix}/web/vendor/noble-sha512.js"></script>
103101 <script src="${server.pathPrefix}/web/js/identity.js"></script>
104102 <script src="${server.pathPrefix}/web/js/app.js"></script>
105103 <script>
……@@ -242,8 +240,6 @@ function renderProviderPage (provider, packages, prefix) {
242240 </footer>
243241 </div>
244242
245 <script src="${prefix}/web/vendor/noble-ed25519.js"></script>
246 <script src="${prefix}/web/vendor/noble-sha512.js"></script>
247243 <script src="${prefix}/web/js/identity.js"></script>
248244 <script src="${prefix}/web/js/app.js"></script>
249245</body>
test/server.test.js +7 -8
……@@ -529,11 +529,10 @@ test('provider landing page renders HTML', async (t) => {
529529 const html = res.body
530530 t.ok(html.includes('Test Coach'))
531531 t.ok(html.includes('Test Session'))
532 t.ok(html.includes('noble-ed25519.js'))
533 t.ok(html.includes('noble-sha512.js'))
534 t.ok(html.includes('identity.js'))
535 t.ok(html.includes('app.js'))
536 t.ok(html.includes('/test-coach/book/pkg_test1'))
532 t.ok(html.includes('identity.js'), 'should include identity.js')
533 t.ok(html.includes('app.js'), 'should include app.js')
534 t.ok(!html.includes('noble-ed25519.js'), 'should NOT include noble script tags (loaded dynamically)')
535 t.ok(html.includes('/test-coach/book/pkg_test1'), 'should link to booking page')
537536 } finally {
538537 await s.close()
539538 }
……@@ -551,9 +550,9 @@ test('booking page renders HTML', async (t) => {
551550
552551 const html = res.body
553552 t.ok(html.includes('Test Session'))
554 t.ok(html.includes('noble-ed25519.js'))
555 t.ok(html.includes('identity.js'))
556 t.ok(html.includes('initBookingPage'))
553 t.ok(html.includes('identity.js'), 'should include identity.js')
554 t.ok(!html.includes('noble-ed25519.js'), 'should NOT include noble script tags')
555 t.ok(html.includes('initBookingPage'), 'should call initBookingPage')
557556 } finally {
558557 await s.close()
559558 }