Repository navigation
Add IPFS CIDv0 computation and badge - #8
Merged
Merged
Conversation
Add unit tests for cidv0 and an E2E test for the badge. Update docs/architecture.md to list the new modules and include the CSS and main wiring that render the badge in the UI.
Deploying paternoster with
|
| Latest commit: |
e3d233b
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://db6fbc03.paternoster.pages.dev |
| Branch Preview URL: | https://kirushik-ipfs.paternoster.pages.dev |
There was a problem hiding this comment.
Pull request overview
Adds IPFS CIDv0 computation to the client and exposes it in the UI as a small “ipfs://…” badge, with accompanying unit + E2E coverage and architecture docs updates.
Changes:
- Introduces
src/ipfs.tsto compute CIDv0 (UnixFS/DAG-PB + multihash + base58btc). - Adds
src/cid.tsand wires it fromsrc/main.tsto self-fetch and render a CID badge in the UI (with new CSS). - Adds unit tests for
cidv0and an E2E assertion that the badge appears and matches CIDv0 format; updates module map docs.
Reviewed changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| tests/unit/ipfs.test.ts | Adds unit coverage for CIDv0 outputs and basic properties. |
| tests/e2e/basic.spec.ts | Adds E2E check that the CID badge renders with a CIDv0-looking value. |
| src/style.css | Styles the new fixed-position CID badge. |
| src/main.ts | Wires CID badge initialization into app startup. |
| src/ipfs.ts | Implements CIDv0 computation (UnixFS/DAG-PB protobuf + SHA-256 + base58btc). |
| src/cid.ts | Fetches the current page, computes CIDv0, and appends the badge element. |
| docs/architecture.md | Documents the new ipfs.ts and cid.ts modules. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Also fixed a couple of Copilot nits
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Add unit tests for cidv0 and an E2E test for the badge. Update docs/architecture.md to list the new modules and include the CSS and main wiring that render the badge in the UI.