Skip to content

feat: roll out ICP Ninja badges + README hero consistency - #1468

Open
marc0olo wants to merge 9 commits into
masterfrom
feat/ninja-button-pilot-hello-world
Open

feat: roll out ICP Ninja badges + README hero consistency#1468
marc0olo wants to merge 9 commits into
masterfrom
feat/ninja-button-pilot-hello-world

Conversation

@marc0olo

@marc0olo marc0olo commented Aug 5, 2026

Copy link
Copy Markdown
Member

Rolls out the Open in ICP Ninja badge across eligible examples and standardizes the README hero, extending the approved hello_world pilot, and documents the convention in AGENTS.md. Closes the rollout part of #1462.

What changed (68 READMEs + AGENTS.md)

1. Ninja badge + callout — added to 46 eligible examples, placed directly under the H1:

Open in ICP Ninja

🥷 Try it live — no local setup. ICP Ninja is a web-based IDE that builds and deploys this project to the mainnet for free, right in your browser. Click the badge above, or hit Deploy if you're already in Ninja. To build and run it locally instead, follow the steps below.

The badge set = the ninja_pr_checks.yml tracked examples + the hello_world/who_am_i reference pair + 8 examples that had pre-staged badges commented out with TODO: re-enable once icp.ninja supports icp-cli (now true — enabled, with the old editor?g=/bare-path URLs normalized to the current i?g= form). Dual-context callout wording works whether the README is read on GitHub or inside the Ninja preview.

Ineligible examples get no badge (per the audit in #1462): canister factories (canister_factory, composite_query), >2 canisters on ic (icrc2-swap), non-deployable (stake_neuron_from_cli, unity_ii_deeplink, wasm/counter), and photo-storage (controller-only authorize step), and candid_type_generation (deployable but not demonstrable — its list_neurons returns only neurons the caller controls, so a fresh canister gets an empty result).

2. Removed View this sample's code on GitHub repo-wide — readers arrive from GitHub, and it was inconsistent (present in only ~30% of READMEs).

3. Removed cross-language counterpart links (Also available in, Motoko version, same example is also available, This walkthrough focuses on…) — users pick a language folder upfront. Also fixed two motoko vetkeys "related example" links that pointed at the rust sibling. Language-description links (Motoko/Rust docs, rustup) are preserved.

4. Documented the convention in AGENTS.md — the README-structure section now shows the badge in the template, adds the "no back-reference links" rule, and gains an ICP Ninja badge subsection with the markup/asset/import-URL, the dual-context rationale, and the three eligibility rules (no factory; ≤2 canisters in the ic environment; deployable in Ninja's no-terminal environment).

Notes / open questions

🤖 Generated with Claude Code

marc0olo and others added 5 commits August 5, 2026 13:48
Ninja now supports icp-cli projects, so the browser deploy button can
return. This is a pilot on hello_world (both languages) to settle the
button style and wording before a repo-wide rollout (#1462).

Uses the current canonical import URL (icp.ninja/i?g=<github-tree-url>),
matching the developer-docs CodeExample component. Placed as a callout
directly under the H1; no external image dependency.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Switch the pilot from a plain-text callout to the official Ninja-hosted
badge asset — the same one used by READMEs before the migration (PR #1158)
— placed under the H1. Keeps the current canonical i?g= import URL; drops
the verbose dfx-era 'Deploying from ICP Ninja' instructions.
Pair the official Ninja badge with a short callout so the README hero
works in both places it renders — GitHub (badge is the CTA) and the ICP
Ninja preview (the 'hit Deploy' hint is the actionable bit). Notes that
ICP Ninja is a web-based IDE, that deploys are free with no local setup,
and points local builders to the steps below. Keeps the 🥷 emoji.
Readers reach these READMEs mostly from GitHub, where a 'view the code on
GitHub' link is redundant. It was also inconsistent — only 26 of 86
example READMEs carried it. Removing it tightens the hero (H1 → Ninja
badge → callout → content); a repo-wide sweep follows in the rollout.
Applies the pilot template repo-wide:

- Add the 'Open in ICP Ninja' badge + callout to all eligible examples
  (45): the ninja_pr_checks.yml tracked set, the hello_world/who_am_i
  reference pair, and 8 examples that had pre-staged badges commented out
  with a 'TODO: re-enable once icp.ninja supports icp-cli' — now true.
  Ineligible examples (canister factories, >2 canisters on ic,
  non-deployable, photo-storage's authorize step) get no badge.
- Remove the 'View this sample's code on GitHub' line repo-wide (readers
  arrive from GitHub; it was inconsistent — present in only ~30%).
- Remove cross-language 'counterpart' links (Also available in / Motoko
  version / same example is also available / walkthrough focuses on):
  users pick a language folder upfront. Fix two motoko vetkeys
  related-example links that pointed at the rust sibling.

Language-description links (Motoko/Rust docs, rustup) are preserved.
Badge URL uses the current canonical icp.ninja/i?g= form.
@marc0olo marc0olo changed the title feat(hello_world): pilot ICP Ninja "Open in" button feat: roll out ICP Ninja badges + README hero consistency Aug 5, 2026
Capture the conventions rolled out in this PR: the badge markup, asset,
import URL, and dual-context placement; the eligibility rules (no
factory, <=2 canisters in the ic environment, deployable in Ninja's
no-terminal environment); and the 'no back-reference links' rule
(drop the GitHub-source link and cross-language counterpart links).

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

Rolls out a consistent README “hero” section across ICP examples by adding the Open in ICP Ninja badge + dual-context callout to eligible projects, removing redundant “View on GitHub” and cross-language counterpart links, and documenting the convention + eligibility rules in AGENTS.md.

Changes:

  • Added ICP Ninja badge + “Try it live” callout under the H1 in eligible examples’ READMEs.
  • Removed redundant GitHub back-reference links and cross-language counterpart links from READMEs.
  • Documented the README hero + ICP Ninja badge rules and eligibility criteria in AGENTS.md.

Reviewed changes

Copilot reviewed 69 out of 69 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
rust/x509/README.md Add ICP Ninja badge + callout under H1.
rust/who_am_i/README.md Replace GitHub back-reference with ICP Ninja badge + callout.
rust/vetkeys/password_manager/README.md Remove GitHub back-reference and cross-language link.
rust/vetkeys/password_manager_with_metadata/README.md Remove GitHub back-reference and cross-language link.
rust/vetkeys/encrypted_notes_app_vetkd/README.md Remove GitHub back-reference and cross-language link.
rust/vetkeys/basic_vetkd/README.md Remove GitHub back-reference and cross-language link.
rust/vetkeys/basic_timelock_ibe/README.md Enable ICP Ninja badge + callout (replace old commented TODO block).
rust/vetkeys/basic_ibe/README.md Remove GitHub back-reference and cross-language link.
rust/vetkeys/basic_bls_signing/README.md Remove GitHub back-reference and cross-language link.
rust/unit_testable_rust_canister/README.md Add ICP Ninja badge + callout under H1.
rust/threshold-schnorr/README.md Remove cross-language counterpart references.
rust/threshold-ecdsa/README.md Add ICP Ninja badge + callout; remove Motoko cross-link.
rust/simd/README.md Add ICP Ninja badge + callout under H1.
rust/send_http_post/README.md Add ICP Ninja badge + callout; remove old commented badge block and normalize URL.
rust/send_http_get/README.md Add ICP Ninja badge + callout; remove old commented badge block and normalize URL.
rust/receiving-icp/README.md Add ICP Ninja badge + callout under H1.
rust/query_stats/README.md Add ICP Ninja badge + callout under H1.
rust/qrcode/README.md Add ICP Ninja badge + callout under H1.
rust/photo_gallery/README.md Add ICP Ninja badge + callout under H1.
rust/periodic_tasks/README.md Add ICP Ninja badge + callout under H1.
rust/performance_counters/README.md Add ICP Ninja badge + callout under H1.
rust/low_wasm_memory/README.md Remove cross-language link (“Motoko variation”).
rust/llm_chatbot/README.md Add ICP Ninja badge + callout under H1.
rust/inter-canister-calls/README.md Add ICP Ninja badge + callout under H1.
rust/icp_transfer/README.md Remove cross-language counterpart sentence/link.
rust/hello_world/README.md Replace GitHub back-reference with ICP Ninja badge + callout.
rust/guards/README.md Add ICP Ninja badge + callout under H1.
rust/flying_ninja/README.md Add ICP Ninja badge + callout under H1.
rust/exchange-rates/README.md Add ICP Ninja badge + callout under H1.
rust/evm_block_explorer/README.md Add ICP Ninja badge + callout; remove old commented “Deploying from ICP Ninja” section.
rust/daily_planner/README.md Add ICP Ninja badge + callout under H1.
rust/canister-info/README.md Add ICP Ninja badge + callout under H1.
rust/canister_logs/README.md Add ICP Ninja badge + callout; remove Motoko cross-link.
rust/candid_type_generation/README.md Add ICP Ninja badge + callout under H1.
rust/basic_ethereum/README.md Add ICP Ninja badge + callout under H1.
rust/basic_bitcoin/README.md Add ICP Ninja badge + callout under H1.
rust/backend_wasm64/README.md Add ICP Ninja badge + callout; remove old commented badge block.
rust/backend_only/README.md Add ICP Ninja badge + callout under H1.
motoko/who_am_i/README.md Replace GitHub back-reference with ICP Ninja badge + callout.
motoko/vetkeys/password_manager/README.md Remove GitHub back-reference/cross-language link; fix related-example link target to Motoko sibling.
motoko/vetkeys/password_manager_with_metadata/README.md Remove GitHub back-reference/cross-language link; fix related-example link target to Motoko sibling.
motoko/vetkeys/encrypted_notes_app_vetkd/README.md Remove GitHub back-reference and cross-language link.
motoko/vetkeys/basic_vetkd/README.md Remove GitHub back-reference and cross-language link.
motoko/vetkeys/basic_ibe/README.md Remove GitHub back-reference and cross-language link.
motoko/vetkeys/basic_bls_signing/README.md Remove GitHub back-reference and cross-language link.
motoko/threshold-schnorr/README.md Add ICP Ninja badge + callout under H1.
motoko/threshold-ecdsa/README.md Add ICP Ninja badge + callout under H1.
motoko/superheroes/README.md Add ICP Ninja badge + callout under H1.
motoko/send_http_post/README.md Add ICP Ninja badge + callout under H1.
motoko/send_http_get/README.md Add ICP Ninja badge + callout under H1.
motoko/query_stats/README.md Add ICP Ninja badge + callout under H1.
motoko/llm_chatbot/README.md Add ICP Ninja badge + callout under H1.
motoko/icp_transfer/README.md Remove cross-language counterpart sentence/link.
motoko/hello_world/README.md Replace GitHub back-reference with ICP Ninja badge + callout.
motoko/flying_ninja/README.md Add ICP Ninja badge + callout under H1.
motoko/filevault/README.md Add ICP Ninja badge + callout under H1.
motoko/evm_block_explorer/README.md Add ICP Ninja badge + callout; remove old commented “Deploying from ICP Ninja” section.
motoko/daily_planner/README.md Add ICP Ninja badge + callout under H1.
motoko/canister_logs/README.md Add ICP Ninja badge + callout under H1.
motoko/canister_factory/README.md Remove GitHub back-reference link (no badge added).
motoko/basic_bitcoin/README.md Add ICP Ninja badge + callout under H1.
motoko/backend_only/README.md Add ICP Ninja badge + callout under H1.
hosting/unity-webgl-template/README.md Remove GitHub back-reference link (no badge added).
hosting/static-website/README.md Remove GitHub back-reference link (no badge added).
hosting/react/README.md Add ICP Ninja badge + callout; remove old commented “Deploying from ICP Ninja” block.
hosting/photo-storage/README.md Remove GitHub back-reference link (no badge added).
hosting/oisy-signer-demo/README.md Add ICP Ninja badge + callout; remove old commented “Deploying from ICP Ninja” block.
hosting/godot-html5-template/README.md Remove GitHub back-reference link (no badge added).
AGENTS.md Document README hero template and ICP Ninja badge markup + eligibility rules.

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

Comment thread rust/basic_ethereum/README.md Outdated
Comment thread rust/backend_only/README.md Outdated
Comment thread motoko/backend_only/README.md Outdated
Comment thread AGENTS.md Outdated
Address PR review: apply the repo's 'canister' terminology convention to
all example READMEs (backend_only x2, backend_wasm64, who_am_i x2,
basic_ethereum, image-classification, basic_timelock_ibe) — all referred
to ICP canisters, not Ethereum contracts. Fix the AGENTS.md Import-URL
example where a nested `master` backtick span broke the inline code.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 70 out of 70 changed files in this pull request and generated no new comments.

Suppressed comments (1)

rust/backend_wasm64/README.md:6

  • The ICP Ninja badge/callout is being added here, but this example does not meet the eligibility rule documented in AGENTS.md ("Deployable in Ninja's no-terminal environment. No custom build scripts beyond the standard recipe build"). rust/backend_wasm64/icp.yaml uses a build.steps script that runs ./build.sh, so the README should not include the Ninja badge unless the eligibility rule is updated.

…ion badge

Per review: a badge should promise something a user can actually do on a
fresh deploy, not just a successful deployment.

- Remove the badge from rust/candid_type_generation: its list_neurons
  call returns only neurons readable by the caller, and a freshly
  deployed canister controls none, so it always returns empty.
- canister-info: restrict the local-only 'test' helper canister to the
  local environment (info methods accept any principal, so mainnet needs
  only the backend); note the mainnet usage in the README.
- receiving-icp: add a faucet-based 'try the receive flow' note (it
  already uses the TESTICP ledger on ic).
- AGENTS.md: add the 'demonstrable, not just deployable' eligibility
  criterion and the TESTICP/faucet guidance for token examples.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 70 out of 70 changed files in this pull request and generated no new comments.

Suppressed comments (1)

AGENTS.md:402

  • The ICP Ninja badge guidance reads a bit contradictory: it says “Eligible examples carry …” but later says examples that are eligible but not yet known to ICP Ninja should be proposed before adding the badge. Clarifying that the badge should be added only once an example is both eligible and confirmed/supported by Ninja would avoid confusion for future contributors.
[ICP Ninja](https://icp.ninja) is a browser-based IDE that deploys a project to the mainnet for free. Eligible examples carry an "Open in ICP Ninja" badge as the first thing under the H1, followed by a short callout:

Resolve a contradiction flagged in review: the badge guidance opened with
'eligible examples carry a badge' but closed by requiring eligible-but-
unknown examples to be proposed to Ninja first. State up front that a
badge requires both eligibility and Ninja support.
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.

6 participants