Add demo seed for first-run onboarding#1
Open
Zhao73 wants to merge 2 commits into
Open
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
npm run demo:seedto create an idempotent local demo project, reference sample, style card, and queued planning job.pytestin 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.tsnode node_modules/vitest/vitest.mjs run tests/ts/demo-seed.test.tspytest tests/python -qgh run view 26769020498 --repo Zhao73/xiaoshuo-studio --log-failedto confirm the CI failure waspytest: command not foundnpm test- blocked locally because repeatednpm installattempts leftnext/serverpackage files missing innode_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-packagesmissing).npm run build- blocked locally by the same incomplete Next install (next/dist/server/require-hookmissing).Risks