Skip to content

[#184] Add title to chainPlot + fix 168h deadline#221

Merged
realproject7 merged 2 commits intomainfrom
task/184-chainplot-title-deadline
Mar 16, 2026
Merged

[#184] Add title to chainPlot + fix 168h deadline#221
realproject7 merged 2 commits intomainfrom
task/184-chainplot-title-deadline

Conversation

@realproject7
Copy link
Copy Markdown
Owner

Summary

  • Contract redeployed to Base Sepolia: 0x6B8d38af1773dd162Ebc6f4A8eb923F3c669605d (verified on Sourcify)
  • Added string calldata title param to chainPlot() function and PlotChained event
  • Changed deadline enforcement from 72h to 168h (7 days) — matches frontend/docs
  • Updated all frontend ABIs (web app + SDK), contract address, useChainPlot hook, SDK client, and CLI

Contract changes (plotlink-contracts repo)

  • chainPlot(storylineId, title, contentCID, contentHash) — new signature
  • PlotChained event now includes title field
  • Genesis emit in createStoryline passes storyline title to PlotChained
  • All 15 Foundry tests pass

Frontend changes

  • lib/contracts/abi.ts + packages/sdk/src/abi.ts: title in event + function
  • lib/contracts/constants.ts + packages/sdk/src/constants.ts: new contract address
  • src/hooks/useChainPlot.ts: optional title param (default "")
  • packages/sdk/src/client.ts: optional title param
  • packages/cli/src/commands/chain.ts: --title flag

Test plan

  • forge test — 15/15 pass (including updated deadline test at 168h)
  • Contract verified on Sourcify
  • Frontend type check passes (tsc --noEmit clean)
  • Create a storyline on new contract — verify genesis PlotChained event includes title
  • Chain a plot with title — verify PlotChained event includes title
  • Chain a plot without title — verify empty string works

Fixes #184

🤖 Generated with Claude Code

…ract

Contract changes (plotlink-contracts):
- Added `string calldata title` to chainPlot function signature
- Added `title` field to PlotChained event
- Updated genesis emit in createStoryline to include title
- Changed deadline from 72h to 168h (7 days)
- All 15 tests pass
- Deployed to Base Sepolia: 0x6B8d38af1773dd162Ebc6f4A8eb923F3c669605d
- Verified on Sourcify (exact match)

Frontend changes:
- Updated PlotChained event ABI with title field (abi.ts + SDK abi.ts)
- Updated chainPlot function ABI with title input param
- Updated STORY_FACTORY address to new deployment
- useChainPlot hook: added optional title param (defaults to "")
- SDK client.chainPlot: added optional title param
- CLI chain command: added --title flag

Fixes #184

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.

T2b: APPROVE

Clean, focused change. Verified consistency across all layers:

  • ABI: title (string, non-indexed) in correct position in both event and function, matching across web app and SDK ABIs
  • Contract address: Updated consistently in lib/contracts/constants.ts and packages/sdk/src/constants.ts
  • Backward compat: title = "" default in SDK client, hook, and CLI — existing callers unaffected
  • Args order: [storylineId, title, contentCid, contentHash] consistent in hook, SDK, and ABI
  • No secrets: Only public on-chain contract address, no keys or sensitive values

Adds an optional title field (max 100 chars) to the chain page UI,
wired through to chainPlot(storylineId, content, title). Addresses
T2a review feedback on PR #221.

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 contract/ABI redeploy updates are in place, but the web app still does not expose the new chapter-title capability in its actual chain-plot flow. That leaves the feature incomplete from the app side.

Findings

  • [high] Web chain flow still cannot submit a plot title
    • File: src/app/chain/page.tsx:106
    • File: src/app/chain/page.tsx:138
    • Suggestion: add a chapter-title input to the chain page and pass it through useChainPlot(..., title) so the primary web authoring path can exercise the new chainPlot(storylineId, title, contentCID, contentHash) signature. Right now the hook, SDK, and CLI support title, but the app still only calls chainPlot(storylineId, content), so web users cannot set chapter titles at all.

Decision

Requesting changes because issue #184 is specifically about adding title support to chainPlot, and the main web client path still has no way to provide that title.

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 follow-up change completes the missing web-app integration by adding an optional chapter-title field to the chain page and passing it through the updated chainPlot signature. The redeploy/address/ABI updates and 168h deadline change now look consistent across contract, app, SDK, and CLI.

Findings

  • None.

Decision

Approving because the previously missing app-side chapter-title path is now wired, and the updated head passes GitHub lint-and-typecheck.

@realproject7 realproject7 merged commit 47d4911 into main Mar 16, 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.

[P9-1] Contract: add title param to chainPlot function

2 participants