Storybook для npm/ компонентів#6
Merged
Merged
Conversation
Snapshot of in-progress Storybook setup (stories, .storybook config, stryker/vitest-browser wiring) before rebasing onto current main. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
…ACP migration Resolved conflicts by keeping main's newer stories/preview.js/icon-fix (ACP-updated AgentDialog mock, more story variants, iconSet+iconMapFn combo for internal Quasar icons) and layering this branch's unique contribution on top: named vitest project "storybook" in vitest.config.mjs wired to the @7n/test coverage contract, an isolated vitest.stryker.config.mjs (Stryker's vitest-runner can't initialize a config with a browser/Playwright project), and @7n/test + peers in root devDependencies. Root package.json also picks up main's @nitra/cursor -> @7n/rules migration while keeping the coverage-related additions. Verified post-merge: unit (23/23) and storybook (20/20) vitest projects pass, `bunx 7n-test coverage` produces both JS and Vue (Storybook) rows without the Stryker crash.
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/src/components/:AgentDialog,AuditDialog,BaseDialog,DialogActions,RequestView,StatePill— по одному*.stories.jsна компонент, з реалістичними моками (agent-gateway дляAgentDialog/AuditDialog, без реального omlx/Tauri виклику).npm/vitest.config.mjsдоповнено named vitest-проєктом"storybook"(@storybook/addon-vitest, Playwright Chromium, browser mode) поряд із наявним"unit"-проєктом — точно за контрактом, який очікує@7n/test coverage(--project=storybook/--project=!storybook), щоб з'явився окремий рядокVue (Storybook)уCOVERAGE.md.@stryker-mutator/vitest-runnerне вміє ініціалізувати vitest-конфіг ізprojects-масивом, що містить browser/Playwright-проєкт — винесено ізольованийnpm/vitest.stryker.config.mjs(лише unit-налаштування), на який тепер вказуєstryker.config.mjs#vitest.configFile; звичайне JS mutation-тестування знову проходить без крашу.npm/package.json#devDependenciesотримав Storybook-тулчейн (storybook,@storybook/vue3-vite,@storybook/addon-vitest,@vitest/browser,@vitest/browser-playwright,playwright) — навмисний виняток із загальної конвенції "лише runtime-deps у published package.json":@7n/test'sisStorybookRoot()детектує Storybook-workspace саме за цим файлом.npm/package.json#filesдоповнено"!**/*.stories.*", щоб stories не потрапляли у published tarball.package.jsonотримав@7n/test(+@vitest/coverage-v8,@stryker-mutator/core,@stryker-mutator/vitest-runner) — раніше був відсутній попри те, щоcoverage-скрипт на нього розраховував.Test plan
cd npm && bunx vitest run --project=unit— 44/44 (без браузера)cd npm && bunx vitest run --project=storybook— 6/6 story-файлів, 14/14 тестівbunx storybook dev -p 6006— візуальна перевірка в браузері (усі 6 компонентів, включно зAgentDialog/AuditDialogна мокованому agent, іclose-popup/іконки через кастомнийiconMapFn)bunx @7n/test coverage(з кореня,@7n/test@0.16.1) — рядокVue (Storybook)з'являється вCOVERAGE.mdпоряд зJSoxlint/eslint) чистий на всіх нових/змінених файлахNotes for reviewer
COVERAGE.mdіnpm/reports/coverage-classify.cache.jsonу diff — артефакти прогону@7n/test coverageпід час верифікації; можна прибрати/gitignore-нути окремим коммітом, якщо не потрібні в репо.sym_o_*без власногоiconMapFnпоказувались би як ligature-текст — виправлено через$q.iconMapFn, що мапить на SVG з@quasar/extras/material-symbols-outlined(задокументовано вpreview.js)./n-llm-patchдля@7n/rules(виняток*.stories.*з doc-gate) — не входить у цей PR.🤖 Generated with Claude Code