Skip to content

test(stackflow-spa): add browser E2E coverage - #1802

Open
junghyeonsu wants to merge 11 commits into
devfrom
e2e/image-loading-behavior
Open

test(stackflow-spa): add browser E2E coverage#1802
junghyeonsu wants to merge 11 commits into
devfrom
e2e/image-loading-behavior

Conversation

@junghyeonsu

@junghyeonsu junghyeonsu commented Jul 22, 2026

Copy link
Copy Markdown
Contributor

요약

  • Playwright E2E 소유권을 docs Storybook에서 examples/stackflow-spa로 이동했습니다.
  • 기존 ImageFrame/Avatar 계약 5개와 Stackflow 핵심 계약 8개를 실제 SPA에서 검증합니다.
  • Pixel 7 Chromium과 iPhone 13 WebKit에서 13개 논리 테스트를 각각 실행합니다.

주요 변경

  • stackflow-spa에 Playwright 설정, e2e/e2e:ui 스크립트, 공통 helper와 테스트를 추가했습니다.
  • 홈에 노출되지 않는 /e2e/image-behavior Activity에서 lazy/loading/error/overlay 상태를 통제합니다.
  • 기존 PopTest, AnimateFalseTest, TransitionStyle Activity에는 action용 data-testid만 추가했습니다.
  • 정착 상태는 top activity 1개, enter-done, 실제 x=0, AppBar opacity=1, swipe idle로 판정합니다.
  • swipe는 Chromium CDP 없이 touchstart/touchmove/touchend dispatch로 두 브라우저에서 실행합니다.
  • docs의 E2E fixture, 조건부 Storybook glob, Playwright 설정과 스크립트를 제거했습니다. 일반 Storybook/Chromatic 스토리는 유지합니다.
  • CI는 Chromium과 WebKit을 설치하고 SPA E2E를 실행하며, 실패 시 trace가 포함된 HTML report를 업로드합니다.

테스트 범위

이미지 계약 5개

  1. 뷰포트 밖 lazy 이미지의 로딩 상태와 레이아웃 유지 및 스크롤 후 로드
  2. 보류 이미지와 fallback의 겹침 및 fallback interaction
  3. 요청 실패 시 이미지 숨김과 fallback 채움
  4. ImageFrame badge/icon/indicator/reaction overlay hit-test
  5. Avatar badge hit-test

Stackflow 계약 8개

  1. URL, browser back/forward, 404 route 복원
  2. 세 transition style의 push/pop 정착
  3. pop(2)와 동시 pop(); pop();의 정확한 착지
  4. animated push 후 pop({ animate: false }) 정착
  5. 임계값 미만 swipe 취소와 callback
  6. 임계값 이상 swipe pop과 callback
  7. preventSwipeBack의 edge 제거와 stack 보존
  8. top layer focus 및 iframe 부모 scroll 보존

검증

  • bun generate:all: 예상 밖 generated diff 없음
  • bun test:all: unit 1,314개 + Lynx 63개 통과
  • bun --filter @seed-design/stackflow-spa build: 통과
  • SPA E2E: 13개 x 2개 브라우저 = 26/26 통과
  • git diff --check: 통과
  • negative control:
    • 로딩 중 이미지를 다시 숨기면 ImageFrame 테스트 실패
    • Stackflow 정착 safety-net 제거 시 animate:false의 x 오프셋과 동시 pop의 AppBar opacity 잔여값을 각각 검출

범위

공개 패키지 API 변경은 없습니다. 테스트 전용 route와 예제 앱의 data-testid만 추가했으며, 기존 수동 QA Activity는 홈에서 계속 접근할 수 있습니다.

Summary by CodeRabbit

  • 새로운 기능

    • 이미지 지연 로딩, 로드 실패 시 대체 화면, 오버레이 및 배지 상호작용을 확인할 수 있는 테스트 화면이 추가되었습니다.
    • 이미지 동작 예시 화면으로 이동하고 홈 또는 뒤로가기로 돌아올 수 있습니다.
    • 애니메이션 전환, 뒤로가기 스와이프, 브라우저 기록 복원 등 주요 화면 전환 시나리오가 검증됩니다.
  • 테스트

    • 모바일 Chromium 및 WebKit 환경을 포함한 자동화된 E2E 테스트가 추가되었습니다.
    • 테스트 실패 시 실행 결과와 리포트를 확인할 수 있습니다.

@changeset-bot

changeset-bot Bot commented Jul 22, 2026

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: 99a3aa3

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@coderabbitai

coderabbitai Bot commented Jul 22, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

📝 Walkthrough

Walkthrough

Stackflow SPA에 Playwright 기반 E2E 환경을 추가했습니다. 화면 전환, pop, swipe-back, iframe 동작과 이미지 상태 및 overlay 상호작용을 검증합니다. GitHub Actions에서 Chromium과 WebKit 테스트를 실행합니다.

Changes

Stackflow SPA E2E 검증

Layer / File(s) Summary
E2E 실행 기반
.github/workflows/e2e-test.yml, examples/stackflow-spa/playwright.config.ts, examples/stackflow-spa/e2e/AGENTS.md, .gitignore
Playwright 실행 설정과 모바일 브라우저 프로젝트를 추가했습니다. GitHub Actions에서 Chromium과 WebKit E2E 테스트를 실행합니다. 실패한 리포트를 7일간 보관합니다.
Stackflow 내비게이션 검증
examples/stackflow-spa/e2e/stackflow-helpers.ts, examples/stackflow-spa/e2e/stackflow.e2e.ts, examples/stackflow-spa/src/activities/ActivityAnimateFalseTest.tsx, examples/stackflow-spa/src/activities/ActivityPopTest.tsx, examples/stackflow-spa/src/activities/ActivityTransitionStyle.tsx
화면 push, browser history 복원, 404, transition style, pop, animate: false, swipe-back, preventSwipeBack, focus 및 iframe 부모 스크롤을 검증합니다.
이미지 동작 검증
examples/stackflow-spa/src/activities/ActivityE2EImageBehavior.tsx, examples/stackflow-spa/src/stackflow/Stack.tsx, examples/stackflow-spa/src/stackflow/stackflow.config.ts, examples/stackflow-spa/e2e/image-behavior.e2e.ts
E2E 전용 이미지 화면과 경로를 추가했습니다. lazy loading, fallback, 오류 상태, ImageFrame overlay 및 Avatar badge의 동작과 hit-test를 검증합니다.

Estimated code review effort: 3 (Moderate) | ~25 minutes

Sequence Diagram(s)

sequenceDiagram
  participant Playwright
  participant StackflowSPA
  participant BrowserHistory
  Playwright->>StackflowSPA: 화면 push 또는 swipe-back 수행
  StackflowSPA->>BrowserHistory: URL 상태 갱신
  BrowserHistory-->>StackflowSPA: back 또는 forward 상태 복원
  Playwright->>StackflowSPA: settled 상태와 top activity 검증
Loading

Possibly related PRs

  • daangn/seed-design#1650: ActivityPopTest의 동시 pop() 동작을 E2E 테스트로 검증합니다.
  • daangn/seed-design#1868: ActivityAnimateFalseTestanimate: false pop 시나리오와 관련된 테스트 선택자를 추가합니다.
🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed 제목은 stackflow-spa에 브라우저 기반 E2E 테스트 커버리지를 추가하는 주요 변경 사항을 간결하고 명확하게 설명합니다.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches 💡 2
📝 Generate docstrings 💡
  • Create stacked PR
  • Commit on current branch
⚔️ Resolve merge conflicts 💡
  • Resolve merge conflict in branch e2e/image-loading-behavior
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch e2e/image-loading-behavior

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@github-actions

github-actions Bot commented Jul 22, 2026

Copy link
Copy Markdown
Contributor

Alpha Preview (Stackflow SPA)

@github-actions

github-actions Bot commented Jul 22, 2026

Copy link
Copy Markdown
Contributor

Alpha Preview (Storybook)

