Skip to content

[codex] Add static subject designer catalog - #2

Merged
similaitw merged 1 commit into
mainfrom
codex/static-subject-designer-v5
Jun 22, 2026
Merged

[codex] Add static subject designer catalog#2
similaitw merged 1 commit into
mainfrom
codex/static-subject-designer-v5

Conversation

@similaitw

Copy link
Copy Markdown
Owner

What changed

  • add a versioned static subject catalog with 6 categories and 110 original subitems
  • add photo, catalog, and custom subject description generation
  • add role, personality, prop, and additional-direction controls
  • embed the v5 subject profile and resolved character description in the single Markdown task
  • migrate v2/v3/v4 projects to v5 while preserving legacy character directions

Why

Creators can define a coherent original sticker subject without writing prompts from scratch. Uploaded photos become safe appearance references, while projects without photos can use a curated offline catalog inspired by generic Taiwan LINE STORE trends.

Boundaries

  • no backend, Google Sheet, Firebase, crawler, API key, or runtime network request
  • no commercial character names or artist imitation prompts
  • the catalog is accessed only through getSubjectCatalog() so a remote provider can be added later

Validation

  • npm run typecheck
  • npm test — 27 tests
  • npm run build
  • npm run test:e2e
  • npm audit --audit-level=high — 0 vulnerabilities

@vercel

vercel Bot commented Jun 22, 2026

Copy link
Copy Markdown

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

Project Deployment Actions Updated (UTC)
line_sticker Ready Ready Preview, Comment Jun 22, 2026 10:11am

@similaitw
similaitw marked this pull request as ready for review June 22, 2026 10:12
@similaitw
similaitw merged commit b46e135 into main Jun 22, 2026
3 checks passed

@chatgpt-codex-connector chatgpt-codex-connector 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.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 27173e0761

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread src/domain/project.ts
}

function legacySubject(character: string): SubjectProfile {
return { ...DEFAULT_SUBJECT_PROFILE, baseMode: 'custom', customSubject: '', personalityIds: [], propIds: [], roleId: 'none', extraDetails: character || '' };

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 Badge Populate custom subject during legacy migration

When a v2/v3/v4 project without reference photos is loaded, this migrated profile is immediately invalid because baseMode: 'custom' is paired with customSubject: ''; the new validateSubjectProfile(..., false) check then returns 請輸入自訂主體, so users cannot download a new MD task or export ZIPs from legacy projects until they manually re-enter a subject even though the old settings.character was preserved in extraDetails.

Useful? React with 👍 / 👎.

try { const manifest = parseTaskMarkdown(await file.text()); const targetCount = (manifest.targetCount ?? manifest.count) as typeof project.settings.count; const cells = manifest.cellCount ?? manifest.count;
dispatch({ type: 'update', patch: (current) => ({ ...current, generationProvider: manifest.provider,
settings: { ...current.settings, character: manifest.character, count: targetCount, rows: manifest.rows, columns: manifest.columns },
subjectProfile: manifest.subjectProfile ?? { ...current.subjectProfile, baseMode: 'custom', customSubject: '', roleId: 'none', personalityIds: [], propIds: [], extraDetails: manifest.character },

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 Badge Preserve legacy task character as the custom subject

Importing an older v1/v2 task with no subjectProfile creates the same invalid state for projects without reference photos: the imported character text is stored only in extraDetails, while customSubject stays empty and baseMode is custom, so the next MD download is blocked by validateSubjectProfile with 請輸入自訂主體 despite the imported manifest containing a valid character.

Useful? React with 👍 / 👎.

try { const manifest = parseTaskMarkdown(await file.text()); const targetCount = (manifest.targetCount ?? manifest.count) as typeof project.settings.count; const cells = manifest.cellCount ?? manifest.count;
dispatch({ type: 'update', patch: (current) => ({ ...current, generationProvider: manifest.provider,
settings: { ...current.settings, character: manifest.character, count: targetCount, rows: manifest.rows, columns: manifest.columns },
subjectProfile: manifest.subjectProfile ?? { ...current.subjectProfile, baseMode: 'custom', customSubject: '', roleId: 'none', personalityIds: [], propIds: [], extraDetails: manifest.character },

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 Badge Preserve photo task character when importing v3 MD

When a v3 task MD was created in photo mode and is imported into a project that does not already have those reference-photo blobs, this assigns the saved subjectProfile but leaves referencePhotos empty; the next download then rebuilds manifest.character from the catalog/custom profile instead of the imported characterDescription that mentioned the photo subject, silently turning a photo-based task back into the default/catalog subject. In that no-photo import context, either the imported description needs to become the custom subject or the missing photos need to be required before regenerating the task.

Useful? React with 👍 / 👎.

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.

1 participant