Skip to content

[WIP - Do not merge] feat(ipfs2filecoin): add IPFS to Filecoin campaign landing page - #346

Draft
SgtPooki wants to merge 7 commits into
mainfrom
feat/ipfs2filecoin-landing-page
Draft

[WIP - Do not merge] feat(ipfs2filecoin): add IPFS to Filecoin campaign landing page#346
SgtPooki wants to merge 7 commits into
mainfrom
feat/ipfs2filecoin-landing-page

Conversation

@SgtPooki

Copy link
Copy Markdown

Adds filecoin.cloud/ipfs2filecoin, the front door for the IPFS-to-Filecoin mini-campaign.

Ported from Jenni's wireframe onto the site's existing ui-filecoin components, and reconciled against the PRD including its 2026-07-28 validation-run corrections.

What's here

The page is the campaign's front door and its measuring instrument: it takes a pasted CID list, produces a deposit estimate from a declared volume, and routes to the agent door or to contact.

Everything interactive runs client-side with no wallet and no network calls, so a check costs the visitor nothing and sends us nothing.

Piece Notes
CID list checker Validates, dedupes, strips gateway prefixes. Lists over the 500-item browser cap get steered to the agent prompt rather than a dead end.
Deposit estimator Declared volume × retention. Derived from documented constants, not hardcoded figures.
Agent prompt Copy-to-clipboard. The primary conversion, per the PRD.
/ipfs2filecoin/llms.txt Draft migration brief, served as text/markdown.

Instrumentation

Three Plausible events, matching the funnel the PRD asks for:

  • IPFS2Filecoin CID List Checked — with outcome and CID count
  • IPFS2Filecoin Estimate Viewed — with volume, duration, deposit
  • IPFS2Filecoin Agent Prompt Copied — with source; the PRD calls this the headline number

Pricing math

The estimator reproduces the PRD's worked example exactly — 1 TiB over two years:

Line This PR PRD
Storage and proving $122.83 $122.83
Buffer (30 days) $5.05 $5.05
Lifecycle reserve $0.20 $0.20
Deposit $128.08 $128.08
Refundable $5.25 $5.25

The comparison table's $4.55/TB/month is also derived, from storage-only at 2 copies. Both fall out of constants in constants/migration.ts, so a price change is a one-line edit that propagates to the table, the estimator, and llms.txt together.

Agent-readability

<link rel="alternate" type="text/markdown" href="…/llms.txt"> is in the page head, so an agent pointed at the human URL finds the brief without being told the convention.

The brief opens with a stage 0 ingress check — the validation run found runs die on missing public ingress after the expensive commP pass, so it gates before that, and tells the agent to stop and ask rather than install a tunnel binary on the user's behalf.

Copy rules

Followed the PRD's hard rules: sentence case, no emoji, second person, no FOC / commP / PoDSI / aggregate in public copy, no implication that FilOz custodies anyone's data, no "cheapest" superlative, and no promise of an alert we have no channel to send.

Decisions taken

  • Unlinked from navigation — reachable by URL and sitemap only, so campaign attribution stays clean.
  • Storage costs only, excluding onboarding, per the 2026-07-28 action item.
  • llms.txt served as a marked draft rather than 404ing, so the prompt resolves and fetch telemetry starts now.

Needs a look before merge

  • Competitor list prices (Filebase/Pinata) carried over from the wireframe, captured 2026-07-27. The PRD flags these as needing a re-check before launch and a cadence after.
  • llms.txt body is a placeholder. It must be reconciled with the CLI's actual flags before launch — the PRD calls this launch-blocking.
  • 500 GiB contact threshold. The validation run found item count, not bytes, is the binding constraint: a 2.16M-CID list projects to 472 GiB and would not route to contact. Kept the documented threshold here; changing it is a product decision.
  • Contact form source field for separating migration leads is not done — it needs a Google Form entry id I don't have.
  • Funding desk / SPA rewrite. The PRD's end state has the app itself at this path via next.config.ts rewrites. Out of scope here; this PR is the landing page only, so there's no browser "check and fund" door yet.

Verification

npm run lint and npm run build clean. Page and llms.txt route verified against a production server locally.

Adds filecoin.cloud/ipfs2filecoin, the front door for the IPFS-to-Filecoin
mini-campaign, ported from Jenni's wireframe in FilOzone/FOC-PM onto the
site's existing ui-filecoin components.

The page is both the campaign's front door and its measuring instrument. It
does three things: takes a pasted CID list, produces a deposit estimate from a
declared volume, and routes to the agent door or to contact.

Interactive parts run entirely client-side, with no wallet and no network
calls, so a check costs the visitor nothing and sends us nothing:

- CID list checker: validates, dedupes, and steers lists over the 500-item
  browser cap to the agent prompt.
