From dca101b8ae4dc36999c2309e7a7fb663dad9dd10 Mon Sep 17 00:00:00 2001 From: NullVoxPopuli-ai-agent <268630448+NullVoxPopuli-ai-agent@users.noreply.github.com> Date: Mon, 27 Jul 2026 13:11:21 -0400 Subject: [PATCH 1/2] tutorial: preview the unreleased kolay via the dist branch kolay's next release reworks the plugin API (universal-ember/kolay#323). Preview it here the way ember-primitives#794 does: a pnpm override resolves kolay to the built package contents kolay pushes to its dist branch on every commit to main. Migration off the 4.x options: - kolay({src, exclude, onlyDirectories, packages}) -> docs('docs', {src: import.meta.resolve('./public/docs')}); the manifest is file-based (each lesson's prose.md is the page) - addRoutes(this, 'docs') mounts the group at the root URL space, so all tutorial URLs are unchanged - optimizeDeps.exclude kolay: the scoped-route registry is stateful, the router and docs service must share one module instance - lessonPath() maps manifest paths (/docs/**/prose.md) to lesson URLs - isHidden takes over what exclude/onlyDirectories did: x-* segments and stray .md notes hidden everywhere, keyed-each-blocks dev-only - setupKolay's empty resolve option is gone (it's modules now) - cssTarget keeps light-dark() out of lightningcss downleveling Depends on universal-ember/kolay#350 (top-level scoped mounts registered the wrong route name); verified locally with that fix applied to the resolved dist copy. Co-Authored-By: Claude Fable 5 --- apps/tutorial/app/components/selection.gts | 12 +- apps/tutorial/app/router.ts | 3 +- apps/tutorial/app/routes/application.ts | 1 - apps/tutorial/app/services/docs.ts | 11 +- apps/tutorial/app/services/selected.ts | 8 +- apps/tutorial/app/utils.ts | 55 ++++--- .../tests/application/visitable-test.gts | 4 +- apps/tutorial/tests/helpers/mocks.ts | 4 + apps/tutorial/vite.config.js | 31 ++-- package.json | 1 + pnpm-lock.yaml | 147 +++++++++++++----- 11 files changed, 188 insertions(+), 89 deletions(-) diff --git a/apps/tutorial/app/components/selection.gts b/apps/tutorial/app/components/selection.gts index ddc9a206f..88b38b2ba 100644 --- a/apps/tutorial/app/components/selection.gts +++ b/apps/tutorial/app/components/selection.gts @@ -6,7 +6,7 @@ import { service } from '@ember/service'; import FaIcon from '@fortawesome/ember-fontawesome/components/fa-icon'; import { faBars } from '@fortawesome/free-solid-svg-icons'; import { isCollection } from 'kolay'; -import { isNotHidden, titleize } from 'tutorial/utils'; +import { isNotHidden, lessonPath, titleize } from 'tutorial/utils'; import type RouterService from '@ember/routing/router-service'; import type DocsService from 'tutorial/services/docs'; @@ -32,10 +32,8 @@ export class Selection extends Component { this.router.transitionTo(event.target.value); }; - isSelected = (group: { path: string }, tutorial: { path: string }) => { - const fullPath = `/${group.path}/${tutorial.path}`; - - return this.docs.currentPath === fullPath; + isSelected = (tutorial: Parameters[0]) => { + return this.docs.currentPath === lessonPath(tutorial); };