test(e2e): Playwright coverage for all 4 example apps [closes #251]#282
Merged
EmersonBraun merged 1 commit intomainfrom Apr 15, 2026
Merged
test(e2e): Playwright coverage for all 4 example apps [closes #251]#282EmersonBraun merged 1 commit intomainfrom
EmersonBraun merged 1 commit intomainfrom
Conversation
EmersonBraun
added a commit
that referenced
this pull request
Apr 15, 2026
…oses #281] Manifesto principle 1 requires @agentskit/core to work in any environment (Node, Deno, edge, browser). The previous implementation imported node:fs/promises at module load via config.ts, which crashed every browser consumer at runtime with 'Module fs/promises has been externalized for browser compatibility.' This PR relocates the two Node-only helpers: createFileMemory (packages/core/src/memory.ts) -> fileChatMemory (packages/memory/src/file-chat.ts) loadConfig + AgentsKitConfig + LoadConfigOptions (packages/core/src/config.ts) -> @agentskit/cli (packages/cli/src/config.ts) What stays in @agentskit/core (all universal): createInMemoryMemory works in every environment createLocalStorageMemory already guards on typeof localStorage Consumer migrations: - Re-exports of createFileMemory from @agentskit/react and @agentskit/ink are dropped (they were always Node-only; browser consumers got a broken export) - apps/example-ink switched to fileChatMemory from @agentskit/memory - @agentskit/cli internals now import loadConfig from its own ./config Tests relocated: - packages/core/tests/config.test.ts -> packages/cli/tests/config.test.ts - packages/core/tests/memory.test.ts createFileMemory block split out -> packages/memory/tests/file-chat.test.ts Changeset declares: @agentskit/core major (breaking — exports removed) @agentskit/memory minor (new fileChatMemory export) @agentskit/cli minor (new loadConfig public export) @agentskit/react minor (dropped re-export) @agentskit/ink minor (dropped re-export) Verified: - packages/core/dist/*.js contains zero fs/path imports - apps/example-react mounts in a real browser (was empty root before) - pnpm build succeeds for every package - Ink test failure is pre-existing (ink@7 incompat fixed in #265), not caused by this change Unblocks the 5 browser-side E2E tests currently skipped in #282. Closes #281
This was referenced Apr 15, 2026
EmersonBraun
added a commit
that referenced
this pull request
Apr 15, 2026
…oses #281] Manifesto principle 1 requires @agentskit/core to work in any environment (Node, Deno, edge, browser). The previous implementation imported node:fs/promises at module load via config.ts, which crashed every browser consumer at runtime with 'Module fs/promises has been externalized for browser compatibility.' This PR relocates the two Node-only helpers: createFileMemory (packages/core/src/memory.ts) -> fileChatMemory (packages/memory/src/file-chat.ts) loadConfig + AgentsKitConfig + LoadConfigOptions (packages/core/src/config.ts) -> @agentskit/cli (packages/cli/src/config.ts) What stays in @agentskit/core (all universal): createInMemoryMemory works in every environment createLocalStorageMemory already guards on typeof localStorage Consumer migrations: - Re-exports of createFileMemory from @agentskit/react and @agentskit/ink are dropped (they were always Node-only; browser consumers got a broken export) - apps/example-ink switched to fileChatMemory from @agentskit/memory - @agentskit/cli internals now import loadConfig from its own ./config Tests relocated: - packages/core/tests/config.test.ts -> packages/cli/tests/config.test.ts - packages/core/tests/memory.test.ts createFileMemory block split out -> packages/memory/tests/file-chat.test.ts Changeset declares: @agentskit/core major (breaking — exports removed) @agentskit/memory minor (new fileChatMemory export) @agentskit/cli minor (new loadConfig public export) @agentskit/react minor (dropped re-export) @agentskit/ink minor (dropped re-export) Verified: - packages/core/dist/*.js contains zero fs/path imports - apps/example-react mounts in a real browser (was empty root before) - pnpm build succeeds for every package - Ink test failure is pre-existing (ink@7 incompat fixed in #265), not caused by this change Unblocks the 5 browser-side E2E tests currently skipped in #282. Closes #281
EmersonBraun
added a commit
that referenced
this pull request
Apr 15, 2026
…oses #281] (#283) Manifesto principle 1 requires @agentskit/core to work in any environment (Node, Deno, edge, browser). The previous implementation imported node:fs/promises at module load via config.ts, which crashed every browser consumer at runtime with 'Module fs/promises has been externalized for browser compatibility.' This PR relocates the two Node-only helpers: createFileMemory (packages/core/src/memory.ts) -> fileChatMemory (packages/memory/src/file-chat.ts) loadConfig + AgentsKitConfig + LoadConfigOptions (packages/core/src/config.ts) -> @agentskit/cli (packages/cli/src/config.ts) What stays in @agentskit/core (all universal): createInMemoryMemory works in every environment createLocalStorageMemory already guards on typeof localStorage Consumer migrations: - Re-exports of createFileMemory from @agentskit/react and @agentskit/ink are dropped (they were always Node-only; browser consumers got a broken export) - apps/example-ink switched to fileChatMemory from @agentskit/memory - @agentskit/cli internals now import loadConfig from its own ./config Tests relocated: - packages/core/tests/config.test.ts -> packages/cli/tests/config.test.ts - packages/core/tests/memory.test.ts createFileMemory block split out -> packages/memory/tests/file-chat.test.ts Changeset declares: @agentskit/core major (breaking — exports removed) @agentskit/memory minor (new fileChatMemory export) @agentskit/cli minor (new loadConfig public export) @agentskit/react minor (dropped re-export) @agentskit/ink minor (dropped re-export) Verified: - packages/core/dist/*.js contains zero fs/path imports - apps/example-react mounts in a real browser (was empty root before) - pnpm build succeeds for every package - Ink test failure is pre-existing (ink@7 incompat fixed in #265), not caused by this change Unblocks the 5 browser-side E2E tests currently skipped in #282. Closes #281
Closes #251. Adds end-to-end Playwright tests that exercise each example app, ensuring real demos don't regress silently. Coverage: example-runtime Node headless — spawns tsx, asserts stdout PASS example-ink Node terminal UI — spawns, checks first frame PASS example-react Vite + React SPA — dev server, navigate PASS* example-multi-agent Vite + React SPA — dev server, navigate PASS* * Browser-side mount tests (chat UI renders, send message) skipped with TODO(#281). @agentskit/core currently imports fs/promises which crashes browser consumers at runtime. The two SPA tests here still assert the Vite dev server starts and serves index HTML — catches bundle/build regressions. Full mount tests re-enable after #281 lands. Infrastructure: - playwright.config.ts — sequential workers (examples share ports), chromium only, 60s timeout, github reporter in CI - tests/e2e/helpers/dev-server.ts — shared startDevServer + runNodeExample helpers with stdout-based ready detection and clean SIGTERM teardown - .github/workflows/e2e.yml — runs on every PR and push to main, uploads playwright-report + test-results as artifacts (7-day retention) Scripts: - pnpm test:e2e — builds packages + runs all Playwright tests - pnpm test:e2e:ui — Playwright UI mode for local iteration Local result: 4 passed, 5 skipped, 0 failed. Refs #251 #281 #211
51c1956 to
f65ea65
Compare
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
End-to-end Playwright tests for every example app in the monorepo. Closes #251.
Coverage
example-runtimetsx, assert stdoutexample-inkexample-reactexample-multi-agent* Browser mount assertions (chat UI renders, send message, tool call visible) are
test.describe.skip-ed withTODO(#281). Root cause:@agentskit/coreimportsfs/promiseswhich crashes browser consumers at runtime — see #281 for the tracking issue. The two SPA tests still exercise Vite startup + index HTML, catching bundle/build regressions independently.Local result: 4 passed, 5 skipped, 0 failed.
Infrastructure
playwright.config.ts— sequential workers (examples share ports), chromium only, 60s timeout, github reporter in CItests/e2e/helpers/dev-server.ts— sharedstartDevServer+runNodeExamplehelpers with stdout-based ready detection and clean SIGTERM teardown.github/workflows/e2e.yml— runs on every PR and push to main; uploadsplaywright-report/+test-results/artifacts (7-day retention)Scripts
pnpm test:e2e— build packages + run all Playwright testspnpm test:e2e:ui— Playwright UI mode for local iterationWhy the
fs/promisesissue wasn't fixed in this PRScope discipline. Fixing it means moving
loadTsConfigout of@agentskit/coreinto@agentskit/cli(or similar), which touches a separate package's public surface. Lands as its own PR; tracked in #281 at P0 priority for the Phase 0 launch.Test plan
pnpm test:e2e→ 4 passed, 5 skipped (blocked by [Phase 0] @agentskit/core contains fs/promises import that breaks browser consumers #281)Refs #251 #281 #211