Skip to content

feat(project): 朝向作为唯一方向规格 - #676

Open
xiaocheny214 wants to merge 2 commits into
1024XEngineer:mainfrom
xiaocheny214:feat/664-retire-character-perspective
Open

feat(project): 朝向作为唯一方向规格#676
xiaocheny214 wants to merge 2 commits into
1024XEngineer:mainfrom
xiaocheny214:feat/664-retire-character-perspective

Conversation

@xiaocheny214

@xiaocheny214 xiaocheny214 commented Aug 25, 2026

Copy link
Copy Markdown
Contributor

Summary

  • 关闭 proposal: 合并重复且冲突的游戏视角与朝向字段 #664 的后端部分:directional_movement(朝向)成为唯一可写入的项目方向规格;character_perspective 不再落库,生成约束只从朝向派生(单向→横版侧视、四向→俯视、八向→2.5D)。
  • 目标表结构只在 ORM 里定义。不引入 SQL 迁移框架:create_all 管新表,schema_sync 管加列;删列属于会丢数据的操作,按 feat(ops): 加一个只做加法的表结构巡检 #616 只报告、不自动做。旧库多留一列不影响读写。
  • 创建请求不再要求 character_perspective(旧客户端多传会被忽略)。响应里仍派生该字段(readOnly),方便前端过渡。

本 PR 不改前端。前端同学按 OpenAPI:创建只发 directional_movement;列表/详情暂时仍可读派生的 character_perspective

Close #664

Test plan

  • uv run pytest:项目创建忽略旧字段、朝向约束 facing、schema_sync 存量插入
  • 空库启动:windup_projectcharacter_perspective
  • 已有库启动:应用可读写;该列可仍在库里,查询不再点名它
  • POST /projects 不传 character_perspective 可创建;同时传 character_perspective=1 + directional_movement=3 时只认朝向,响应里 character_perspective == 3
  • 四向项目生成 facing=front,单向项目 facing=side

@vercel

vercel Bot commented Aug 25, 2026

Copy link
Copy Markdown

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

1 Skipped Deployment
Project Deployment Actions Updated (UTC)
windup Ignored Ignored Preview Aug 27, 2026 7:19am

@github-actions

github-actions Bot commented Aug 25, 2026

Copy link
Copy Markdown

✅ 此 PR 已关联 issue,之前的提醒已自动标记为已解决。

@codecov

codecov Bot commented Aug 25, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #676      +/-   ##
==========================================
- Coverage   86.52%   86.52%   -0.01%     
==========================================
  Files         293      293              
  Lines       21902    21904       +2     
  Branches     3329     3329              
==========================================
+ Hits        18951    18952       +1     
  Misses       2021     2021              
- Partials      930      931       +1     
Flag Coverage Δ
backend 91.55% <100.00%> (+<0.01%) ⬆️
frontend 80.52% <ø> (-0.02%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
...app/src/windup_app/server/orchestrator/executor.py 78.56% <100.00%> (+0.03%) ⬆️
...ackages/app/src/windup_app/server/project/model.py 100.00% <ø> (ø)
...end/packages/app/src/windup_app/web/api/project.py 89.57% <100.00%> (+0.12%) ⬆️
...kages/common/src/windup_common/models/character.py 96.96% <100.00%> (ø)

... and 1 file with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

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

已审阅固定范围 25b54f87b1c185e84564d2b14cd42562a4084942...b827349fe68f3fe507dad68d403a2ff1171680f7 的完整变更,重点核对了项目 DTO/响应兼容、朝向约束读取、API/worker 启动建表与 SQL 迁移的幂等及并发路径。未发现满足报告阈值的可确认正确性、回归或安全问题。

静态验证通过:python3 -m compileall(变更后的 Python 源文件)与 git diff --check。未能运行 pytest:当前环境没有 uv 或已安装的 pytest

@vercel

vercel Bot commented Aug 25, 2026

Copy link
Copy Markdown

Deployment failed for project windup with the following error:

Resource is limited - try again in 24 hours (more than 100, code: "api-deployments-free-per-day").

Learn More: https://vercel.com/huyan-s-projects1?upgradeToPro=build-rate-limit

xyh202131
xyh202131 previously approved these changes Aug 25, 2026
目标结构只留在 ORM。create_all 管新表,schema_sync 管加列;
character_perspective 从模型拿掉后不再读写,响应里仍派生给前端过渡。
@xiaocheny214
xiaocheny214 force-pushed the feat/664-retire-character-perspective branch from 8b99697 to 93807d6 Compare August 27, 2026 07:19
@xiaocheny214 xiaocheny214 changed the title feat(project): 朝向作为唯一方向规格并加入 SQL 迁移 feat(project): 朝向作为唯一方向规格 Aug 27, 2026
@xiaocheny214

Copy link
Copy Markdown
Contributor Author

已按「目标结构只在 ORM 定义一次」收掉本 PR 原先的 SQL 迁移框架(migrate.py / backend/migrations/ / 启动时跑版本化 SQL)。

当前业务不需要那一套:character_perspective 是重复规格,不是要把旧值搬到新列。从模型删掉之后 SQLAlchemy 不再读它,旧库多留一列也能跑。create_all 继续只建缺表,加列走已有的 schema_sync,删列仍按 #616 人工处理。

分支已 rebase 到最新 main,冲突应已消除。

rememberActiveRun 后立刻 getByRole 会在订阅尚未刷 UI 时失败。
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.

proposal: 合并重复且冲突的游戏视角与朝向字段

2 participants