feat(projects): implement project center and asset library - #119
Open
huyanxius wants to merge 14 commits into
Open
feat(projects): implement project center and asset library#119huyanxius wants to merge 14 commits into
huyanxius wants to merge 14 commits into
Conversation
Projects need a domain adapter for the backend contract in PR 75. Map project DTOs, enums, pagination queries, creation, lookup, and deletion. Project pages can use typed data without handling transport fields.
Project transport mapping must stay aligned with the backend contract. Cover pagination, DTO mapping, writes, deletion, and bearer token injection. Contract regressions fail before reaching the project pages.
The asset library needs the persisted character hierarchy from PR 75. Map character, outfit, action, and frame data with complete tree updates. Pages can browse formal assets without generated or mock-only fields.
Character tree mapping carries the core project asset contract. Cover list, detail, create, update, delete, and token-aware requests. Nested asset serialization remains protected by executable tests.
Pages consume entities through the layer public entry point. Export the implemented project and character APIs with their domain types. Project pages keep respecting the existing dependency boundary.
Backend project and character lists can span multiple pages. Add a business-neutral pagination control and export it from shared UI. List pages can navigate all records without duplicating controls.
Projects need an entry page and a persistent project-level workspace. Implement paged project browsing, deletion, navigation, and project constraints. Users can enter one project before managing its contained assets.
Project assets need formal browsing below the project workspace. Implement character cards, outfit selection, stacked actions, and frame expansion. The UI reflects only fields persisted by the character contract.
Project pages require a nested route boundary outside the global shell. Mount the asset library and character detail beneath the project workspace. Direct routes preserve project context without duplicating global navigation.
Project navigation currently changes state without visual continuity. Add restrained entry, route, dialog, and card transitions with reduced motion. Page changes remain legible without changing the established palette.
Page tests need realistic HTTP responses without production mock data. Provide a test-only Project and Character backend with configurable pagination. Production bundles remain independent from demonstration fixtures.
Project entry and workspace behavior need route-level regression coverage. Cover real HTTP data, deletion, pagination, constraints, and disabled boundaries. The project navigation flow remains verifiable without browser fixtures.
Asset browsing must preserve project ownership and frame ordering. Cover pagination, empty states, outfits, stacked actions, and frame expansion. Unsupported template and export actions stay explicit and inert.
The architecture documents still describe project pages as placeholders. Record the formal workspace, backend mappings, merge order, and excluded flows. Reviewers can distinguish current behavior from backend and future work.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
huyanxius
marked this pull request as ready for review
August 4, 2026 20:09
| @@ -1,32 +1,25 @@ | |||
| import { ApiError, createApiClient, getApiAccessToken } from '@/shared/api' | |||
Contributor
There was a problem hiding this comment.
High: this new import resolves @/shared/api, but that module is not present anywhere in the repo tree. The PR will fail type-check/bundling before the new Project API can be used. The same missing-module issue also exists in frontend/src/entities/character/index.ts:1.
|
|
||
| setProject(null) | ||
| setError(null) | ||
| void Promise.all([ |
Contributor
There was a problem hiding this comment.
Medium: Promise.all makes the whole workspace fail if the character-count request rejects, even when projectApis.get(projectId) succeeds. The project shell should still render and treat the count as optional; otherwise a transient /characters outage blocks direct access to /projects/:projectId.
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.
实现 Projects 模块的项目中心与项目资产工作区,覆盖项目浏览、项目导航、角色资产库和角色详情,并按真实后端字段展示造型、动作与帧。
Closes #118
Why
main目前只有 Projects 路由骨架,项目、角色和资产层级还不能读取正式数据。Change Description
Project → Character → Outfit → Action → Frame浏览资产。character_data更新。Implementation Approach
entities公共入口调用projectApis与characterApis,snake_case 到 camelCase 的转换留在对应实体模块。/projects/:projectId/*使用独立项目工作区路由,资产库与角色详情保留同一项目上下文。Screenshots
以下截图来自本地接口契约环境。测试数据与图片仅用于页面核对,不进入生产源码或构建产物。
项目中心
角色资产库
角色详情与动作帧
Testing
在本地将本分支与
feat/shared-api-client临时合并且不创建提交,完整门禁通过:npm run format:check:通过,55 个文件。npm run lint:通过。npm run typecheck:通过。npm run test:通过,10 个测试文件、38 项测试。npm run build:通过,Vite 构建 96 个模块。git merge-tree --write-tree HEAD feat/shared-api-client:无冲突。upstream/main,Projects 差异不包含frontend/src/shared/api/*。Follow-ups
Related