Skip to content

[#174] Add NSFW flag and language to publish flow#175

Merged
realproject7 merged 3 commits into
mainfrom
task/174-nsfw-language-publish
May 8, 2026
Merged

[#174] Add NSFW flag and language to publish flow#175
realproject7 merged 3 commits into
mainfrom
task/174-nsfw-language-publish

Conversation

@realproject7
Copy link
Copy Markdown
Owner

Summary

  • Add language selector dropdown to PreviewPanel genesis publish UI (auto-detects from structure.md)
  • Add NSFW checkbox with info note to PreviewPanel genesis publish UI
  • Pass language and isNsfw through the full publish chain: PreviewPanel → StoriesPage → route → publish lib → IPFS metadata + PlotLink indexer
  • Backwards compatible: defaults to English / not NSFW when fields are missing
  • Update AGENTS.md with NSFW content guidance and language auto-detection docs

Test plan

  • Verify language dropdown appears for genesis files in PreviewPanel
  • Verify NSFW checkbox appears for genesis files with info note when checked
  • Verify language auto-detects from **language**: Korean in structure.md
  • Verify publish sends language and isNsfw to indexer (check network tab)
  • Verify plot publish still works (language forwarded, no isNsfw)
  • Verify backwards compat: existing stories without these fields publish normally

Fixes #174

🤖 Generated with Claude Code

- Add language dropdown and NSFW checkbox to PreviewPanel genesis UI
- Auto-detect language from structure.md (same pattern as genre)
- Pass language and isNsfw through StoriesPage → route → publish lib → indexer
- Include language in IPFS metadata
- Update AGENTS.md with NSFW content guidance and language field docs

Fixes #174

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Copy link
Copy Markdown
Collaborator

@project7-interns project7-interns left a comment

Choose a reason for hiding this comment

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

Verdict: REQUEST CHANGES

Summary

The UI additions and field plumbing are mostly in place, but the backend path does not implement the required backwards-compatible defaults. Existing callers that omit the new fields will still send undefined to IPFS/indexing instead of English / false.

Findings

  • [high] Missing backwards-compatible defaults for language and NSFW
    • File: app/lib/publish.ts:339
    • Suggestion: Normalize at the publish boundary, e.g. const normalizedLanguage = language || "English" and const normalizedIsNsfw = isNsfw ?? false, then pass those normalized values to both IPFS metadata and the PlotLink indexer (isNsfw: String(normalizedIsNsfw)). As written, route/API callers that omit the new optional fields produce { language: undefined, isNsfw: undefined }, which fails the issue acceptance criterion that missing fields default to English / not NSFW.

Decision

Requesting changes because one explicit acceptance criterion is not met. CI was still pending at review time.

realproject7 and others added 2 commits May 9, 2026 07:42
Apply backwards-compatible defaults (English / false) at the start of
publishStoryline and publishPlot so callers that omit the new optional
fields still send valid values to IPFS metadata and the PlotLink indexer.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
String(false) produces "false" which is truthy. The indexer body goes
through JSON.stringify so the boolean serializes correctly as-is.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Copy link
Copy Markdown
Collaborator

@project7-interns project7-interns left a comment

Choose a reason for hiding this comment

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

Verdict: APPROVE

Summary

The requested defaults are now normalized at the publish boundary, and isNsfw is passed to the indexer as a boolean. The publish UI, route forwarding, IPFS metadata language field, and AGENTS.md guidance match the issue scope.

Findings

  • None.

Decision

Approving. Note: gh pr checks currently reports no checks on the latest branch head, so I could not confirm CI from the review CLI output.

@realproject7 realproject7 merged commit 4b0c05d into main May 8, 2026
1 check passed
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.

Add NSFW flag and language to OWS publish flow

2 participants