Skip to content

feat(playtest): support four and eight way directional assets - #368

Open
xyh202131 wants to merge 1 commit into
1024XEngineer:mainfrom
xyh202131:fix/playtest-action-keybindings
Open

feat(playtest): support four and eight way directional assets#368
xyh202131 wants to merge 1 commit into
1024XEngineer:mainfrom
xyh202131:fix/playtest-action-keybindings

Conversation

@xyh202131

@xyh202131 xyh202131 commented Aug 18, 2026

Copy link
Copy Markdown
Contributor

Summary

  • add the four/eight-direction character playback contract consumed by Playtest
  • map real source sequences and explicit mirror metadata without inventing missing directions
  • support directional facing, movement, action switching, key bindings, and touch controls in the Playtest workbench
  • keep A/D turning available without walk/run while preventing non-locomotion actions from moving the character

Scope

This PR contains only the Character direction contract required by Playtest and frontend/src/pages/playtest/**. Directional asset generation, Workflow Controller, Quick Start, Workflow Editor, and export changes are intentionally split into a separate PR.

Validation

  • npm run typecheck
  • npm run lint
  • Playtest/Character focused frontend tests: 109 passed
  • Character API backend tests: 27 passed
  • Ruff format and lint checks passed
  • Full frontend suite: 714 passed; the unchanged workflow-editor-route.test.tsx exceeded its existing 5-second timeout

Closes #224
Closes #367
Refs #222

@vercel

vercel Bot commented Aug 18, 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 19, 2026 8:10am

@codecov

codecov Bot commented Aug 18, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 97.77070% with 7 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
...nd/src/pages/playtest/workbench/runtime/runtime.ts 92.20% 0 Missing and 6 partials ⚠️
frontend/src/pages/playtest/workbench/stage.tsx 83.33% 0 Missing and 1 partial ⚠️

📢 Thoughts on this report? Let us know!

fennoai[bot]

This comment was marked as outdated.

@xyh202131
xyh202131 force-pushed the fix/playtest-action-keybindings branch from 9f82af8 to 8eb727f Compare August 18, 2026 03:42
@xyh202131
xyh202131 force-pushed the fix/playtest-action-keybindings branch from 8eb727f to 816649a Compare August 18, 2026 03:50
@xyh202131 xyh202131 changed the title fix(playtest): add configurable action controls feat(playtest): support four-direction movement and action bindings Aug 18, 2026
@xyh202131

Copy link
Copy Markdown
Contributor Author

@fennoai /review

@fennoai

fennoai Bot commented Aug 18, 2026

Copy link
Copy Markdown
Contributor

Review submitted

Reviewed the fixed range f97426c...1ac15b2a across the backend direction contract, frontend DTO/export mapping, action bindings, runtime, and stage rendering.

  • Submitted inline feedback for side-only actions disappearing after vertical movement.
  • Flagged front/back-only assets being incorrectly aliased as side frames.
  • Flagged fixed-priority facing after releasing one of several held directions.
  • Verification: git diff --check passed. Vitest was not rerun because frontend/node_modules is absent in this workspace.

View PR review · View job run

fennoai[bot]

This comment was marked as outdated.

@huyanxius

Copy link
Copy Markdown
Collaborator

@fennoai /review 提出阻塞合并的问题

@fennoai

fennoai Bot commented Aug 19, 2026

Copy link
Copy Markdown
Contributor

Review submitted

已审查固定提交范围 f97426c...cdc4481,并提交 2 条阻塞性 P1 反馈:

  • 四向朝向下切换到 side-only 动作时,精灵会消失。
  • front/back-only 动作被错误填充为 side,A/D 会播放错误方向帧。

验证:Playtest model/runtime 聚焦测试 30 passed。完整评审已发布到 PR #368

View PR review · View job run

fennoai[bot]

This comment was marked as outdated.

@xyh202131
xyh202131 force-pushed the fix/playtest-action-keybindings branch from 4728e6b to 4398a62 Compare August 19, 2026 04:23
@xyh202131 xyh202131 changed the title feat(playtest): support four-direction movement and action bindings feat(playtest): support four and eight way directional assets Aug 19, 2026
@xyh202131

Copy link
Copy Markdown
Contributor Author

/review

fennoai[bot]

This comment was marked as outdated.

@xyh202131

Copy link
Copy Markdown
Contributor Author

/review

@fennoai

fennoai Bot commented Aug 19, 2026

Copy link
Copy Markdown
Contributor

An internal error occurred. Please try again later.

View job run

@xyh202131

Copy link
Copy Markdown
Contributor Author

/review

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

Reviewed the directional character contract, entity mapping, playtest model, bindings, runtime movement/facing, stage rendering, and the accompanying backend/frontend tests. The runtime correctly handles directional-only assets, but the default action-binding path still assumes top-level legacy frames, so directional jump/crouch actions can be present yet unreachable from Space/Shift. Targeted test execution was attempted, but the checked-in frontend/node_modules/.bin/vitest is not executable in this workspace (Permission denied).

actions: readonly PlaytestAction[],
predicate: (action: PlaytestAction) => boolean,
) {
return actions.find((action) => action.frames.length > 0 && predicate(action))

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.

[P1] Bind directional-only jump and crouch actions

The playtest model intentionally leaves PlaytestAction.frames empty when an action has only directional source sequences such as north, while hasFrames/playbackForFacing correctly treat those sequences as playable. However, findAction only checks action.frames.length, so createDefaultActionBindings returns null for a directional-only jump or crouch action. The workbench then disables Space/Shift and the action cannot be triggered through the advertised default key bindings; use the same playable-frame predicate as the runtime (for example, check action.frames or any action.sequences playback) and add a regression test.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

@fennoai解决该问题并更新pr,提交人只能是xyh202131

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.

fix(playtest): 支持可配置动作按键并限制非移动动作位移 feat(playtest): 支持四向移动与方向动画(Refs #222)

2 participants