- Deposit estimator: reproduces the PRD's worked example exactly ($128.08
  deposit, $5.25 refundable for 1 TiB over two years) from documented
  constants rather than hardcoded figures.
- Agent prompt with copy-to-clipboard, the primary conversion.

Plausible events cover the funnel the PRD asks for: CID List Checked,
Estimate Viewed, and Agent Prompt Copied, the last being the headline number.

Also serves a draft migration brief at /ipfs2filecoin/llms.txt and advertises
it via <link rel="alternate" type="text/markdown">, so an agent pointed at the
human URL discovers the brief without being told the convention. The brief
opens with a stage 0 ingress check, per the 2026-07-28 validation run that
found runs die there after the expensive commP pass.

The page is unlinked from site navigation, reachable by URL and sitemap only,
so campaign attribution stays clean.
Copilot AI review requested due to automatic review settings July 29, 2026 17:33
@vercel

vercel Bot commented Jul 29, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
filecoin-cloud Ready Ready Preview Aug 3, 2026 6:18pm

Request Review

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds a new campaign landing page at /ipfs2filecoin to act as the entry point for the IPFS→Filecoin mini-campaign, including client-side CID list checking, deposit estimation, an agent prompt CTA, and a served llms.txt migration brief.

Changes:

  • Introduces the /ipfs2filecoin page composed from existing ui-filecoin components, with SEO metadata + JSON-LD structured data.
  • Adds client-side utilities/components for CID list parsing, pricing comparison, and deposit estimation (with Plausible funnel events).
  • Serves /ipfs2filecoin/llms.txt as text/markdown and links it via metadata alternates for agent discovery.

Reviewed changes

