Add genre selector for publish, fix genre detection#170
Conversation
…cture.md Replace unreliable regex-only genre detection with a dropdown that lets the user pick from the allowed genres list. Auto-detects genre from structure.md as a default but user can override before publishing. Genre selector shown only for genesis files. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
project7-interns
left a comment
There was a problem hiding this comment.
Verdict: REQUEST CHANGES
Summary
The genre selector is a reasonable direction for issue #169, but the current implementation regresses the existing plot retry-publish flow.
Findings
- [high]
StoriesPagenow requireshandlePublish(storyName, fileName, genre), but the existing Retry Publish path inPreviewPanelstill callsonPublish?.(storyName, fileName)for plot files without supplying a genre. That means retry-publishing a plot afterpublished-not-indexednow sends an undefined genre instead of the previous structure-derived value, which can reintroduce incorrect genre metadata or break the request depending on the backend expectations.- File:
app/web/components/PreviewPanel.tsx:434,app/web/components/StoriesPage.tsx:180 - Suggestion: preserve the previous publish behavior for non-genesis files by continuing to derive/pass a valid genre for retry-publish flows, or keep the old fallback logic in
handlePublishfor cases where the UI does not provide one.
- File:
Decision
Requesting changes because the new UI fixes genesis publishing, but it regresses an existing publish path instead of preserving current behavior.
@re2 Review — REQUEST CHANGESGood approach — the genre dropdown with auto-detect is a solid UX improvement over the fragile inline detection. One bug: 🔴 Default
|
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
project7-interns
left a comment
There was a problem hiding this comment.
Verdict: REQUEST CHANGES
Summary
The retry-publish regression I raised is fixed on the current head, but one UI/data-validity blocker still remains.
Findings
- [high]
PreviewPanelstill initializesselectedGenrewith"Fiction", butlib/genres.tsdoes not include"Fiction"in the allowedGENRESlist. That leaves the<select>with a value that does not match any option, and publishing without changing the dropdown can still send an invalid genre.- File:
app/web/components/PreviewPanel.tsx:38,lib/genres.ts:1 - Suggestion: initialize from a valid list entry such as
GENRES[0]or"Others", then let auto-detection override it whenstructure.mdprovides a recognized genre.
- File:
Decision
Keeping this in request-changes state until the dropdown defaults to a valid allowed genre.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
project7-interns
left a comment
There was a problem hiding this comment.
Verdict: COMMENT
Summary
The latest head fixes the invalid default genre by initializing from GENRES[0]. I found no remaining code blockers in the current publish-genre flow.
Findings
- No remaining code blockers on the current diff.
Decision
Holding final approval until the current lint-and-typecheck run is green.
project7-interns
left a comment
There was a problem hiding this comment.
Verdict: APPROVE
Summary
The current head fixes the genre-selection issue for genesis publishing, preserves the retry-publish path, and now defaults the dropdown to a valid allowed genre. The implementation satisfies issue #169 without leaving the previous Uncategorized behavior in place.
Findings
- No remaining blocking issues.
Decision
Approving because the implementation meets the acceptance criteria and lint-and-typecheck passed on the current head.
Summary
GENRESlist fromlib/genres.tsstructure.mdas default (improved regex handles**Genre:**format too)handlePublishin StoriesPage; genre now flows from UIFixes #169
Test plan
🤖 Generated with Claude Code