Skip to content

feat(audit-trail): register routes and enhance layout for result view#194

Draft
alexruzenhack wants to merge 14 commits into
feat/audit-trail-searchfrom
feat/audit-trail-route
Draft

feat(audit-trail): register routes and enhance layout for result view#194
alexruzenhack wants to merge 14 commits into
feat/audit-trail-searchfrom
feat/audit-trail-route

Conversation

@alexruzenhack
Copy link
Copy Markdown
Contributor

@alexruzenhack alexruzenhack commented May 19, 2026

Description of change

This PR registers the routing for the Audit Trail feature and updates the PageHeader to support the new "Audit Trail" badge type.

Key Features and Changes

  • Routing: Added the /audit-trail/:id route mapping to the new AuditTrailResult component.
  • Layout Updates: Enhanced PageHeader and SideBySidePanels to support the specific layout requirements of the Audit Trail view.

How the change has been tested

Navigate to http://localhost:3000/audit-trail/[Insert Test ID] and verify the page wrapper loads correctly without crashing.

alexruzenhack and others added 11 commits May 15, 2026 10:53
# Description of change

- Extract the view `SideBySidePanelsView` as an UI component to be
reused as `SideBySidePanels`
- Extract a more specialized helper `objectOwnerHelper.ts`
- Move view `TransactionsView` to `/common` to let it be reused among
Trust Framework pages
- Move component `IdentityContent` a level down to let `/views` cluster
only view components
- Move `headerMetadataHelper` a level down to let it be reused among
Trust Framework pages

## Links to any relevant issues

N/A

## How the change has been tested

- [x] Basic tests (linting, compilation, formatting, unit/integration
tests)
- [ ] Patch-specific tests (correctness, functionality coverage)
- [ ] I have added tests that prove my fix is effective or that my
feature works
- [ ] I have checked that new and existing unit tests pass locally with
my changes
- Add notarization wasm dependency
- Configure wasm loading plugin to be triggered at building phase
- Enable notarization feature flag at apps-backend
- Rename identity.ts to client.ts
- Implement creation and initialization of notarization client and wasm
at client.ts
- Implement notarization react context and provider
- Add notarization constants
- update dependency lock file

N/A

Manually.
This PR introduces the **Notarization Result Page** to the Explorer,
providing users with a dedicated interface to inspect on-chain
Notarization documents and their current states.

- **Dedicated Routing:** Added a new `/notarization/:id` route
(`NotarizationResult`) to handle direct navigation to Notarization
objects.
- **Detailed Views:**
- `NotarizationSummaryView`: Displays essential object metrics,
including version count, storage rebate, and lifecycle timestamps.
- `StateView`: Intelligently parses the notarization state data,
rendering it as formatted JSON or falling back to raw text/Base64 if
needed.
- `NotarizationJsonView`: Exposes the raw, complete JSON structure of
the on-chain notarization object.
- **Data Resolution Hooks:** Introduced `useResolveNotarization` and
`useNotarizationState` to cleanly handle data fetching and state
decoding.
- **Metadata Integration:** Updated `headerMetadataHelper.ts` to
correctly recognize, label, and badge official IOTA Notarization objects
in the shared `PageHeader`.

N/A

Access the _Preview_ at
https://rebased-explorer-git-feat-notarization-result-page-iota1.vercel.app/notarization/0x23be2a1a617f0af6830ffe328c357df7c73de25b2013eef362e8cc09f9df9f57?network=testnet
to see a Dynamic notarization object.

Refer to
#138 (comment) at
_Test on testnet_ section to get more notarization objects IDs.

<img width="5388" height="5026" alt="image"
src="https://github.com/user-attachments/assets/8907360f-44a7-4b72-a4cf-7340b0fb184a"
/>
# Description of change

**Problem:** Users viewing a Notarization object in the explorer
currently cannot see its ownership history or the lock lifecycle
(Transfer/Update/Delete locks) governing it. This information is
critical for transparency and auditing trust-framework activities.

**Solution:**
- **Lock Lifecycle:** Added `LockLifecycleView` to interpret and display
the `LockMetadata` status (Unlocked, Time Locked, Permanently Locked)
and visualize expiration timers.
- **Ownership Reconstruction:** Added `OwnersView` and
`useGetNotarizationOwnerHistory`. Since L1 doesn't persist historical
ownership natively, this hook reconstructs the history by paginating
through transaction blocks that changed the object and identifying the
recipient/owner in `objectChanges`.
- **UI Components:** Introduced `IconBadge` to extend badges with an
icon (candidate to be moved to `ui-kit` later).

**Impact:** Full visibility into the lifecycle and ownership of
trust-framework notarization objects, empowering users to trace object
provenance.

*(Insert screenshots of LockLifecycleView and OwnersView here!)*

## Links to any relevant issues
N/A

## How the change has been tested
Manually tested on `testnet`.

**Reviewer Instructions:**
1. Run the explorer locally.
2. Ensure you have the notarization package configured
(`VITE_IOTA_NOTARIZATION_PKG_ID` in `.env`) or use a network with a
known package.
3. Navigate to
`/notarization/0x23be2a1a617f0af6830ffe328c357df7c73de25b2013eef362e8cc09f9df9f57?network=testnet`
4. Verify that the "Lock Lifecycle" and "Owners History" panels render
correctly in the side-by-side view.

Access the Preview at
https://rebased-explorer-git-feat-notarization-lock-owner-iota1.vercel.app/notarization/0x23be2a1a617f0af6830ffe328c357df7c73de25b2013eef362e8cc09f9df9f57?network=testnet
to see a Dynamic notarization object.

Refer to
#138 (comment) at
Test on testnet section to get more notarization objects IDs.

## Expected UI
<img width="3162" height="1926" alt="image"
src="https://github.com/user-attachments/assets/d121dbc3-2439-4f8b-9dbe-81301cbc8f59"
/>

---------

Co-authored-by: Marc Espin <mespinsanz@gmail.com>
# Description of change

This PR enables users to search for **Notarization** objects directly
from the Explorer search bar. This is a key component of the **Trust
Framework (TF)** feature set.

### Key Changes:
- **New Search Provider**: Implemented `getResultsForNotarization` to
query the Notarization chain by ID.
- **Hook Integration**: Added the notarization lookup to the `useSearch`
parallel query execution.
- **Feature Guarding**: The lookup is conditionally executed based on
the `ExplorerTFNotarization` feature flag.

## Links to any relevant issues

N/A

## How the change has been tested

- **Manual Verification**: Entered valid Notarization IDs in the search
bar and confirmed the "notarization" result type is returned and
navigable.
- **Flag Testing**: Confirmed that search functionality remains
unaffected and notarization results are omitted when the
`ExplorerTFNotarization` flag is disabled.

Access the Preview at
https://rebased-explorer-git-feat-notarization-lock-owner-iota1.vercel.app/
and look for
0x23be2a1a617f0af6830ffe328c357df7c73de25b2013eef362e8cc09f9df9f57 to
see a Notarization suggestion in the search bar result.

Refer to
#138 (comment) at
Test on testnet section to get more notarization objects IDs.

## Expected UI
<img width="3114" height="792" alt="image"
src="https://github.com/user-attachments/assets/f3c89e80-7218-4a81-9caf-0ace56006990"
/>
# Description of change

This PR resolves a console "panic"/error that occurs during search when
a generic Object ID is incorrectly processed as a Decentralized
Identifier (DID).

### Problem
Previously, when a user searched for a standard Object ID, `useSearch`
would attempt to forcefully generate a DID from it
(`IotaDID.fromAliasId`) and then resolve it. If the Object ID did not
correspond to a valid Identity, the underlying `identity-wasm` client
would throw a severe console error/panic, creating noise and potential
instability.

### Solution
- **API Swap**: We now use `identityClient.getIdentity(query)` when the
query is an Object ID. This API is designed to safely check for an
Identity associated with the Object ID without throwing panics if one
doesn't exist.
- **Cleanup**: Removed the now-obsolete `tryGenerateDidFromObjectId`
utility.
- **Graceful Degradation**: Added an explicit `catch` block around the
resolution. If the identity lookup fails (e.g., the object is just a
coin, not an identity), we swallow the error and simply return `null` so
the search UI gracefully omits the DID option without breaking other
concurrent search results.

## Links to any relevant issues

N/A

## How the change has been tested

- **Manual Verification**: Searched for a standard non-identity Object
ID and confirmed no panic/error is printed to the console.
- **DID Verification**: Searched for a valid DID string and confirmed
the DID search result still resolves correctly.

Search an Identity
`0xdc704ab63984d5763576c12ce5f62fe735766bc1fc9892a5e2a7be777a9af897` and
expect to see no panic console.

Search a Notification
`0x23be2a1a617f0af6830ffe328c357df7c73de25b2013eef362e8cc09f9df9f57` and
expect to see no panic console either.
)

# Description of change

