Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
18 commits
Select commit Hold shift + click to select a range
54ca966
feat: migrate to Tangle evm (#3090)
drewstone Mar 3, 2026
0af5700
chore(repo): align node metadata and refresh operator-layer docs (#3136)
drewstone Mar 3, 2026
13da2e3
fix(wallet-flows): honor browser launch preflight and timeout defaults
drewstone Mar 3, 2026
7ae9b77
feat(wallet-flows): add docker xvfb runner and runtime overrides
drewstone Mar 3, 2026
72f4923
fix(wallet-flows): enforce strict pass criteria in suite reporting
drewstone Mar 3, 2026
1204ded
refactor(dapp): wallet-flow hardening + polkadot isolation to migrati…
drewstone Mar 4, 2026
6ccfb53
test(wallet-flows): harden launch signoff criteria and wallet preflig…
drewstone Mar 5, 2026
5e23784
process: adopt harness engineering spec + release gate checklist (#3141)
drewstone Mar 5, 2026
7103ff9
chore: bump actions/setup-node from 4.4.0 to 6.3.0 (#3143)
dependabot[bot] Mar 20, 2026
edb76cf
chore: bump actions/create-github-app-token from 2 to 3 (#3146)
dependabot[bot] Mar 20, 2026
13708d2
chore: bump @storybook/core-server from 8.6.12 to 8.6.14 (#3144)
dependabot[bot] Mar 20, 2026
a81f9c1
chore: bump @swc-node/register from 1.10.10 to 1.11.1 (#3145)
dependabot[bot] Mar 20, 2026
34df4ec
docs: add app state audit and tighten CLAUDE harness process (#3142)
drewstone Mar 20, 2026
218e39c
feat(tangle-cloud): shielded payments sidebar — pool, credits, spend …
drewstone Mar 21, 2026
dc116ec
fix(tangle-cloud): resolve round-2 payment review findings (#3148)
drewstone Mar 21, 2026
70a0953
[RELEASE] Merge develop into master
drewstone Mar 21, 2026
d512c3a
fix: regenerate yarn.lock after develop→master merge
drewstone Mar 21, 2026
ba5c65c
fix: remove stale BN import from merge artifact
drewstone Mar 21, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ export NX_ADD_PLUGINS=false
export ESLINT_USE_FLAT_CONFIG=false

export VITE_GRAPHQL_ENDPOINT='https://mainnet-gql.tangle.tools/graphql'
# Cloud -> dApp deep-link base URL override (defaults to https://app.tangle.tools/)
export VITE_TANGLE_DAPP_URL='https://app.tangle.tools/'

# Credits claim data (off-chain proofs)
export VITE_CREDITS_TREE_URL='/data/credits-tree.json'
Expand Down
9 changes: 9 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,3 +23,12 @@ _Specify any issues that can be closed from these changes (e.g. `Closes #233`)._
### Screen Recording

_If possible provide screenshots and/or a screen recording of proposed change._

### Harness Validation (Required for Launch-Flow Impact)

_If this PR affects any launch flow, attach harness evidence and release-gate output._

- [ ] I ran `yarn test:wallet-flows` (or targeted flow subset) and reviewed `suite/report.json`.
- [ ] I checked `suite/release-matrix.md` and confirmed class distribution (`happy-path-pass` / `blocker-or-partial-pass` / `failed`).
- [ ] I ran `yarn test:wallet-flows:gate` and included output summary.
- [ ] For critical flows (`FLOW-001,002,005,010,011,013,014,018,019`), I confirmed `happy-path-pass` (or documented explicit exception + owner sign-off).
2 changes: 1 addition & 1 deletion .github/workflows/auto-sync-master-with-develop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/create-github-app-token@v2
- uses: actions/create-github-app-token@v3
id: app-token
with:
app-id: ${{ vars.AUTO_SYNC_BRANCHES_APP_ID }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/check-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ jobs:
corepack enable

- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4.4.0
uses: actions/setup-node@v6.3.0
with:
node-version: ${{ matrix.node-version }}
cache: yarn
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/check-lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:
corepack enable

- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4.4.0
uses: actions/setup-node@v6.3.0
with:
node-version: ${{ matrix.node-version }}
cache: yarn
Expand Down Expand Up @@ -56,7 +56,7 @@ jobs:
corepack enable

- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4.4.0
uses: actions/setup-node@v6.3.0
with:
node-version: ${{ matrix.node-version }}
cache: yarn
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/check-pr-title.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
corepack enable

- name: Set up Node.js environment
uses: actions/setup-node@v4.4.0
uses: actions/setup-node@v6.3.0
with:
node-version: '>=18.18.x'

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/deploy-storybook-docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ jobs:
corepack enable

- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4.4.0
uses: actions/setup-node@v6.3.0
with:
node-version: ${{ matrix.node-version }}
cache: yarn
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release-dapps.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ jobs:
corepack enable

- name: Setup Node.js environment
uses: actions/setup-node@v4.4.0
uses: actions/setup-node@v6.3.0
with:
node-version: '>=18.18.x'
cache: yarn
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release-libs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ jobs:
corepack enable

- name: Setup Node.js environment
uses: actions/setup-node@v4.4.0
uses: actions/setup-node@v6.3.0
with:
node-version: '>=18.18.x'
cache: yarn
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ jobs:
corepack enable

- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4.4.0
uses: actions/setup-node@v6.3.0
with:
node-version: ${{ matrix.node-version }}
cache: yarn
Expand Down
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,8 @@ vitest.config.*.timestamp*
reports/
agent-results/
.agent-wallet-profile/
.agent-wallet-profile*/
.wallet-extensions/
.cursor/rules/nx-rules.mdc
.github/instructions/nx.instructions.md

Expand Down
4 changes: 4 additions & 0 deletions .lycheeignore
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,10 @@ https://stats.tangle.tools
# Something happened with conventional commits link, temporary disabled to fix the CI
https://www.conventionalcommits.org/en/v1.0.0/

# External sites that block bots or have intermittent Cloudflare errors
https://www.tangle.tools/
https://openai.com/index/harness-engineering/

# Files
/**/CHANGELOG.md

Expand Down
5 changes: 5 additions & 0 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,3 +31,8 @@
- Seed scripts (Substrate dev):
- `yarn script:setupServices` (create blueprints)
- `yarn script:setupStaking` (LST/vault/operator staking fixtures)

## Harness runbook
- Operating spec: `docs/harness-engineering-spec.md`
- Execution checklist: `docs/harness-engineering-checklist.md`
- Wallet flow suite usage: `docs/wallet-flow-suite.md`
59 changes: 50 additions & 9 deletions CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ This file provides guidance to Claude Code (claude.ai/code) when working with co

## Project Overview

This is the Tangle dApp monorepo - a collection of decentralized applications serving as the frontend for the Tangle Network, a Substrate-based cryptocurrency network in the Polkadot ecosystem. Tangle is a layer 1 for on-demand services where developers can build and monetize decentralized services using Tangle Blueprints.
This is the Tangle dApp monorepo - a collection of decentralized applications for the Tangle Operator Layer for AI services, built on the TNT EVM protocol stack (`tnt-core`).

The monorepo uses Nx for fast, extensible building with `apps/` containing interfaces and `libs/` containing shared code.

Expand Down Expand Up @@ -45,32 +45,66 @@ yarn generate:release # Review version bumps and changelog
## Architecture & Key Concepts

### Applications (apps/)
- **tangle-dapp**: Main dApp for managing Tangle Network assets and MPC services
- **tangle-cloud**: Cloud interface for Tangle services
- **leaderboard**: Validator leaderboard application

- **tangle-dapp**: Main dApp for staking, delegation, rewards, migration claims, and wallet flows
- **tangle-cloud**: Operator/developer interface for blueprint and service lifecycle management
- **leaderboard**: Points and participation leaderboard

### Libraries (libs/)

- **abstract-api-provider**: Base classes unifying API across providers
- **api-provider-environment**: React contexts, app events, error handling
- **browser-utils**: Browser utilities (fetch, download, logger, storage)
- **dapp-config**: Chain/wallet configurations for dApps
- **dapp-types**: Shared TypeScript types and interfaces
- **icons**: Shared icon components
- **polkadot-api-provider**: Substrate/Polkadot provider for blockchain interaction
- **polkadot-api-provider**: Legacy chain provider used only by migration-claim flows
- **solana-api-provider**: Solana blockchain provider
- **tangle-shared-ui**: Tangle-specific logic, hooks, utilities (shared between dApps)
- **ui-components**: Generic reusable UI components
- **web3-api-provider**: EVM provider for blockchain interaction

### Tech Stack

- **Frontend**: Vite, TypeScript, React, TailwindCSS
- **Blockchain**: PolkadotJS with auto-generated types (`@tangle-network/tangle-substrate-types`)
- **Blockchain**: EVM-first (`viem`/`wagmi`) with limited PolkadotJS usage for migration-claim interoperability
- **Build System**: Nx monorepo
- **Styling**: TailwindCSS with custom preset

## Development Guidelines

### Execution Posture (Senior IC / Tech Lead)

- Default to ownership and execution. When a goal is clear, proceed immediately without asking permission to continue.
- Prefer decisive action over proposal loops. Bring work to completion end-to-end (implementation, verification, reporting).
- Escalate only for true external blockers (missing credentials, unavailable infrastructure, irreversible risk), and name the exact blocker.
- Report status with concrete evidence (commands run, pass/fail, remaining gaps), not vague progress language.
- For release-readiness tasks, drive to production-grade confidence: strict validation, explicit failure reasons, and concrete remediation steps.
- Avoid “do you want me to…” phrasing when the expected next step is obvious from context.
- For launch-flow-impacting changes, follow `docs/harness-engineering-spec.md` and complete `docs/harness-engineering-checklist.md` before requesting merge.

### Harness Release Process (Succinct)

- Scope launch-impacting work to explicit flow IDs in `docs/launch-readiness-board.csv`.
- Run harness suite: `yarn test:wallet-flows` and inspect `suite/report.json` + `suite/release-matrix.md`.
- Enforce gate: `yarn test:wallet-flows:gate` (or `:strict` when required).
- Critical flows (`FLOW-001,002,005,010,011,013,014,018,019`) must be `happy-path-pass` unless exception owner/ETA is documented.
- Include matrix summary and gate output in PR using the harness section in `.github/PULL_REQUEST_TEMPLATE.md`.

### Wallet Flow Reliability (agent-browser-driver)

- Treat wallet E2E as environment-first: do not trust flow results until local chain + indexer + dApp are confirmed on the same network.
- Minimum readiness gate before running wallet flows:
- `http://127.0.0.1:8545` responds to `eth_chainId` with `0x7a69` (31337)
- Hasura GraphQL endpoint is reachable (typically `http://localhost:8080/v1/graphql`)
- dApp is started with local indexer env (`VITE_ENVIO_MAINNET_ENDPOINT` and `VITE_ENVIO_TESTNET_ENDPOINT` pointing to local Hasura)
- Use `scripts/local-env/start-local-env.sh` for deterministic local protocol state; if Docker ports are occupied (commonly `5433`), resolve port collisions first or set alternate `ENVIO_PG_PORT` / `HASURA_EXTERNAL_PORT`.
- Wallet preflight failures (`no-provider`, connector timeout, chain mismatch) must be treated as blockers for strict launch validation; only allow non-strict continuation for exploratory debugging.
- A suite result with `turns=0` is not valid evidence of agentic flow execution; treat it as runtime/LLM execution failure and fix provider/runtime conditions first.
- For local wallet runs, prefer persistent seeded profile + automated prompt settling, and ensure funding checks are active for connected local accounts.

### Code Style

- Use `const ... => {}` over `function ... () {}`
- React components: `const Component: FC<Props> = ({ prop1, prop2 }) => { ... }`
- Use `useMemo`/`useCallback` when appropriate (skip for simple calculations)
Expand All @@ -81,40 +115,47 @@ yarn generate:release # Review version bumps and changelog
- Avoid `as` type casting and `any` type

### Folder Structure (within apps)

- `utils/`: Utility functions (one function per file, same filename as function name)
- `components/`: Reusable "dumb" components specific to the app
- `containers/`: "Smart" components with business logic
- `hooks/`: React hooks for infrastructure logic
- `data/`: Data fetching hooks organized by domain (staking, liquid staking, etc.)
- `pages/`: Route pages for react-router-dom
- `abi/`: EVM ABI definitions for Substrate precompiles
- `abi/`: EVM ABI definitions for precompiles/contracts

### Important Notes

- **Localize changes**: Keep changes isolated to relevant projects unless shared libraries are involved
- **Package dependencies**: Don't assume packages exist - check imports or root `package.json` first
- **Number handling**: For values > u32 from chain, use `BN` or `bigint`. For u32 or smaller, use `.toNumber()`
- **Number handling**: Prefer `bigint`/`viem` primitives for chain values; avoid introducing new `BN` usage.
- **Monorepo scope**: Avoid cross-project changes unless working with shared libs
- **Storybook**: Considered legacy, avoid creating/modifying storybook files
- **Testing**: No testing libraries currently used or planned

### Branch Strategy

- Main development branch: `develop`
- Main branch for releases: `master`
- Release PRs should start with `[RELEASE]` in title

### Prerequisites

- Node.js v18.18.x or later
- Yarn package manager (v4.7.0)

## Working with Specific Libraries

### tangle-shared-ui

Contains Tangle-specific logic shared between dApps. Use this for functionality tied to Tangle Network context.

### ui-components

Generic, reusable components not tied to any specific context. Should be usable across different dApps.

### API Providers
- Use `polkadot-api-provider` for Substrate/Polkadot interactions

- Use `polkadot-api-provider` only where migration-claim compatibility requires it
- Use `web3-api-provider` for EVM interactions
- Use `abstract-api-provider` base classes when creating new providers
21 changes: 19 additions & 2 deletions agent-browser-driver.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -9,17 +9,34 @@ const parseList = (value) => {
.filter(Boolean);
};

const parseBoolean = (value, fallback) => {
if (value === undefined) {
return fallback;
}

const normalized = String(value).trim().toLowerCase();
if (['1', 'true', 'yes', 'on'].includes(normalized)) {
return true;
}
if (['0', 'false', 'no', 'off'].includes(normalized)) {
return false;
}

return fallback;
};

export default {
provider: process.env.AGENT_BROWSER_PROVIDER ?? 'openai',
model: process.env.AGENT_BROWSER_MODEL ?? 'gpt-4o',
outputDir: process.env.AGENT_BROWSER_OUTPUT_DIR ?? './agent-results/wallet-flows',
outputDir:
process.env.AGENT_BROWSER_OUTPUT_DIR ?? './agent-results/wallet-flows',
maxTurns: Number(process.env.AGENT_BROWSER_MAX_TURNS ?? 60),
timeoutMs: Number(process.env.AGENT_BROWSER_TIMEOUT_MS ?? 900_000),
vision: true,
goalVerification: true,
screenshotInterval: 2,
concurrency: 1,
headless: false,
headless: parseBoolean(process.env.AGENT_BROWSER_HEADLESS, false),
wallet: {
enabled: true,
extensionPaths: parseList(process.env.AGENT_WALLET_EXTENSION_PATHS),
Expand Down
10 changes: 5 additions & 5 deletions apps/leaderboard/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,15 +40,15 @@
- integrate cloud credits ([#3021](https://github.com/tangle-network/dapp/pull/3021))
- **tangle-cloud:** List operators in the Operators page ([#3005](https://github.com/tangle-network/dapp/pull/3005))
- **tangle-cloud:** List all blueprints ([#2987](https://github.com/tangle-network/dapp/pull/2987))
- **tangle-dapp:** Create restaking & services setup scripts ([#2986](https://github.com/tangle-network/dapp/pull/2986))
- **tangle-dapp:** Create staking & services setup scripts ([#2986](https://github.com/tangle-network/dapp/pull/2986))
- **tangle-dapp:** Add blueprint selection ([#2941](https://github.com/tangle-network/dapp/pull/2941))
- **tangle-dapp:** Add Protocol Stats Component ([#2966](https://github.com/tangle-network/dapp/pull/2966))
- **tangle-dapp:** Add Phantom wallet to dApp wallet provider ([#2885](https://github.com/tangle-network/dapp/pull/2885))

### 🩹 Fixes

- **tangle-dapp:** update result type and reduce refetch interval in useCredits ([#3026](https://github.com/tangle-network/dapp/pull/3026))
- **tangle-dapp:** Asset modal, restake action tabs & wallet dropdown fixes ([#3002](https://github.com/tangle-network/dapp/pull/3002))
- **tangle-dapp:** Asset modal, staking action tabs & wallet dropdown fixes ([#3002](https://github.com/tangle-network/dapp/pull/3002))
- **tangle-dapp:** Fix Theme Flickering, Disable Link ([#2953](https://github.com/tangle-network/dapp/pull/2953))

### 🏡 Chore
Expand All @@ -57,7 +57,7 @@
- bump @storybook/channels from 8.6.12 to 8.6.14 ([#3025](https://github.com/tangle-network/dapp/pull/3025))
- bump @radix-ui/react-tabs from 1.1.4 to 1.1.9 ([#3006](https://github.com/tangle-network/dapp/pull/3006))
- bump @vitest/ui from 3.1.1 to 3.1.2 ([#3007](https://github.com/tangle-network/dapp/pull/3007))
- **tangle-dapp:** Add Multiple RPC Endpoints Support for Polkadot APIs ([#2990](https://github.com/tangle-network/dapp/pull/2990))
- **tangle-dapp:** Add multiple RPC endpoint support for chain APIs ([#2990](https://github.com/tangle-network/dapp/pull/2990))
- Add initial Cursor rules ([#2998](https://github.com/tangle-network/dapp/pull/2998))
- bump framer-motion from 12.7.2 to 12.7.4 ([#2993](https://github.com/tangle-network/dapp/pull/2993))
- bump @hookform/resolvers from 3.10.0 to 5.0.1 ([#2972](https://github.com/tangle-network/dapp/pull/2972))
Expand All @@ -67,7 +67,7 @@
- bump typescript-eslint from 8.29.1 to 8.30.0 ([#2967](https://github.com/tangle-network/dapp/pull/2967))
- **tangle-dapp:** Update asset selection modal ([#2965](https://github.com/tangle-network/dapp/pull/2965))
- bump actions/create-github-app-token from 1 to 2 ([#2961](https://github.com/tangle-network/dapp/pull/2961))
- bump @polkadot/keyring from 13.3.1 to 13.4.3 ([#2962](https://github.com/tangle-network/dapp/pull/2962))
- bump keyring dependency from 13.3.1 to 13.4.3 ([#2962](https://github.com/tangle-network/dapp/pull/2962))
- **tangle-dapp:** Improve Vault Table ([#2956](https://github.com/tangle-network/dapp/pull/2956))

### 🎨 Styles
Expand Down Expand Up @@ -100,4 +100,4 @@

### ❤️ Thank You

- Trung-Tin Pham @AtelyPham
- Trung-Tin Pham @AtelyPham
2 changes: 1 addition & 1 deletion apps/leaderboard/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
<!-- Keywords for Search Engines -->
<meta
name="keywords"
content="Tangle Network, leaderboard, blockchain rankings, staking, liquid staking, nominating, network contributors, decentralized network, Substrate, EVM"
content="Tangle Network, leaderboard, blockchain rankings, staking, blueprints, operators, services, network contributors, decentralized network, EVM"
/>

<!-- Open Graph Tags for Social Media -->
Expand Down
Loading
Loading