@junghyeonsu junghyeonsu self-assigned this Jul 22, 2026
@junghyeonsu
junghyeonsu marked this pull request as draft July 22, 2026 07:34
@junghyeonsu
junghyeonsu force-pushed the e2e/image-loading-behavior branch from c53bf2a to d8c87ef Compare July 22, 2026 08:19
@github-actions

github-actions Bot commented Jul 22, 2026

Copy link
Copy Markdown
Contributor

Alpha Preview (Docs)

@junghyeonsu
junghyeonsu force-pushed the e2e/image-loading-behavior branch 5 times, most recently from 13f89c3 to 8a8f4c3 Compare August 4, 2026 08:52
Base automatically changed from claude/imageframe-lazy-loading-lcp-ea5c38 to dev August 4, 2026 09:28
junghyeonsu and others added 3 commits August 4, 2026 18:45
Cover the image loading regression in a real browser, the only layer where
it is observable: happy-dom has no layout engine, and Chromatic sees
identical pixels for a stuck frame and a loading one.

- lazy deadlock: assert both sides (deferred before scroll, loaded after)
- loading invariant: image keeps its box, fallback sits behind it
- error state: image hidden, fallback fills the frame
- overlay hit-tests: badge/icon/indicator/reaction stay above the image

Tests are named *.e2e.ts so `bun test` never collects them.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Mirrors the existing test workflows: same setup action with prebuilt
packages, Chromium installed from the workspace Playwright version, and the
Playwright report uploaded when the run fails.

The config now spawns a fresh Storybook on CI instead of reusing one, keeps
retries off so flakes stay visible, and retains a trace on the first failure
since that is the only post-mortem signal a CI run leaves behind.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Lowering the fallback behind the image left it covered for hit-testing,
so an interactive node passed as `fallback` was unreachable until load.
#1791 fixed that with pointer-events on the not-yet-loaded content; this
pins it. elementFromPoint is the only way to observe it — the pixels are
identical either way, so neither Chromatic nor a unit test can see it.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@junghyeonsu
junghyeonsu force-pushed the e2e/image-loading-behavior branch from 14a6257 to 87f8256 Compare August 4, 2026 09:45
junghyeonsu and others added 6 commits August 4, 2026 20:24
The fixtures lived beside the real stories and relied on a per-story
chromatic.disableSnapshot to stay out of snapshots. Forgetting it snapshots
a 12000px spacer or a deliberately-stalled loading state, so the cost of the
mistake is a flaky visual baseline and the only thing preventing it was
remembering a parameter on every new fixture.

