Skip to content

Custom Parts 4: plain PNG import and derived editing #1219

Closed

Description

@DoodleBears

Parent

Part of #1209.

What to build

A Human brings in pixel art from other tools and builds on existing parts. A plain PNG of a slot's size imports as a Custom Part with fixed colors after the Human sees its color count. Any built-in part or someone else's part can be opened as a starting canvas and saved as a new part that records its parent and keeps the original author's name.

Acceptance criteria

  • A plain PNG matching a slot canvas imports with a bounded color count, using nearest-color quantization and no dithering. Transparent pixels stay empty.
  • The color count is shown before the Human accepts, and "reduce palette" stays separate from "remap pixels".
  • Imported plain-PNG cells are fixed colors. The Human can then remap cells to appearance color slots and tones in the editor.
  • Wrong-sized, oversized or over-colored images are refused with a clear message.
  • Opening a built-in part flattens it to cells for the current recipe, with a visible note that it keeps this shape and no longer adapts to face shape or hair length.
  • Opening someone else's part and saving creates a new part whose metadata records the parent ID and the original author. The original is unchanged.
  • Derived and plain-PNG parts show their origin in the Part Library filter.
  • Tests cover quantization bounds, refusal cases, built-in flattening and parent/author metadata on derived parts.

Blocked by

Activity

  1. added this to the v1.2 milestone on Oct 8, 2026
  2. added
    ready-for-agentFully specified, ready for an AFK agent
    area:ui-uxInteraction and visual experience; may accompany a code-layer area
    feature:avatarPersonaBot avatar media and activity frame
    area:fullstackEnd-to-end Host and Client implementation
    scope:tracerHuman-testable implementation slice
    on Oct 8, 2026
  3. DoodleBears commented on Oct 9, 2026

    @DoodleBears
    ContributorAuthor

    进度交接:实现已提交,还没开 PR。分支是 claude/festive-gauss-gv7xu2-1219(commit 11ff9ab),叠在 #1246(#1217)之上。

    已完成:

    • 导入普通 PNG 像素图:packages/core/src/bots/part-image.ts,最大 1 MB,缩放最多 ×16,最多 256 色,按出现次数量化成部件色板
    • 新增 bridge 方法 partLibraryImportImage
    • 库来源新增 derived 和 imported-image,并记录 parentAuthor
    • 客户端新增图片面板,编辑器新增 replace 工具
    • 测试 part-image.test.ts
    • 证据放在 docs/assets/pr/1219-png-import/

    剩下的事:

    1. 等 feat(avatar): color every hair piece and wear built-in headpieces beside an accessory #1246 merge 后执行 git rebase --onto origin/main d8cb5c7
    2. 跑 tsc、lint、format、test
    3. 开 PR,PR 里的图片用 sha 固定的链接,然后 review、merge

    Generated by Claude Code

  4. DoodleBears commented on Oct 9, 2026

    @DoodleBears
    ContributorAuthor

    结果:completed。分支 rebase 到 main 后,PR #1252 已 squash merge(ce559a8)。CI 中 managed-git.test.ts 的超时切源用例第一次失败,重跑后通过,与本 PR 无关。无剩余范围。


    Generated by Claude Code

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:fullstackEnd-to-end Host and Client implementationarea:ui-uxInteraction and visual experience; may accompany a code-layer areafeature:avatarPersonaBot avatar media and activity frameready-for-agentFully specified, ready for an AFK agentscope:tracerHuman-testable implementation slice

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions