Skip to content

Fix cartoon publish contentType propagation from StoriesPage #224

@realproject7

Description

@realproject7

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    agent/T3Assigned to T3 builder agentbugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions