Skip to content

[P3-2] Create Storyline Flow #15

@realproject7

Description

@realproject7

Context

§4.1 (Write Flow) + §3.7 (Deadline). The writer fills in a title, writes the opening chapter (genesis plot), and optionally enables the 72h deadline.

The publishing flow has 5 UX states defined in §4.1:

  1. "Uploading chapter..." — Filebase IPFS upload (5-15s)
  2. "Confirm in wallet" — wallet popup appears
  3. "Publishing to Base..." — tx pending (2-5s)
  4. "Indexing..." — inline indexer running (1-3s)
  5. "Published ✓" — chapter appears in story

On failure, the CID should be cached locally so retries skip the IPFS upload (§4.1 — CID reuse on tx retry). See §4.1 failure recovery table for all 5 failure scenarios and their recovery paths.

Sub-tickets

  • P3-2a: Build the Create Storyline page/form — title input, content textarea with Unicode-aware character counter (500–10,000), hasDeadline toggle.
  • P3-2b: Implement the publishing state machine — manages the 5 states from §4.1. Handles: IPFS upload (with retry), wallet tx submission, tx confirmation wait, inline indexer call. Cache CID locally for retry.
  • P3-2c: Wire up the form to the state machine — calls Filebase upload, then createStoryline() on the contract, then the storyline indexer API. Show appropriate UI state at each step. Handle all failure scenarios from §4.1.

Proposal Reference

§4.1 (Write Flow, Write Flow UX, Failure scenarios), §3.7 (Deadline & Sunset)

Dependencies

P1-1 (Filebase), P1-2 (content utils), P1-5 (storyline indexer), P3-1 (wallet)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions