Skip to content

feat(playtest): add asset selection entry - #213

Merged
xyh202131 merged 3 commits into
1024XEngineer:mainfrom
huyanxius:fix/playtest-issue
Aug 11, 2026
Merged

feat(playtest): add asset selection entry#213
xyh202131 merged 3 commits into
1024XEngineer:mainfrom
huyanxius:fix/playtest-issue

Conversation

@huyanxius

@huyanxius huyanxius commented Aug 11, 2026

Copy link
Copy Markdown
Collaborator

补齐 PlayTest 的稳定入口与资产选择前置页,让用户在进入试玩台前先选择具备可播放帧的角色造型,并可从角色详情直接进入试玩。

Why

原有 PlayTest 只能通过带有角色与造型 ID 的深层路由访问,顶层导航没有可靠落点;没有资产时也缺少清晰的引导界面。

Changes

  • 在全局 Header 增加 PlayTest 入口与激活态。
  • 新增受登录保护的 PlayTest 资产选择页,覆盖可试玩、待补帧、空状态和请求失败状态。
  • 在角色详情页为具备动作帧的造型增加“试玩当前造型”入口。
  • 增加彩色点阵横版场景,保留连续背景、跑跳人物、静止地面和障碍物。

Implementation

  • /playtest 作为稳定前置路由,具体试玩仍沿用 /playtest/:characterId/:outfitId
  • 动画使用 Canvas 绘制;人物与障碍物时序由纯模型提供,避免循环接缝并便于测试。
  • 测试与业务实现分为独立提交,不包含本地账号、环境数据或调试数据库。

Verification

  • npm run format:check:通过
  • npm run lint:通过,无警告
  • npm run typecheck:通过
  • npm run test:30 个测试文件、218 项测试通过
  • npm run build:通过
  • uv run ruff check .:通过
  • uv run lint-imports:2 个契约通过
  • uv run pytest -q:88 项测试通过
  • git diff --check:通过

Screenshots

Header

Header PlayTest entry

PlayTest Entry

PlayTest asset selection entry

Scope

  • 本 PR 不包含 PlayTest 播放器本身的行为改造。
  • 按本次要求仅提供桌面截图,不执行移动端截图验收。

@vercel

vercel Bot commented Aug 11, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
windup Ready Ready Preview Aug 11, 2026 10:24am

@fennoai fennoai 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.

Review Summary

Found two correctness issues in the new asset-entry and reduced-motion canvas paths.

View job run

Comment thread frontend/src/pages/playtest/entry.tsx
Comment thread frontend/src/pages/playtest/pixel-stage.tsx
PlayTest had no stable navigation target without a selected character and outfit.

Add protected asset selection, header and character-detail entry points, and the animated dot-matrix stage.

Users can now discover PlayTest and choose a playable outfit before entering the workbench.
The new PlayTest surfaces need regression coverage across authentication, navigation, and asset states.

Cover header activation, guest return paths, character-detail links, entry states, and animation timing.

The tests protect the complete selection flow without relying on Canvas rendering in jsdom.
@codecov

codecov Bot commented Aug 11, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 94.59459% with 10 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
frontend/src/pages/playtest/pixel-stage.tsx 96.18% 0 Missing and 5 partials ⚠️
frontend/src/pages/playtest/entry.tsx 90.47% 0 Missing and 4 partials ⚠️
frontend/src/pages/character-detail/index.tsx 50.00% 0 Missing and 1 partial ⚠️

📢 Thoughts on this report? Let us know!

Codecov reported the new canvas implementation as uncovered because the existing test stopped at a null rendering context.

Run representative animation frames against a focused canvas double and verify the continuous scheduling and cleanup lifecycle.

The Playtest entry and pixel stage now reach full line coverage in the targeted coverage run.
@xyh202131
xyh202131 merged commit e91192f into 1024XEngineer:main Aug 11, 2026
7 checks passed
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.

2 participants