Parent: #197
Found during review of merged PRs #212-#223 before #211 pilot.
Problem
StoriesPage.handlePublish uses storyContentTypes to decide whether cartoon genesis publish should include contentType: "cartoon", but the callback dependency array only includes authFetch.
That means the callback can capture the initial empty content-type map and omit contentType from cartoon genesis publish payloads. If this happens, PlotLink will index the storyline as default fiction even though the local OWS story is cartoon.
Related code observed in app/web/components/StoriesPage.tsx:
getContentTypeForPublish(storyContentTypes, storyName, storylineId) inside handlePublish
useCallback(..., [authFetch])
- eslint already reports missing dependencies:
storyContentTypes and walletAddress
Scope
- Fix
handlePublish so it always uses current storyContentTypes and current walletAddress.
- Avoid introducing broad refactors to terminal, wallet, dashboard, or publish internals.
- Keep fiction publish payload unchanged: no
contentType for fiction, no per-plot content type.
- Add an enforcing regression test that renders the real publish path or exercises the actual callback boundary enough to prove cartoon genesis sends
contentType: "cartoon" after story metadata polling updates.
Acceptance Criteria
- Cartoon genesis publish includes
contentType: "cartoon" reliably.
- Cartoon plot publish omits
contentType.
- Fiction genesis/plot publish remains unchanged.
- eslint no longer reports the
StoriesPage.tsx missing dependency warning for this callback.
npm run typecheck, npm run lint, and npm test -- --run pass with no new errors.
Public Safety
This is a public repo. Do not include secrets, API keys, wallet private keys, mnemonics, auth tokens, OWS vault internals, private story drafts, full Claude session IDs, or sensitive local paths in issues, PRs, logs, docs, tests, or examples.
Parent: #197
Found during review of merged PRs #212-#223 before #211 pilot.
Problem
StoriesPage.handlePublishusesstoryContentTypesto decide whether cartoon genesis publish should includecontentType: "cartoon", but the callback dependency array only includesauthFetch.That means the callback can capture the initial empty content-type map and omit
contentTypefrom cartoon genesis publish payloads. If this happens, PlotLink will index the storyline as default fiction even though the local OWS story is cartoon.Related code observed in
app/web/components/StoriesPage.tsx:getContentTypeForPublish(storyContentTypes, storyName, storylineId)insidehandlePublishuseCallback(..., [authFetch])storyContentTypesandwalletAddressScope
handlePublishso it always uses currentstoryContentTypesand currentwalletAddress.contentTypefor fiction, no per-plot content type.contentType: "cartoon"after story metadata polling updates.Acceptance Criteria
contentType: "cartoon"reliably.contentType.StoriesPage.tsxmissing dependency warning for this callback.npm run typecheck,npm run lint, andnpm test -- --runpass with no new errors.Public Safety
This is a public repo. Do not include secrets, API keys, wallet private keys, mnemonics, auth tokens, OWS vault internals, private story drafts, full Claude session IDs, or sensitive local paths in issues, PRs, logs, docs, tests, or examples.