Conversation
#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
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (9)
💤 Files with no reviewable changes (3)
📝 WalkthroughWalkthroughThe 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. ChangesObligation verification and transaction support
Estimated code review effort: 5 (Critical) | ~120 minutes Possibly related PRs
Suggested reviewers: 🚥 Pre-merge checks | ✅ 3 | ❌ 2❌ Failed checks (1 warning, 1 inconclusive)
✅ Passed checks (3 passed)
✨ Finishing Touches 💡 1📝 Generate docstrings 💡
🧪 Generate unit tests (beta)
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. Comment |
There was a problem hiding this comment.
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 winFix the reported Stylelint errors.
Remove the empty lines before
widthandflex. Remove quotes from theUrbanistfont 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 winPrevent stale escrow resolution from overwriting current contract state.
When
isObligationchanges while an earlierupdateTitleEscrowcall is pending, the earlier call can finish last. It can then store a classicTitleEscrowinstance 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 winAdd a valid obligation flow test.
Line 36 keeps the default fixture compatible. Add a case with
verifyStatus: 'valid'andisObligation: true. Assert thatuseEndorsementChainreceives 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 winAdd routing tests for
rejectanddischarge.This suite verifies
accept, but it does not verify the newrejectObligationRegistryanddischargeObligationRegistryroutes. 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
⛔ Files ignored due to path filters (1)
package-lock.jsonis excluded by!**/package-lock.json
📒 Files selected for processing (45)
package.jsonsrc/components/AssetManagementPanel/AssetManagementActions/index.tsxsrc/components/AssetManagementPanel/AssetManagementApplication/index.tsxsrc/components/AssetManagementPanel/AssetManagementForm/AssetManagementDropdown/AssetManagementDropdown.tsxsrc/components/AssetManagementPanel/AssetManagementForm/AssetManagementForm.test.tsxsrc/components/AssetManagementPanel/AssetManagementForm/AssetManagementForm.tsxsrc/components/AssetManagementPanel/AssetManagementForm/FormVariants/ActionForm/ActionForm.tsxsrc/components/AssetManagementPanel/AssetManagementForm/FormVariants/ActionForm/types.tssrc/components/AssetManagementPanel/AssetManagementForm/FormVariants/ActionSelectionForm/ActionSelectionForm.obligation.test.tsxsrc/components/AssetManagementPanel/AssetManagementForm/FormVariants/ActionSelectionForm/ActionSelectionForm.test.tsxsrc/components/AssetManagementPanel/AssetManagementForm/FormVariants/ActionSelectionForm/ActionSelectionForm.tsxsrc/components/Dropdown/Dropdown.tsxsrc/components/common/Overlay/OverlayContent/DocumentTransferMessage.tsxsrc/components/common/contexts/DocumentContext/DocumentContext.tsxsrc/components/common/contexts/TokenInformationContext/TokenInformationContext.tsxsrc/components/common/contexts/providerContext.tsxsrc/components/home/EndorsementChain/useEndorsementChain.test.tssrc/components/home/EndorsementChain/useEndorsementChain.tssrc/components/home/VerifySection/VerifyResult.tsxsrc/components/home/VerifySection/VerifySection.test.tsxsrc/components/home/VerifySection/VerifySection.tsxsrc/components/home/VerifySection/useVerify.test.tssrc/components/home/VerifySection/useVerify.tssrc/constants/index.tssrc/constants/obligation.tssrc/gasless/gaslessHooks.test.tsxsrc/gasless/makeGaslessHook.tssrc/gasless/useGaslessAcceptReturned.tssrc/gasless/useGaslessNominate.tssrc/gasless/useGaslessRejectReturned.tssrc/gasless/useGaslessRejectTransferBeneficiary.tssrc/gasless/useGaslessRejectTransferHolder.tssrc/gasless/useGaslessRejectTransferOwners.tssrc/gasless/useGaslessReturnToIssuer.tssrc/gasless/useGaslessTransferBeneficiary.tssrc/gasless/useGaslessTransferHolder.tssrc/gasless/useGaslessTransferOwners.tssrc/hooks/useContractFunctionHook.obligation.test.tsxsrc/hooks/useContractFunctionHook.test.tsxsrc/hooks/useContractFunctionHook.tsxsrc/hooks/useIsObligation.tssrc/hooks/useTitleEscrowContract.tssrc/hooks/useTokenRegistryContract.tssrc/index.csssrc/utils/chain-utils.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>
Summary by CodeRabbit
docs.trustvc.io.