Files
nexu-io__open-design/apps/daemon/tests/assemble-example-title-patterns.test.ts
Joey-nexu f1a0b60c6c chore: unify product name display to OpenDesign repo-wide (#6998)
* chore: unify product name display to OpenDesign repo-wide

Rename the user-facing product name from "Open Design" to "OpenDesign"
across documentation, web/desktop UI strings, i18n locales, prompts,
plugin/skill/design-system content, changelogs, and specs, matching the
landing-page rename already in flight.

Deliberately excluded so installed-app identity stays untouched:
- packages/release PRODUCT_NAME and everything derived from it
  (app bundle names, installer/registry identity, updater feeds)
- tools/pack, tools/release, apps/packaged, landing page (PR #6983)
- mocks/ recorded traces and LICENSE
- test fixtures and comments that encode real on-disk install paths
  (Open Design.app, Program Files\Open Design, AppData paths)

Validated with pnpm guard, pnpm typecheck, and targeted web/desktop/host
test runs over the renamed strings.

* fix(web): keep two-letter author monogram for CamelCase brand names

authorInitials split words on whitespace only, so the renamed single-token
author name "OpenDesign" produced a one-letter monogram. Treat lower-to-upper
CamelCase boundaries as word breaks so the avatar fallback stays "OD".

* fix(release): restore spaced Windows source artifact names in win.ps1

tools/pack still derives builder outputs from the unchanged PRODUCT_NAME
("Open Design"), so the asset script must look for the spaced filenames.
Matches the mac/mac-intel/linux asset scripts, which were already kept on
the original names.

---------

Co-authored-by: Joey <236967869+joeylee12629-star@users.noreply.github.com>
2026-08-18 07:09:45 +00:00

20 lines
906 B
TypeScript

// Regression (#6795): `assembleExample` interpolates skill-derived slide HTML
// and titles verbatim. A string replacement would expand `$$`, `$&`, `$`` and
// `$'` through String.prototype.replace's GetSubstitution and corrupt them.
import assert from 'node:assert/strict';
import { test } from 'vitest';
import { assembleExample } from '../src/routes/static-resource.js';
test('assembleExample keeps replacement-pattern sequences verbatim', () => {
const template = '<html><head><title>Old</title></head><body><!-- SLIDES_HERE --></body></html>';
const slides = '<section>Save $$$ deck</section>';
for (const title of ['Save $$$ This Quarter', "Rock $'n Roll Tour", 'Before $& After', 'Backtick $` Pattern']) {
assert.equal(
assembleExample(template, slides, title),
`<html><head><title>${title} | OpenDesign Example</title></head><body>${slides}</body></html>`,
);
}
});