Skip to content

Add demo seed for first-run onboarding#1

Open
Zhao73 wants to merge 2 commits into
mainfrom
codex/demo-seed-onboarding
Open

Add demo seed for first-run onboarding#1
Zhao73 wants to merge 2 commits into
mainfrom
codex/demo-seed-onboarding

Conversation

@Zhao73

@Zhao73 Zhao73 commented Jun 1, 2026

Copy link
Copy Markdown
Owner

Summary

  • Add npm run demo:seed to create an idempotent local demo project, reference sample, style card, and queued planning job.
  • Document the playable first-run path in both Chinese and English READMEs.
  • Cover the demo seed behavior with a focused Vitest test.
  • Install pytest in CI before running Python tests so the workflow exercises the analyzer checks instead of failing on a missing command.

Verification

  • XIAOSHUO_HOME=$(mktemp -d) node node_modules/tsx/dist/cli.mjs scripts/seed-demo.ts
  • node node_modules/vitest/vitest.mjs run tests/ts/demo-seed.test.ts
  • pytest tests/python -q
  • gh run view 26769020498 --repo Zhao73/xiaoshuo-studio --log-failed to confirm the CI failure was pytest: command not found
  • npm test - blocked locally because repeated npm install attempts left next/server package files missing in node_modules; unrelated tests passed until Next route tests imported the incomplete Next package.
  • npm run lint - blocked locally by the same incomplete Next install (next/dist/compiled/babel-packages missing).
  • npm run build - blocked locally by the same incomplete Next install (next/dist/server/require-hook missing).

Risks

  • Narrow local-only onboarding change plus a CI dependency install. The seed is idempotent by demo project title and does not add runtime dependencies or alter production routes.

Zhao73 added 2 commits June 2, 2026 00:51
Add an idempotent demo data seed path so new users can open the local studio with a project, reference sample, style card, and queued planning job already visible. Document the flow in both READMEs and cover it with a focused Vitest case.

Constraint: Keep the change dependency-free and compatible with the existing local SQLite store.

Rejected: Hard-code demo fixtures in the UI | would make the real empty local state less honest.

Confidence: high

Scope-risk: narrow

Tested: XIAOSHUO_HOME=/var/folders/5h/_fph5b9d3wzfbcfxj31pxt0w0000gn/T/tmp.Z7jziSNV7N node node_modules/tsx/dist/cli.mjs scripts/seed-demo.ts

Tested: node node_modules/vitest/vitest.mjs run tests/ts/demo-seed.test.ts

Tested: pytest tests/python -q

Not-tested: Full npm test, npm run lint, npm run build blocked by incomplete local npm install leaving Next package files missing.
Install pytest in the GitHub Actions job before running the Python analyzer tests. The workflow already declared Python 3.11 but did not install the test runner, so clean CI failed before exercising the tests.

Constraint: Preserve the existing npm and Python verification sequence.

Confidence: high

Scope-risk: narrow

Tested: gh run view 26769020498 --repo Zhao73/xiaoshuo-studio --log-failed

Not-tested: Fresh GitHub Actions rerun pending after push.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant