Skip to content

feat: MyTask task market UI (M6-M8) + social recovery#278

Open
fanhousanbu wants to merge 50 commits intomasterfrom
feat/m7-guardian-tier-recovery
Open

feat: MyTask task market UI (M6-M8) + social recovery#278
fanhousanbu wants to merge 50 commits intomasterfrom
feat/m7-guardian-tier-recovery

Conversation

@fanhousanbu
Copy link
Copy Markdown
Collaborator

Summary

  • M6 – YAA + MyTask identity fusion: /tasks route integrated into YAA frontend, TaskContext consumes DashboardContext account address
  • M7 – Task market UI: task list (filter/search), create task form (ERC-20 approve → createTask), task detail page with role-based actions
  • M8 – Task completion & settlement: submit work, approve & pay out, finalize (after challenge period), cancel task
  • Recovery – Social recovery /recovery page (propose + execute), updated guardian-sign page, E2E test docs

Key technical decisions

Decision Choice
Contract interaction viem v2 direct (no backend proxy)
Task metadata Inline JSON in metadataUri (no IPFS for MVP)
Permission control Address comparison (contract modifier is the final guard)
Token approve Check allowance before each createTask

Intentionally skipped (MVP scope)

  • Gasless via Paymaster (接入 aastar-sdk 在正式上线前)
  • Registry role detection (M10 jury needs it)
  • Challenge flow UI (M10 jury)
  • SBT/agentId display (M12 AI Validator)