Copilot reviewed 17 out of 17 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
src/constants/paths.ts Adds a PATHS.IPFS_TO_FILECOIN entry for the new route.
src/app/ipfs2filecoin/page.tsx Implements the campaign landing page layout, content sections, and metadata alternates.
src/app/ipfs2filecoin/constants/seo.ts Defines page SEO title/description.
src/app/ipfs2filecoin/utils/generate-structured-data.ts Generates JSON-LD structured data for the campaign page.
src/app/ipfs2filecoin/constants/migration.ts Centralizes campaign constants (caps, pricing inputs, llms.txt paths, Plausible event names).
src/app/ipfs2filecoin/utils/estimate-cost.ts Implements pricing/deposit math and formatting helpers.
src/app/ipfs2filecoin/data/pricing-comparison.ts Defines the comparison-table rows, including derived Filecoin $/TB/mo.
src/app/ipfs2filecoin/components/ComparisonTable.tsx Renders the pricing comparison table UI.
src/app/ipfs2filecoin/components/CostEstimator.tsx Client-side deposit estimator UI + Plausible event.
src/app/ipfs2filecoin/utils/parse-cid-list.ts Parses/normalizes CID lists (strip gateway prefixes, validate, dedupe).
src/app/ipfs2filecoin/components/CidListChecker.tsx Client-side CID list checker UI + cap routing + Plausible event.
src/app/ipfs2filecoin/components/AgentPrompt.tsx Copy-to-clipboard agent prompt component + Plausible event.
src/app/ipfs2filecoin/data/reasons.ts Defines “why migrate” card content.
src/app/ipfs2filecoin/data/steps.ts Defines the “how it works” step cards.
src/app/ipfs2filecoin/data/limits.ts Defines “what this does not do” limit statements.
src/app/ipfs2filecoin/data/faqs.tsx Adds FAQ content for the landing page.
src/app/ipfs2filecoin/llms.txt/route.ts Serves the llms.txt draft migration brief as markdown with caching headers.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +25 to +40
export function parseCidList(input: string): CidListSummary {
const lines = input
.split('\n')
.map(normalizeLine)
.filter((line) => line && !line.startsWith('#'))

const valid = lines.filter((line) => CID_PATTERN.test(line))
const uniqueCids = [...new Set(valid)]

return {
totalLines: lines.length,
uniqueCids,
duplicateCount: valid.length - uniqueCids.length,
invalidCount: lines.length - valid.length,
}
}
Comment thread src/app/ipfs2filecoin/llms.txt/route.ts Outdated
Comment on lines +49 to +51
- the \`cloudflared\` binary installed, for \`--ingress cloudflared\`; or
- a VPS or Tailscale fronting the port yourself, for \`--ingress funnel\`; or
- a source relay URL, for \`--source-relay\`.
Comment thread src/app/ipfs2filecoin/llms.txt/route.ts Outdated

## Prerequisites

- Node.js 26 or newer. This is a hard requirement.
A real agent run against the draft brief failed at the first hop: the brief
never named the tool, so the agent correctly refused to improvise a pipeline
and stopped. It also read the 500 GiB figure as a self-serve cap and routed a
56k-CID job to the contact form, which killed the conversion outright.

Both are fixed, and the format question behind them is settled.

llms.txt was the wrong format. Per llmstxt.org it is a documentation index --
H1, blockquote, then H2 lists of links -- so a procedure does not belong in
it. The procedure now lives at /ipfs2filecoin/migrate.md, named for what it
is, and llms.txt is used correctly in two places: a spec-conformant site
index at /llms.txt, and a campaign index at /ipfs2filecoin/llms.txt whose
first link is the runbook. Discovery never depended on the filename anyway --
the prompt carries the URL, and the page carries rel="alternate".

The runbook names ipfs2foc, pins the version its flags were verified against,
and carries the real command sequence read out of that repo. Notable content:

- One invocation form, stated once. A bare `ipfs2foc` after only an `npx`
  check was the most likely first failure.
- Prerequisites split into "needed now" and "needed before stage 4", so a
  missing key no longer blocks the free stages.
- Stage 0 settles ingress before the commitment pass, and records that the
  relay only serves the single-asset path.
- Stage 2 reports from analyze --json using fields that actually exist, with
  explicit cost and ETA formulas so nothing is invented.
- Stage 4 is executed by the user in their own terminal. The agent is told
  never to accept a private key -- a key pasted into a chat is a key in a
  transcript.
- Stage 5 spawns the pull source as a background process and extracts the
  tunnel URL from its log, rather than saying "terminal A".
- Duration is framed as expected, not as a limit: a long-running command is
  working, not hung, and there is no cap on CID count.

Page copy follows: SELF_SERVE_VOLUME_CAP_LABEL becomes
COORDINATION_VOLUME_LABEL and reads as coordination rather than a ceiling, so
an agent reading the page cannot reproduce the original false blocker.

Reviewed by Codex and Gemini via the peer-review skill; every finding above
came out of that pass. Cursor could not run -- it needs auth.
@github-actions github-actions Bot added size/L and removed size/L labels Jul 29, 2026
@rjan90 rjan90 moved this from 📌 Triage to ⌨️ In Progress in FOC Jul 30, 2026
Audited every command and flag in the runbook against the USAGE string in
ipfs2foc's packages/cli/src/index.ts, which is authoritative. Two were wrong.

`ipfs2foc --version` is not a subcommand. It falls through to the default
branch, writes "unknown command: --version" to stderr, and sets exit code 1.
As the very first step of the runbook that reads like a broken install, which
is exactly the first-hop failure this rewrite exists to remove. The install
check is now `--help`, with a note saying why.

The provider's minimum piece size is advisory, not enforced. `pdp-submit`
warns and proceeds by default and only refuses under `--strict-piece-size`
(see submit-pdp.ts: "The advertised floor is advisory in practice"). The
runbook claimed items below the minimum fail at pull time, which would have
pushed agents onto the multi-asset path unnecessarily -- it needs staging disk
and rules out the relay. Now stated as the trade it is: the minimum is a
packing efficiency question, the pull limit is the hard one.
Checked all four rows against filebase.com/pricing and pinata.cloud/pricing.
Every rate still matches: Filebase Pro storage $0.015/GB and IPFS egress
$0.015/GB; Pinata Fiesta $0.035/GB and $0.080/GB; Pinata Picnic $0.070/GB
and $0.100/GB.

No figures changed. The verification date lives in the source comment rather
than on the page: it is a maintenance note for us, it ages badly in public,
and the two pricing links already let a reader check the current numbers.
The runbook told agents to run `npm install -g ipfs2foc@0.6.0`. npm has only
0.1.0 through 0.4.0, so that resolves to nothing and fails with ETARGET on
the first command of the procedure. 0.6.0 is the in-tree version; the repo
runs ahead of what has been released.

Installing latest is correct and safe here. I unpacked the published 0.4.0
and checked its bundle directly: all fourteen commands the runbook uses are
present (analyze, commp, create-data-set, export, gas, import-manifest,
pack-cars, pdp-submit, plan, probe, redirect-serve, report, serve, status),
as is every flag it passes, including --strict-piece-size, --ingress,
--source-relay, --no-auto-pack, --sample and --car-store. 0.4.0 also has no
--version subcommand, so the --help install check holds there too.

The frontmatter now carries tool_min_version rather than an exact pin, since
what an agent needs to know is the floor, not the version someone happened
to verify against.
@github-actions github-actions Bot added size/L and removed size/L labels Aug 3, 2026
@SgtPooki
SgtPooki marked this pull request as draft August 3, 2026 13:52
@SgtPooki SgtPooki changed the title feat(ipfs2filecoin): add IPFS to Filecoin campaign landing page [WIP - Do not merge] feat(ipfs2filecoin): add IPFS to Filecoin campaign landing page Aug 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

Status: ⌨️ In Progress

Development

Successfully merging this pull request may close these issues.

4 participants