This PR enables the **Notarization** feature on the Explorer for the
**Production** network by updating the default value of the
`ExplorerTFNotarization` feature flag to `true`.

### Impact
- **Search**: Users can now search for Notarization IDs on the
production explorer.
- **UI**: Trust Framework (TF) specific views and components related to
notarization will become visible and active.

## Links to any relevant issues

### Readiness
The following prerequisite PRs have been merged and verified:
- #142 (Explorer search integration)
- #146 (DID search stability fix)

The Notarization client and chain services have been verified to be
stable and ready for production traffic.

## How the change has been tested

- **Manual Verification**: Verified on the Dev/Staging environments with
the flag enabled.
- **Code Audit**: Confirmed that the `defaultValue` change is limited
strictly to the `ExplorerTFNotarization` key and doesn't affect other
feature flags.
@alexruzenhack alexruzenhack requested a review from a team as a code owner May 19, 2026 16:27
@vercel
Copy link
Copy Markdown

vercel Bot commented May 19, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
rebased-explorer Error Error May 21, 2026 4:50pm
5 Skipped Deployments
Project Deployment Actions Updated (UTC)
apps-ui-kit Ignored Ignored Preview May 21, 2026 4:50pm
iota-evm-bridge Skipped Skipped May 21, 2026 4:50pm
iota-multisig-toolkit Skipped Skipped May 21, 2026 4:50pm
iota-names Skipped Skipped May 21, 2026 4:50pm
wallet-dashboard Skipped Skipped May 21, 2026 4:50pm

Request Review

@vercel vercel Bot temporarily deployed to Preview – iota-names May 19, 2026 16:27 Inactive
@vercel vercel Bot temporarily deployed to Preview – iota-multisig-toolkit May 19, 2026 16:27 Inactive
@vercel vercel Bot temporarily deployed to Preview – iota-evm-bridge May 19, 2026 16:27 Inactive
@vercel vercel Bot temporarily deployed to Preview – wallet-dashboard May 19, 2026 16:27 Inactive
@alexruzenhack alexruzenhack marked this pull request as draft May 19, 2026 17:57
{type && (
<div className="flex flex-row items-center gap-xxs">
<span className="text-headline-sm text-iota-neutral-10 dark:text-iota-neutral-92">
<span className="dark:text-iota-neutral-92 text-headline-sm text-iota-neutral-10">
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Only a style class sorting.

Comment thread apps/explorer/src/pages/trust-framework/audit-trail-result/AuditTrailContent.tsx Outdated
@alexruzenhack alexruzenhack force-pushed the feat/audit-trail-route branch from 60d6c24 to c507da9 Compare May 20, 2026 15:18
@vercel vercel Bot temporarily deployed to Preview – wallet-dashboard May 20, 2026 15:18 Inactive
@vercel vercel Bot temporarily deployed to Preview – iota-names May 20, 2026 15:18 Inactive
@vercel vercel Bot temporarily deployed to Preview – iota-multisig-toolkit May 20, 2026 15:18 Inactive
@vercel vercel Bot temporarily deployed to Preview – iota-evm-bridge May 20, 2026 15:18 Inactive
@vercel vercel Bot temporarily deployed to Preview – iota-multisig-toolkit May 20, 2026 15:26 Inactive
@vercel vercel Bot temporarily deployed to Preview – iota-evm-bridge May 20, 2026 15:26 Inactive
@vercel vercel Bot temporarily deployed to Preview – iota-names May 20, 2026 15:26 Inactive
@vercel vercel Bot temporarily deployed to Preview – wallet-dashboard May 20, 2026 15:26 Inactive
@alexruzenhack alexruzenhack force-pushed the feat/audit-trail-search branch from e4f8537 to a8d51b0 Compare May 21, 2026 16:46
@alexruzenhack alexruzenhack force-pushed the feat/audit-trail-route branch from 138c266 to 5e2dc5d Compare May 21, 2026 16:48
@vercel vercel Bot temporarily deployed to Preview – wallet-dashboard May 21, 2026 16:48 Inactive
@vercel vercel Bot temporarily deployed to Preview – iota-evm-bridge May 21, 2026 16:48 Inactive
@vercel vercel Bot temporarily deployed to Preview – iota-names May 21, 2026 16:48 Inactive
@vercel vercel Bot temporarily deployed to Preview – iota-multisig-toolkit May 21, 2026 16:49 Inactive
@alexruzenhack alexruzenhack force-pushed the feat/audit-trail-search branch from a8d51b0 to fe4d32a Compare May 29, 2026 09:43
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