Move them to docs/e2e/*.fixture.tsx next to the tests that use them, and
collect that glob only when STORYBOOK_E2E is set, which Playwright's
webServer does. Chromatic and the deployed Storybook build through
build-storybook without it, so the fixtures are not merely skipped there —
they do not exist. No disableSnapshot remains in the repo.

Fixture story ids move under an E2E/ title, and storybook:e2e runs a dev
server with the fixtures for local debugging.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Storybook's CSF indexer only matches files containing `.stories.`, so
*.fixture.tsx had no matching indexer and the whole index 500'd — every
story disappeared, which is why even the untouched overlay test failed.

Measured after the rename: with STORYBOOK_E2E the index has 361 stories
including the three e2e- fixtures, without it 358 and none of them.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
The previous shape leaned on a STORYBOOK_E2E variable threaded through
main.ts, playwright.config.ts and a package script, and on filenames that
differed by one segment — image-frame.e2e.ts next to
image-frame.e2e.stories.tsx.

Put the fixtures in e2e/fixtures/ so the directory carries the meaning and
the files keep the plain .stories.tsx name the Storybook indexer requires.
Collect that glob whenever NODE_ENV is not production: Chromatic and the
deploy both run storybook build, so the fixtures cannot reach a snapshot,
while a plain `bun run storybook` still shows them for debugging.

Measured: storybook build emits 358 stories with no e2e- entries.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
webpack derives chunk names from the story file's basename, not its path,
so e2e/fixtures/avatar.stories.tsx and stories/Avatar.stories.tsx differ
only in casing and the dev server refuses to start. Only dev enables both
globs, which is why storybook build was fine and the webServer timed out.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
The reasoning lives in the pull request description, including the two
filename constraints that are easy to mistake for style: the -e2e suffix
avoids a webpack chunk-name collision with stories/Avatar.stories.tsx, and
.stories. is what the Storybook indexer matches on.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@junghyeonsu junghyeonsu changed the title test(docs): add Playwright E2E for image loading behavior test(stackflow-spa): 브라우저 E2E 커버리지 추가 Aug 10, 2026
@junghyeonsu junghyeonsu changed the title test(stackflow-spa): 브라우저 E2E 커버리지 추가 test(stackflow-spa): add browser E2E coverage Aug 10, 2026
@junghyeonsu
junghyeonsu marked this pull request as ready for review August 10, 2026 09:21

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 3

🧹 Nitpick comments (1)
examples/stackflow-spa/e2e/stackflow-helpers.ts (1)

5-39: 📐 Maintainability & Code Quality | 🔵 Trivial | 🏗️ Heavy lift

E2E locator를 접근성 role 또는 data-testid로 통일하세요.

현재 테스트는 data-part, 상태 속성, CSS selector, 표시 텍스트에 의존합니다. 이 선택자는 Stackflow 내부 DOM 구조와 UI 문구 변경에 취약합니다. 버튼은 getByRole("button", { name })로 선택하세요. 전환 상태, edge, iframe처럼 role이 없는 대상은 테스트 전용 data-testid를 제공하고 getByTestId를 사용하세요.

  • examples/stackflow-spa/e2e/stackflow-helpers.ts#L5-L39: data-part 및 상태 속성 selector를 data-testid 또는 접근성 role 기반 locator로 교체하세요.
  • examples/stackflow-spa/e2e/stackflow.e2e.ts#L16-L18: getByText 및 CSS 기반 locator를 role 또는 data-testid 기반 locator로 교체하세요.

As per coding guidelines, “locator는 접근성 role이나 data-testid를 사용하고 CSS class 및 인라인 style 문자열에 의존하지 않는다” 규칙을 적용해야 합니다.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@examples/stackflow-spa/e2e/stackflow-helpers.ts` around lines 5 - 39, Update
topActivity and expectStackSettled in
examples/stackflow-spa/e2e/stackflow-helpers.ts#L5-L39 to replace data-part,
state-attribute, and CSS selectors with getByRole or getByTestId locators,
adding test IDs where role-based selection is unavailable. Also update
examples/stackflow-spa/e2e/stackflow.e2e.ts#L16-L18 to replace getByText and
CSS-based locators with accessible role or test-ID locators; apply this
consistently without relying on internal DOM structure or styling strings.

Source: Coding guidelines

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@examples/stackflow-spa/e2e/image-behavior.e2e.ts`:
- Around line 35-36: Update the navigation in the image-behavior test after the
HELD_IMAGE_URL route so page.goto uses the domcontentloaded wait condition,
allowing navigation to complete without waiting for the held image and timing
out.

In `@examples/stackflow-spa/src/activities/ActivityE2EImageBehavior.tsx`:
- Around line 27-30: Update the ActivityE2EImageBehavior registration in the
declare module "`@stackflow/config`" block to use {} instead of Record<string,
never> for activities without Stackflow params.

In `@examples/stackflow-spa/src/stackflow/stackflow.config.ts`:
- Line 11: Move the ActivityE2EImageBehavior entry within the activities array
so its /e2e/image-behavior route appears after /detail and before /error-state,
preserving alphabetical route order and the existing kebab-case naming.

---

Nitpick comments:
In `@examples/stackflow-spa/e2e/stackflow-helpers.ts`:
- Around line 5-39: Update topActivity and expectStackSettled in
examples/stackflow-spa/e2e/stackflow-helpers.ts#L5-L39 to replace data-part,
state-attribute, and CSS selectors with getByRole or getByTestId locators,
adding test IDs where role-based selection is unavailable. Also update
examples/stackflow-spa/e2e/stackflow.e2e.ts#L16-L18 to replace getByText and
CSS-based locators with accessible role or test-ID locators; apply this
consistently without relying on internal DOM structure or styling strings.
🪄 Autofix

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: 064fe05d-e1cd-44a1-9792-f7a5030e1476

📥 Commits

Reviewing files that changed from the base of the PR and between 3a174d0 and 99a3aa3.

⛔ Files ignored due to path filters (2)
  • bun.lock is excluded by !**/*.lock
  • examples/stackflow-spa/package.json is excluded by !**/package.json
📒 Files selected for processing (14)
  • .github/workflows/e2e-test.yml
  • .gitignore
  • docs/stories/Avatar.stories.tsx
  • examples/stackflow-spa/e2e/AGENTS.md
  • examples/stackflow-spa/e2e/image-behavior.e2e.ts
  • examples/stackflow-spa/e2e/stackflow-helpers.ts
  • examples/stackflow-spa/e2e/stackflow.e2e.ts
  • examples/stackflow-spa/playwright.config.ts
  • examples/stackflow-spa/src/activities/ActivityAnimateFalseTest.tsx
  • examples/stackflow-spa/src/activities/ActivityE2EImageBehavior.tsx
  • examples/stackflow-spa/src/activities/ActivityPopTest.tsx
  • examples/stackflow-spa/src/activities/ActivityTransitionStyle.tsx
  • examples/stackflow-spa/src/stackflow/Stack.tsx
  • examples/stackflow-spa/src/stackflow/stackflow.config.ts

Comment on lines +35 to +36
await page.route(HELD_IMAGE_URL, () => {});
await page.goto("/e2e/image-behavior");

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🩺 Stability & Availability | 🟠 Major | ⚡ Quick win

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo "== Locate file =="
fd -a 'image-behavior\.e2e\.ts$' . || true

echo "== Inspect relevant file =="
file="$(fd 'image-behavior\.e2e\.ts$' . | head -n1 || true)"
if [ -n "${file:-}" ]; then
  wc -l "$file"
  sed -n '1,120p' "$file" | cat -n
fi

echo "== Search related route/page goto patterns =="
rg -n "HELD_IMAGE_URL|page\.route|page\.goto|waitUntil|domcontentloaded|load" examples/stackflow-spa/e2e -S || true

echo "== Package Playwright version =="
if [ -f package.json ]; then
  jq '.devDependencies.playwright, .dependencies.playwright' package.json -r || true
fi
if [ -f examples/stackflow-spa/e2e/package.json ]; then
  jq '.devDependencies.playwright, .dependencies.playwright' examples/stackflow-spa/e2e/package.json -r || true
fi

Repository: daangn/seed-design

Length of output: 7484


🌐 Web query:

Playwright page.route matching requests wait until route fulfilled aborted continued documentation

💡 Result:

In Playwright, page.route() registers a handler for network requests that match a specified URL pattern [1][2]. When a request is intercepted, Playwright pauses the request, and it will remain "stalled" or "pending" until your handler explicitly resolves it using one of the terminal actions: route.fulfill(), route.abort(), or route.continue() [2][3]. Key behaviors regarding request handling: 1. Mandatory Resolution: Once a request is intercepted, you are obligated to perform exactly one terminal action on it [3]. If your handler matches a request but fails to call one of these methods (e.g., due to an unhandled logic branch), the request will hang indefinitely, often leading to a test timeout [3]. 2. Non-blocking/Asynchronous Nature: page.route() itself does not wait for requests to occur; it only registers the handler [4]. Because there is no implicit waiting for requests to hit the route, you must ensure your handlers are registered before the expected network activity occurs to avoid race conditions [4][5]. 3. Terminal Actions: - route.fulfill: Mocks the response entirely, sending a custom response back to the browser without contacting the network [3]. - route.abort: Fails the request as if a network error occurred [1][3]. - route.continue: Sends the request to the network, optionally with modified headers, method, URL, or post data [1][6][3]. 4. Chaining Handlers: If multiple routes match the same request, they are executed in the reverse order of their registration (last registered first) [6][7]. You can use route.fallback() within a handler to invoke the next matching route in the chain rather than immediately resolving the request [6][7]. If you use route.continue() or route.fulfill(), no further (less recently registered) handlers will be invoked for that request [6][7]. If you need to ensure a test waits for a specific request to be processed, you should pair page.route() with synchronization primitives like page.waitForRequest() or page.waitForResponse() where appropriate [4][5].

Citations:


🌐 Web query:

Playwright page.goto waitUntil default load documentation API

💡 Result:

In the Playwright API, the page.goto method includes an optional waitUntil parameter that determines when the navigation operation is considered successful [1][2]. The default value for this parameter is 'load' [1][2]. The available options for the waitUntil parameter are [3][2]: 'load': The operation is considered finished when the 'load' event is fired. This is the default behavior [3][1]. 'domcontentloaded': The operation is considered finished when the 'DOMContentLoaded' event is fired [3][2]. 'networkidle': The operation is considered finished when there are no network connections for at least 500 ms [3][2]. Note that Playwright explicitly discourages the use of 'networkidle' for testing; it is recommended to use web assertions to assess page readiness instead [3][2]. 'commit': The operation is considered finished when the network response is received and the document has started loading [3][1].

Citations:


보류된 이미지 navigation의 대기 상태를 domcontentloaded로 바꾸세요.

Line 36의 page.route(HELD_IMAGE_URL, () => {})는 해당 요소를 계속 유지합니다. 현재는 Page가 load를 기다리는 기본 동작으로 인해 이 navigation이 timeout될 수 있습니다.

수정 예시
-    await page.goto("/e2e/image-behavior");
+    await page.goto("/e2e/image-behavior", { waitUntil: "domcontentloaded" });
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
await page.route(HELD_IMAGE_URL, () => {});
await page.goto("/e2e/image-behavior");
await page.route(HELD_IMAGE_URL, () => {});
await page.goto("/e2e/image-behavior", { waitUntil: "domcontentloaded" });
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@examples/stackflow-spa/e2e/image-behavior.e2e.ts` around lines 35 - 36,
Update the navigation in the image-behavior test after the HELD_IMAGE_URL route
so page.goto uses the domcontentloaded wait condition, allowing navigation to
complete without waiting for the held image and timing out.

Comment on lines +27 to +30
declare module "@stackflow/config" {
interface Register {
ActivityE2EImageBehavior: Record<string, never>;
}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win

Stackflow params 타입을 {}로 변경하세요.

이 activity는 Stackflow params를 사용하지 않습니다. Record<string, never> 대신 가이드라인이 요구하는 {}를 선언하세요.

수정 예시
 interface Register {
-  ActivityE2EImageBehavior: Record<string, never>;
+  ActivityE2EImageBehavior: {};
 }

As per coding guidelines, Activities without Stackflow params should declare params as \{}` in the `declare module "@stackflow/config"` block`.

📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
declare module "@stackflow/config" {
interface Register {
ActivityE2EImageBehavior: Record<string, never>;
}
declare module "`@stackflow/config`" {
interface Register {
ActivityE2EImageBehavior: {};
}
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@examples/stackflow-spa/src/activities/ActivityE2EImageBehavior.tsx` around
lines 27 - 30, Update the ActivityE2EImageBehavior registration in the declare
module "`@stackflow/config`" block to use {} instead of Record<string, never> for
activities without Stackflow params.

Source: Coding guidelines

{ route: "/404", name: "ActivityNotFound" },
{ route: "/pop-test", name: "ActivityPopTest" },
{ route: "/animate-false-test", name: "ActivityAnimateFalseTest" },
{ route: "/e2e/image-behavior", name: "ActivityE2EImageBehavior" },

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win

route를 알파벳순 위치로 이동하세요.

/e2e/image-behavior/accordion보다 뒤에 와야 합니다. 이 항목을 /detail 뒤와 /error-state 앞에 배치하세요.

As per coding guidelines, Register activity routes in \src/stackflow/stackflow.config.ts` in the `activities` array using kebab-case route names, maintaining alphabetical order`.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@examples/stackflow-spa/src/stackflow/stackflow.config.ts` at line 11, Move
the ActivityE2EImageBehavior entry within the activities array so its
/e2e/image-behavior route appears after /detail and before /error-state,
preserving alphabetical route order and the existing kebab-case naming.

Source: Coding guidelines

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