feat: add zero-build dashproof-lite + dashmint-lite single-file companions#71
feat: add zero-build dashproof-lite + dashmint-lite single-file companions#71
Conversation
Mirror the React app's sidebar layout (logo, nav, connection dot) and render verify/history results as structured anchor cards instead of raw JSON, keeping the file fully self-contained. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
… comments Strip the full theme/anchor-card UI back to a bare-bones sidebar shell, group the Dash Platform SDK calls (connect + queries) into a labeled top section, and add comments throughout to make it readable as a learning example. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Reorder dashproof-lite.html so the Dash Platform SDK surface (connect + queries) is grouped at the top of the script, and replace the raw JSON output with simple per-anchor cards (title row + definition list). Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Pull Inter from Google Fonts, switch the active-nav indicator to a left accent bar, tint section panels with a soft shadow, and bump radii/text colors to match the React app's surface palette. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Move the single-file companion into public/ so Vite copies it into the React app's dist/ on deploy. Add a one-line pointer in the app's CLAUDE.md so it's discoverable alongside src/dash, test, and e2e. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Mirrors the dashproof-lite pattern: zero-build companion served from public/, loads @dashevo/evo-sdk from esm.sh, queries the card contract read-only, and renders results as a responsive grid of rarity-tinted tiles with attack/defense stats and a marketplace toggle. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
Warning Rate limit exceeded
To keep reviews running without waiting, you can enable usage-based add-on for your organization. This allows additional reviews beyond the hourly cap. Account admins can enable it under billing. ⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (2)
📝 WalkthroughWalkthroughTwo companion "lite" HTML pages are introduced for DashMint and DashProof example apps—single-file, browser-based UIs that connect to Dash Platform testnet in read-only mode. Supporting configuration updates, documentation, and Playwright tests for DashProof are included. Changes
Sequence Diagram(s)sequenceDiagram
participant Browser as Browser Client
participant SDK as EvoSDK
participant Platform as Dash Platform<br/>(Testnet)
Browser->>Browser: On Page Load
Browser->>SDK: testnetTrusted()
SDK->>Platform: Connect
Platform-->>SDK: Connected
SDK-->>Browser: Ready
Browser->>Browser: Display "Connected to testnet"
alt All Cards Mode
Browser->>Browser: User clicks Refresh
Browser->>SDK: Query card contract<br/>(limit: 100)
SDK->>Platform: Fetch documents
Platform-->>SDK: Card documents
SDK-->>Browser: Normalized results
else Marketplace Only Mode
Browser->>Browser: User clicks Refresh
Browser->>SDK: Query card contract<br/>(limit: 100)
SDK->>Platform: Fetch documents
Platform-->>SDK: Card documents
SDK-->>Browser: Normalized results
Browser->>Browser: Filter: $price > 0
end
Browser->>Browser: Render card tiles<br/>(stats, rarity, price)
Browser->>Browser: Display count & status
sequenceDiagram
participant Browser as Browser Client
participant SHA as Browser SHA-256
participant SDK as EvoSDK
participant Platform as Dash Platform<br/>(Testnet)
Browser->>Browser: On Page Load
Browser->>SDK: testnetTrusted()
SDK->>Platform: Connect
Platform-->>SDK: Connected
SDK-->>Browser: Ready
alt Verify Proof Tab
Browser->>Browser: User selects file
Browser->>SHA: Hash file (SHA-256)
SHA-->>Browser: Hex digest
Browser->>Browser: Encode to base64
Browser->>SDK: Query anchor by entryHash
SDK->>Platform: Fetch anchor record
Platform-->>SDK: Anchor document(s)
SDK-->>Browser: Result
Browser->>Browser: Render anchor card<br/>(fixture name, hash)
else History by ChainId Tab
Browser->>Browser: User enters chainId
Browser->>SDK: Query anchors by chainId
SDK->>Platform: Fetch anchor records
Platform-->>SDK: Anchor documents
SDK-->>Browser: Results (newest-first)
Browser->>Browser: Render history cards
end
Browser->>Browser: Display status &<br/>handle errors
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~28 minutes Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Warning Review ran into problems🔥 ProblemsTimed out fetching pipeline failures after 30000ms Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Review rate limit: 0/1 reviews remaining, refill in 34 minutes and 21 seconds.Comment |
…om Prettier Cover the single-file companion's read-only flows (connect, verify match/miss, history hit/miss, tab switching) against live testnet via the existing dashproof-lab Playwright config. Also pin the hand-tuned dashproof-lite and dashmint-lite HTML files in their respective .prettierignore so npm run format stops doubling their line count. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
There was a problem hiding this comment.
Actionable comments posted: 3
🧹 Nitpick comments (1)
example-apps/dashproof-lab/e2e/lite.spec.ts (1)
27-27: ⚡ Quick winMark this suite parallel to match the repo's read-only E2E convention.
These tests only read, so leaving the suite at Playwright's default serial mode makes the new lite coverage slower than the rest of the read-only specs.
Suggested change
test.describe("dashproof-lite (single-file companion)", () => { + test.describe.configure({ mode: "parallel" });As per coding guidelines, "Read-only specs in e2e/ tests run in parallel; anchor-write specs are forced serial via
test.describe.configure({ mode: "serial" })to avoid concurrent writes to the same identity."🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@example-apps/dashproof-lab/e2e/lite.spec.ts` at line 27, Mark the test suite for parallel execution by configuring the Playwright describe block: inside the existing test.describe("dashproof-lite (single-file companion)", ...) block call test.describe.configure({ mode: "parallel" }) (or equivalently configure the describe before tests run) so the suite runs in parallel with other read-only e2e specs; update the describe around the symbol test.describe("dashproof-lite (single-file companion)", ...) to include this configuration.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@example-apps/dashmint-lab/public/dashmint-lite.html`:
- Around line 137-147: The marketplace currently only queries the first page
(limit:100) in listAllCards(), causing priced cards beyond that page to be
missing; update listAllCards (and the similar logic around render/market at the
other occurrence) to paginate through the contract results until no more pages
(collecting all documents before calling normalizeCards and client-side market
filtering) or, if full pagination is undesirable, change the UI/text to clearly
label the view as a "first-page sample" so users know results are limited;
locate listAllCards and the render/market filtering code to implement pagination
or add the sample label.
In `@example-apps/dashproof-lab/public/dashproof-lite.html`:
- Around line 95-97: The history view currently calls listByChain() but only
fetches the first page (100 items) so the UI is silently truncated; update the
code that builds the "History by chainId" view (referencing listByChain and the
chain-id input/button handlers) to either iterate pagination until no next page
(calling listByChain repeatedly with the returned continuation token/page
parameter and appending results) or explicitly surface that the view is capped
(change the heading/description and add a "Load more" button that requests the
next page). Ensure you append additional anchors to the existing list rather
than replacing it and preserve any existing sort order/state so users can
request subsequent pages or see a clear “showing first 100” note.
- Around line 119-122: Update the unpinned esm.sh import to a fixed SDK version:
replace the bare import of EvoSDK ("import { EvoSDK } from
'https://esm.sh/@dashevo/evo-sdk';") with the versioned package specifier used
by the apps (e.g. "import { EvoSDK } from
'https://esm.sh/@dashevo/evo-sdk@3.1.0-dev.1';") in this file and make the
identical change in public/dashmint-lite.html so both lite pages pin the same
`@dashevo/evo-sdk`@3.1.0-dev.1 version for reproducible deployments.
---
Nitpick comments:
In `@example-apps/dashproof-lab/e2e/lite.spec.ts`:
- Line 27: Mark the test suite for parallel execution by configuring the
Playwright describe block: inside the existing test.describe("dashproof-lite
(single-file companion)", ...) block call test.describe.configure({ mode:
"parallel" }) (or equivalently configure the describe before tests run) so the
suite runs in parallel with other read-only e2e specs; update the describe
around the symbol test.describe("dashproof-lite (single-file companion)", ...)
to include this configuration.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: 03df13b6-e85a-407e-92d6-50c380fe8d82
📒 Files selected for processing (7)
example-apps/dashmint-lab/.prettierignoreexample-apps/dashmint-lab/CLAUDE.mdexample-apps/dashmint-lab/public/dashmint-lite.htmlexample-apps/dashproof-lab/.prettierignoreexample-apps/dashproof-lab/CLAUDE.mdexample-apps/dashproof-lab/e2e/lite.spec.tsexample-apps/dashproof-lab/public/dashproof-lite.html
Both lite pages were importing @dashevo/evo-sdk via the bare esm.sh specifier, silently following the npm latest tag. Pin to 3.1.0-dev.1 so they track the same SDK version each app's package.json depends on. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Summary
public/dashproof-lite.html(read-only Verify + History) andpublic/dashmint-lite.html(read-only card browser with Marketplace-only toggle) to the existing example apps.@dashevo/evo-sdkdirectly fromesm.sh— no bundler, no install, no React. They visually echo the React apps' light-mode shells and serve as a minimal learning reference for the SDK query patterns each app uses.<owner>.github.io/<repo>/<app>/<app>-lite.htmlautomatically — the existingdeploy-example-apps.ymlworkflow needs no changes because Vite copiespublic/*intodist/on build.CLAUDE.mdgets a one-line pointer to its*-lite.htmlso the file is discoverable next tosrc/dash,test, etc.Summary by CodeRabbit
New Features
Tests
Documentation