Skip to content

Develop - #103

Merged
rongquan1 merged 3 commits into
mainfrom
develop
Aug 13, 2026
Merged

Develop#103
rongquan1 merged 3 commits into
mainfrom
develop

Conversation

@manishdex25

@manishdex25 manishdex25 commented Aug 12, 2026

Copy link
Copy Markdown
Contributor

Summary by CodeRabbit

  • New Features
    • Added comprehensive support for BoE obligation records in verification and asset management.
    • Users can accept, reject, and discharge obligations with remarks and transaction feedback.
    • Added obligation-specific transfers, returns, nominations, gasless transactions, statuses, and endorsement chains.
    • Replaced the Partners navigation item with a Verticals menu linking to key platforms.
  • Bug Fixes
    • Improved wallet network handling, dropdown usability, and transaction error messages.
  • Documentation
    • Updated documentation links to docs.trustvc.io.

isaackps and others added 2 commits August 3, 2026 14:53
#97)

* feat: replace Partners tab with Verticals dropdown and remove partners page

- Navbar Partners tab is now a Verticals dropdown (desktop + mobile) linking
  to TradeTrust, OpenCerts, and SAL, opening in new tabs
- Remove /partners route and PartnersSection from Home
- Pin @trustvc/trustvc to 2.15.0-beta.2 in lockfile

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

* test: update navbar and home tests for Verticals dropdown

- Navbar/App tests: expect Verticals instead of removed Partners tab
- Add Verticals dropdown test asserting TradeTrust/OpenCerts/SAL links
- Drop Home Partners-section tests (section removed)

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

* fix: keep mobile Verticals submenu interactions contained on outside-click

The document mousedown handler closed the Verticals dropdown whenever the
target was outside the desktop dropdown container, so taps on the mobile
submenu (links and toggle) unmounted the target before click fired. Track
the mobile menu with its own ref and treat clicks inside either container
as contained.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
* feat: added integration for the trustvc sdk for the BOE beta version

* feat: updated package json

* feat: udpate the bligation functions for etr

* feat: fix coderabbit issues

* feat: integrate obligation handling in AssetManagement components

- Added isObligation prop to DocumentStatus and AssetManagementTags components to manage obligation-specific UI behavior.
- Enhanced ActionSelectionForm to display obligation status labels and manage visibility based on isObligation state.

* feat: fix overflow of the dropdown container

* chore: update @trustvc/trustvc and related dependencies to version 2.16.0-beta.3 and 2.4.2 in package.json and package-lock.json

* chore: update @trustvc/trustvc and related dependencies to version 2.16.0-beta.3 and 2.4.2 in package.json and package-lock.json (#102)

* chore: update package-lock.json to include new dependencies for @trustvc/trustvc
@coderabbitai

coderabbitai Bot commented Aug 12, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: b144a473-b40a-40f4-8f94-903181d2c0d3

📥 Commits

Reviewing files that changed from the base of the PR and between 0dd9acd and c88a5ae.

📒 Files selected for processing (9)
  • src/App.test.tsx
  • src/__tests__/home.test.tsx
  • src/components/common/Navbar/Navbar.test.tsx
  • src/components/common/Navbar/Navbar.tsx
  • src/components/home/BuiltForDev/BuiltForDev.test.tsx
  • src/components/home/BuiltForDev/BuiltForDev.tsx
  • src/components/home/VerifySection/VerifyError.tsx
  • src/pages/Home/index.tsx
  • src/routes.tsx
💤 Files with no reviewable changes (3)
  • src/pages/Home/index.tsx
  • src/tests/home.test.tsx
  • src/routes.tsx

📝 Walkthrough

Walkthrough

The change adds BoE obligation-record verification, contract and gasless transaction routing, accept/reject/discharge lifecycle actions, endorsement-chain handling, and related UI updates. It also replaces Partners navigation with a Verticals dropdown and updates documentation links.

Changes

Obligation verification and transaction support

Layer / File(s) Summary
Verification and chain handling
src/components/home/VerifySection/*, src/common/contexts/*, src/utils/chain-utils.ts, src/constants/*
Verification identifies obligation records, resolves registry metadata, exposes obligation state, and normalizes chain IDs.
Contract and transaction routing
src/hooks/*, src/gasless/*
Contract and gasless hooks route obligation actions to obligation-specific registry and escrow functions.
Lifecycle state and UI
src/components/AssetManagementPanel/*, src/components/common/Overlay/*
Asset management supports accept, reject, and discharge actions with remarks, pending states, confirmation handling, and operation-specific messages.
Endorsement chains and validation
src/components/home/EndorsementChain/*, src/*test*, src/index.css
Obligation endorsement chains and rendering are supported. Tests cover routing and status behavior. Dropdowns support flexible overlay layouts.
Navigation and documentation links
src/components/common/Navbar/*, src/pages/Home/index.tsx, src/routes.tsx, src/components/home/BuiltForDev/*, src/components/home/VerifySection/VerifyError.tsx
The Partners navigation and route are removed. The navbar renders responsive Verticals links, and documentation links use docs.trustvc.io.

Estimated code review effort: 5 (Critical) | ~120 minutes

Possibly related PRs

Suggested reviewers: rishabhs7, rongquan1

🚥 Pre-merge checks | ✅ 3 | ❌ 2

❌ Failed checks (1 warning, 1 inconclusive)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 50.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
Title check ❓ Inconclusive The title "Develop" is generic and does not describe the pull request's obligation support, UI updates, or documentation changes. Replace "Develop" with a concise title that identifies the main change, such as "Add obligation lifecycle support and update website navigation".
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches 💡 1
📝 Generate docstrings 💡
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch develop

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actionable comments posted: 2

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (2)
src/index.css (1)

4077-4129: 📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win

Fix the reported Stylelint errors.

Remove the empty lines before width and flex. Remove quotes from the Urbanist font family name. These declarations currently fail the configured Stylelint checks.

Proposed fix
- 
   width: 100%;
...
- 
   width: 100%;
...
- 
   flex: 1 1 auto;
...
-  font-family: 'Urbanist';
+  font-family: Urbanist;
...
-  font-family: 'Urbanist';
+  font-family: Urbanist;
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@src/index.css` around lines 4077 - 4129, Update the affected CSS declarations
in the dropdown styles: remove empty lines immediately before the width and flex
declarations, and use the unquoted Urbanist font-family value in the relevant
selectors, including .dropdown-item-text-frame h5 and .dropdown-btn h5.

Source: Linters/SAST tools

src/hooks/useTitleEscrowContract.ts (1)

61-99: 🎯 Functional Correctness | 🟠 Major | ⚡ Quick win

Prevent stale escrow resolution from overwriting current contract state.

When isObligation changes while an earlier updateTitleEscrow call is pending, the earlier call can finish last. It can then store a classic TitleEscrow instance after the hook has switched to an obligation record, or the reverse. Ignore results from superseded requests before every state update.

Proposed fix
+const latestRequestRef = useRef(0)
+
 const updateTitleEscrow = useCallback(async () => {
+  const requestId = ++latestRequestRef.current
   // ...
-  setDocumentOwner(titleEscrowOwner)
-  setTitleEscrow(instance as TitleEscrow)
-  setTitleEscrowAddress(address)
+  if (requestId !== latestRequestRef.current) return
+  setDocumentOwner(titleEscrowOwner)
+  setTitleEscrow(instance as TitleEscrow)
+  setTitleEscrowAddress(address)
 } catch (error) {
+  if (requestId !== latestRequestRef.current) return
   // ...
 }
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@src/hooks/useTitleEscrowContract.ts` around lines 61 - 99, Update
updateTitleEscrow in useTitleEscrowContract to track the latest request and
ignore superseded results, including errors, before every setDocumentOwner,
setTitleEscrow, setTitleEscrowAddress, and corresponding reset state update.
Ensure only the request matching the current provider, token, registry version,
and isObligation state can commit its resolved escrow instance or clear state.
🧹 Nitpick comments (2)
src/components/home/VerifySection/VerifySection.test.tsx (1)

36-36: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Add a valid obligation flow test.

Line 36 keeps the default fixture compatible. Add a case with verifyStatus: 'valid' and isObligation: true. Assert that useEndorsementChain receives the registry, token, chain, key, and obligation flag. This protects the new verification-to-endorsement-chain contract.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@src/components/home/VerifySection/VerifySection.test.tsx` at line 36, Add a
test case in the VerifySection test suite using verifyStatus 'valid' and
isObligation true, and assert that useEndorsementChain receives the expected
registry, token, chain, key, and obligation flag. Keep the existing fixture
default isObligation false unchanged.
src/hooks/useContractFunctionHook.obligation.test.tsx (1)

127-153: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Add routing tests for reject and discharge.

This suite verifies accept, but it does not verify the new rejectObligationRegistry and dischargeObligationRegistry routes. Add one test for each method. Assert the selected SDK function and the normalized obligation options.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@src/hooks/useContractFunctionHook.obligation.test.tsx` around lines 127 -
153, Add tests alongside the existing accept routing test for reject and
discharge in useContractFunctionHook. Configure the obligation document context,
invoke useContractFunctionHook with each method, and assert the corresponding
rejectObligationRegistry or dischargeObligationRegistry SDK function is called
with normalized obligation options, preserving the existing confirmation
behavior where applicable.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@src/components/home/VerifySection/useVerify.ts`:
- Around line 124-126: Update loadDocument to resolve the document’s chain
before invoking runVerification, and reuse the requiresNetworkSelection
pending-document flow when chainId is missing for transferable or obligation
records. Ensure URL-loaded obligation documents do not fall back to RPC chain 1
and instead require network selection. Add a test covering an obligation
document loaded through ActionLoader without a chain ID.

In `@src/gasless/makeGaslessHook.ts`:
- Around line 99-115: Update the obligation branch in the gasless hook factory
so it validates the active wallet chain against the normalized document chain
before invoking config.obligationFn. Prefer passing the existing document-chain
preflight into this factory and run it immediately before the obligationFn call,
preserving the current transaction state and receipt handling.

---

Outside diff comments:
In `@src/hooks/useTitleEscrowContract.ts`:
- Around line 61-99: Update updateTitleEscrow in useTitleEscrowContract to track
the latest request and ignore superseded results, including errors, before every
setDocumentOwner, setTitleEscrow, setTitleEscrowAddress, and corresponding reset
state update. Ensure only the request matching the current provider, token,
registry version, and isObligation state can commit its resolved escrow instance
or clear state.

In `@src/index.css`:
- Around line 4077-4129: Update the affected CSS declarations in the dropdown
styles: remove empty lines immediately before the width and flex declarations,
and use the unquoted Urbanist font-family value in the relevant selectors,
including .dropdown-item-text-frame h5 and .dropdown-btn h5.

---

Nitpick comments:
In `@src/components/home/VerifySection/VerifySection.test.tsx`:
- Line 36: Add a test case in the VerifySection test suite using verifyStatus
'valid' and isObligation true, and assert that useEndorsementChain receives the
expected registry, token, chain, key, and obligation flag. Keep the existing
fixture default isObligation false unchanged.

In `@src/hooks/useContractFunctionHook.obligation.test.tsx`:
- Around line 127-153: Add tests alongside the existing accept routing test for
reject and discharge in useContractFunctionHook. Configure the obligation
document context, invoke useContractFunctionHook with each method, and assert
the corresponding rejectObligationRegistry or dischargeObligationRegistry SDK
function is called with normalized obligation options, preserving the existing
confirmation behavior where applicable.
🪄 Autofix

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 Plus

Run ID: 7b8e8967-35cc-44c0-bd8a-ddac0efb64b4

📥 Commits

Reviewing files that changed from the base of the PR and between fa08146 and 0dd9acd.

⛔ Files ignored due to path filters (1)
  • package-lock.json is excluded by !**/package-lock.json
📒 Files selected for processing (45)
  • package.json
  • src/components/AssetManagementPanel/AssetManagementActions/index.tsx
  • src/components/AssetManagementPanel/AssetManagementApplication/index.tsx
  • src/components/AssetManagementPanel/AssetManagementForm/AssetManagementDropdown/AssetManagementDropdown.tsx
  • src/components/AssetManagementPanel/AssetManagementForm/AssetManagementForm.test.tsx
  • src/components/AssetManagementPanel/AssetManagementForm/AssetManagementForm.tsx
  • src/components/AssetManagementPanel/AssetManagementForm/FormVariants/ActionForm/ActionForm.tsx
  • src/components/AssetManagementPanel/AssetManagementForm/FormVariants/ActionForm/types.ts
  • src/components/AssetManagementPanel/AssetManagementForm/FormVariants/ActionSelectionForm/ActionSelectionForm.obligation.test.tsx
  • src/components/AssetManagementPanel/AssetManagementForm/FormVariants/ActionSelectionForm/ActionSelectionForm.test.tsx
  • src/components/AssetManagementPanel/AssetManagementForm/FormVariants/ActionSelectionForm/ActionSelectionForm.tsx
  • src/components/Dropdown/Dropdown.tsx
  • src/components/common/Overlay/OverlayContent/DocumentTransferMessage.tsx
  • src/components/common/contexts/DocumentContext/DocumentContext.tsx
  • src/components/common/contexts/TokenInformationContext/TokenInformationContext.tsx
  • src/components/common/contexts/providerContext.tsx
  • src/components/home/EndorsementChain/useEndorsementChain.test.ts
  • src/components/home/EndorsementChain/useEndorsementChain.ts
  • src/components/home/VerifySection/VerifyResult.tsx
  • src/components/home/VerifySection/VerifySection.test.tsx
  • src/components/home/VerifySection/VerifySection.tsx
  • src/components/home/VerifySection/useVerify.test.ts
  • src/components/home/VerifySection/useVerify.ts
  • src/constants/index.ts
  • src/constants/obligation.ts
  • src/gasless/gaslessHooks.test.tsx
  • src/gasless/makeGaslessHook.ts
  • src/gasless/useGaslessAcceptReturned.ts
  • src/gasless/useGaslessNominate.ts
  • src/gasless/useGaslessRejectReturned.ts
  • src/gasless/useGaslessRejectTransferBeneficiary.ts
  • src/gasless/useGaslessRejectTransferHolder.ts
  • src/gasless/useGaslessRejectTransferOwners.ts
  • src/gasless/useGaslessReturnToIssuer.ts
  • src/gasless/useGaslessTransferBeneficiary.ts
  • src/gasless/useGaslessTransferHolder.ts
  • src/gasless/useGaslessTransferOwners.ts
  • src/hooks/useContractFunctionHook.obligation.test.tsx
  • src/hooks/useContractFunctionHook.test.tsx
  • src/hooks/useContractFunctionHook.tsx
  • src/hooks/useIsObligation.ts
  • src/hooks/useTitleEscrowContract.ts
  • src/hooks/useTokenRegistryContract.ts
  • src/index.css
  • src/utils/chain-utils.ts

Comment thread src/components/home/VerifySection/useVerify.ts
Comment thread src/gasless/makeGaslessHook.ts
* feat: replace Partners tab with Verticals dropdown and remove partner… (#97) (#101)

* feat: replace Partners tab with Verticals dropdown and remove partners page

- Navbar Partners tab is now a Verticals dropdown (desktop + mobile) linking
  to TradeTrust, OpenCerts, and SAL, opening in new tabs
- Remove /partners route and PartnersSection from Home
- Pin @trustvc/trustvc to 2.15.0-beta.2 in lockfile



* test: update navbar and home tests for Verticals dropdown

- Navbar/App tests: expect Verticals instead of removed Partners tab
- Add Verticals dropdown test asserting TradeTrust/OpenCerts/SAL links
- Drop Home Partners-section tests (section removed)



* fix: keep mobile Verticals submenu interactions contained on outside-click

The document mousedown handler closed the Verticals dropdown whenever the
target was outside the desktop dropdown container, so taps on the mobile
submenu (links and toggle) unmounted the target before click fired. Track
the mobile menu with its own ref and treat clicks inside either container
as contained.



---------

Co-authored-by: Claude Fable 5 <noreply@anthropic.com>

* feat: update links

---------

Co-authored-by: isaackps <isaac.kps.work@gmail.com>
Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
@coderabbitai coderabbitai Bot mentioned this pull request Aug 13, 2026
@rongquan1
rongquan1 merged commit 51ca29e into main Aug 13, 2026
13 checks passed
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.

3 participants