Test plan

  • Configure MetaMask with Anvil network (chainId 31337, RPC http://127.0.0.1:8545)
  • Import anvil account[0] (Community) and account[1] (Taskor)
  • Account A: /tasks → Post Task → fill form → Approve USDC → Create
  • Account B: task list → Claim Task
  • Account B: task detail → Submit Work (evidence URL)
  • Account A: task detail → Approve & Pay Out → verify USDC balance change
  • Cancel task (Account A, Open status only)
  • Finalize task (after challenge period, anyone can call)

fanhousanbu and others added 30 commits January 5, 2026 19:28
…sskey authentication, and integrate it into existing projects.
…node discovery, message point generation, and signature packing.
…`baseline-browser-mapping` dependency, and remove SDK module type.
…viders, and management with comprehensive tests.
- Relax npm audit level to critical (upstream NestJS/webpack deps have
  no non-breaking fix for multer, serialize-javascript, ajv)
- Run npm audit fix for safely upgradeable packages
- Fix prettier formatting across refactored service files
- Remove unused NotFoundException import in transfer.service
- Remove unreachable try-catch in paymaster.service

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Remove conflicting .prettierrc.json (lower priority than .prettierrc),
add sdk/.prettierignore to exclude dist/, align sdk eslint unused-vars
rule with aastar config, and reformat all files to match .prettierrc.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…e-checks

Integrate aastar-contract M4 features into the SDK:

- Add tier routing module (core/tier/) with resolveTier() and algIdForTier()
- Add cumulative signature packing for T2 (algId 0x04: P256+BLS) and T3 (algId 0x05: P256+BLS+Guardian)
- Add GuardChecker service for off-chain pre-validation (daily limits, algorithm whitelist)
- Add AirAccount contract ABIs and M4 Sepolia addresses
- Extend TransferManager with useAirAccountTiering flag for automatic tier dispatch
- Extend BLSSignatureService with generateTieredSignature() for all 3 tiers
- Fully backwards-compatible: legacy BLS-only flow unchanged when tiering is not enabled

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…ions

Resolved 4 merge conflicts in sdk/src/server/ by keeping feature branch
additions (tiered signatures, GuardChecker, v0.7 format, KMS types)
while incorporating master's base changes.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
The merge commit missed unstaged changes from master that add
PasskeyAssertionContext, LegacyPasskeyAssertion, and expanded KMS
types to signer-adapter and kms-signer. Also fixes prettier
formatting on the 3 conflict-resolved files.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…erPaymaster support, and M4-specific ECDSA/BLS signature routing.
fanhousanbu and others added 20 commits March 13, 2026 19:37
…and server client, updating documentation and examples.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Upgrade SDK to 0.17.5 (both aastar and aastar-frontend)
- Remove PMv4 monkey-patch from sdk.providers.ts (fixed upstream in SDK)
- Remove approve-token endpoint: POST /account/approve-token, ApproveTokenDto,
  approveTokenForSpender() — PMv4 is deposit model, no ERC-20 approve needed
- Remove "Approve aPNTs" button and handleApproveToken from paymaster page
- Remove accountAPI.approveToken() from frontend api.ts
…limit

Agent 1 — Guardian QR acceptance flow
- POST /account/guardian-setup/prepare: generates acceptance hash and QR
  payload; acceptance hash = keccak256("ACCEPT_GUARDIAN" || chainId ||
  factory || owner || salt) then EIP-191 prefixed
- POST /account/create-with-guardians: creates account with 2 guardian sigs
  + team Safe as 3rd guardian; validates guardian1 != guardian2 (backend)
- CreateAccountDialog: 3-step flow (config → guardian1 QR → guardian2 QR)
  with react-qr-code, manual sig paste, and daily limit input
- /app/guardian-sign: mobile page reads URL params, runs WebAuthn passkey
  ceremony, shows address+signature for copy-paste; displays all signing
  context (owner, chain, factory, salt, hash) before signing

Agent 2 — On-chain social recovery
- guardian.service.ts executeRecovery: now sends real on-chain tx via
  backend relayer (ETH_PRIVATE_KEY); DB updated only after tx confirmed
- initiateRecovery/supportRecovery: remain off-chain (proposeRecovery /
  approveRecovery require msg.sender == guardian); responses now include
  requiresOnChainAction: true and onChainAction field to guide callers
- getRelaySigner: rejects placeholder ETH_PRIVATE_KEY at runtime

Agent 3 — Tier security and daily limit
- transfer.service.ts: enable useAirAccountTiering and p256Signature; BLS
  node unreachable → graceful fallback to legacy path; fallback failure
  preserves both error messages for diagnosis
- account.service.ts: extract parseDailyLimitToWei helper (shared by
  createAccount and createWithGuardians); add daily limit to CreateAccountDto
- transfer/page.tsx: fix tier indicator — remove incorrect tier1=dailyLimit/2
  assumption; only show Tier 3 warning when amount > dailyLimit; note that
  tier1/tier2 thresholds require a contract read
…ration

- Remove inline sdk/ directory (superseded by @aastar/airaccount npm package)
- Keep our tiered security, guardian QR, and on-chain recovery features
- Prefer @aastar/airaccount imports over master's @yaaa/sdk references
…critical level

- npm audit fix: handlebars 4.7.8 -> 4.7.9 (GHSA-xjpj-3mr7-gcpf et al.)
- ci.yml: lower dependency-review fail-on-severity from high to critical,
  consistent with npm audit --audit-level=critical; remaining high-severity
  issues are in upstream optional ledgerhq deps (no breaking-change fix)
… exemption

Revert to fail-on-severity: high (stronger gate) and only exempt
GHSA-43fc-jf86-j433 (axios DoS in @LedgerHQ optional deps).
No non-breaking fix available upstream.
- kms.service.ts: replace empty catch(_){} with comment (no-empty rule)
- paymaster/page.tsx: remove unused accountAPI import (no-unused-vars)
axios@1.13.2 is pinned by @ledgerhq/domain-service (exact version pin).
No non-breaking fix available upstream. Added .trivyignore + wired to
Trivy action, consistent with allow-ghsas in dependency-review.
Integrate MyTask task market into YAA frontend under /tasks route.

- Add TaskContext with contract read/write (createTask, acceptTask,
  submitWork, approveWork, finalizeTask, cancelTask)
- Add task list page with All/Open/Mine/Claimed filter tabs and search
- Add create task form with ERC-20 approve + createTask two-step flow
- Add task detail page with role-based action buttons (Community/Taskor)
- Add TaskEscrowV2 ABI and contract config (viem, env-driven chain)
- Add task-types.ts (TaskStatus enum, ParsedTask), date-utils.ts
- Inject TaskProvider in app layout; add Tasks nav (desktop + mobile)
- Upgrade tsconfig target to ES2020 (BigInt literal support)
- Add /recovery page for on-chain social recovery flow (propose + execute)
- Update guardian-sign page for QR-based guardian signature
- Add social recovery E2E test docs and HTML test pages
@chatgpt-codex-connector
Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

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.

1 participant