Skip to content

feat(ui-set): refine creation form workflow - #216

Open
JeremyD7 wants to merge 4 commits into
1024XEngineer:mainfrom
JeremyD7:ui-set-from
Open

feat(ui-set): refine creation form workflow#216
JeremyD7 wants to merge 4 commits into
1024XEngineer:mainfrom
JeremyD7:ui-set-from

Conversation

@JeremyD7

@JeremyD7 JeremyD7 commented Aug 14, 2026

Copy link
Copy Markdown
Contributor

Change Description

  • Refine the Create UI Set form so creators can define a UI Set canvas, visual style, ordered components, and an optional overall reference image.
  • Provide local validation and submission feedback without enqueuing a generation request.

Implementation Approach

  • Replace the UI Set free-form component flow with ordered, addable and removable component cards that can be expanded or collapsed.
  • Use preset width and height menus for the UI Set canvas, and preserve the structured dimensions in the local draft.
  • Remove the obsolete isCustom component field and add localized UI Set labels and validation messages.

Related Issue

Closes #208

Testing

  • pnpm.cmd exec vitest run src/features/generation/lib/asset-creation.test.ts src/i18n/resources.test.ts - passed.
  • pnpm.cmd build - passed.

Screenshots or Recordings

Not included.

Risks and Follow-ups

  • Generation, upload, queueing, and backend UI Set task integration remain intentionally out of scope.

Checklist

  • The PR is focused and does not include unrelated changes.
  • Asset names, formats, dimensions, and metadata follow project conventions.
  • Licensing and attribution information is included or unchanged as appropriate.
  • Documentation or examples were updated when needed.

UI Set creation needs structured dimensions and ordered component input.

Add canvas presets, component management, and local-only submission feedback.

Keep generation requests disconnected while the backend workflow is pending.
@JeremyD7 JeremyD7 self-assigned this Aug 14, 2026
@JeremyD7 JeremyD7 added the area:ui User interface, interaction, or visual design work. label Aug 14, 2026
@vercel

vercel Bot commented Aug 14, 2026

Copy link
Copy Markdown

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

Project Deployment Actions Updated (UTC)
holonic-asset Ready Ready Preview Aug 14, 2026 3:29am

@codecov

codecov Bot commented Aug 14, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 95.23810% with 3 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
...res/generation/create-asset/uiset-asset-fields.tsx 94.87% 2 Missing ⚠️
...tend/src/features/generation/create-asset-form.tsx 90.90% 1 Missing ⚠️

📢 Thoughts on this report? Let us know!

fennoai[bot]

This comment was marked as outdated.

fennoai[bot]

This comment was marked as outdated.

Adding a component reset every component card to expanded.

Update only affected expansion indexes when components are added or removed.

Keep creators' collapsed component layout intact.
UI Set drafts carried a stale generic canvas size alongside structured dimensions.

Derive the canvas size from dimensions when creating drafts and requests.

Ensure UI Set request metadata remains internally consistent.
UI Set drafts gained stable component identities and centralized canvas constraints.

Keep form defaults stable across renders while submitting schema-transformed data.

Cover component editing, canvas selection, and local UI Set submission.
@JeremyD7

Copy link
Copy Markdown
Contributor Author

/review -claude

@JeremyD7
JeremyD7 requested review from KurodaKayn and nighca August 14, 2026 05:49
@minorcell

Copy link
Copy Markdown
Member

/review

@minorcell

Copy link
Copy Markdown
Member

/review -claude

claude 已经关闭了,大家平时使用 “/review” 就好,目前默认是 gpt-5.6 sol

@1024XEngineer 1024XEngineer deleted a comment from JeremyD7 Aug 15, 2026

@fennoai fennoai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Reviewed the complete UI Set form, draft/schema conversion, caller integration, and localization changes. The structured canvas/component state and local-only submit behavior align with the issue contract, but the validation path has one localization regression noted inline. Focused tests could not run because the environment has Node 20.20.2 while pnpm 11 requires Node 22.13+ and imports the unavailable node:sqlite module.

.int()
.refine(isUISetCanvasHeight, "Select a supported canvas height."),
}),
style: z.string().trim().min(1, "UI Set style is required."),

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

[P2] Localize UI Set validation messages

The form displays result.error.issues.map((issue) => issue.message) verbatim, but these new UI Set schema messages are hard-coded English strings. As a result, users with the Simplified Chinese locale see English errors when style, component names/descriptions, or supported dimensions are invalid, despite the PR adding the corresponding localized resources and the issue requiring localized validation. Emit translation keys/codes from validation (or map the issues through t) before rendering them.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:ui User interface, interaction, or visual design work.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feature]: Add UI Set creation form workflow

2 participants