Skip to main content
This workflow guides you through viewing work ledger entries, filtering, and analyzing TWU execution data. Related: Source: Feature Inventory, Source: Feature Inventory

Goal

View work ledger entries, filter by various criteria, and analyze TWU execution data including policy compliance, costs, and actor types.

Preconditions

  • Access to a Veratrace instance
  • Valid AWS Cognito authentication
  • Work ledger entries exist (created by TWU executions)
  • Backend API running at http://localhost:8080 (development)
Source: Source: Feature Inventory

Permissions

Required roles: Viewer, Manager, or Administrator (inferred from mock roles - read access)
Source: Source: Feature Inventory

UI Steps

Work ledger list view showing entries with filters and status indicators

Step 1: Navigate to Work Ledger

  1. Click Ledger in the navigation sidebar
  2. Work ledger landing page loads
UI Route: /ledger Component: WorkLedgerLandingPage Source: /Users/vincentgraham/clearline-ui/src/app/routes/routerConfig.jsx (line 64-65)

Step 2: View Work Ledger Entries

The work ledger displays entries in a table with the following columns:
  • Title - Entry title
  • Description - Entry description
  • Status - Execution status (completed, in_progress, pending, failed)
  • Policy Status - Compliance status (compliant, non_compliant, review_required)
  • Actors - Actor types (AI, HUMAN, or both)
  • Active Time - Time spent in seconds
  • Cost - Cost in dollars
  • Model Name - TWU model name used
  • Entity - Related entity identifier and display name
  • Created - Creation timestamp
UI Route: /ledger Component: WorkLedgerLandingPage Source: /Users/vincentgraham/clearline-ui/src/features/workLedger/pages/WorkLedgerLandingPage/WorkLedgerLandingPage.jsx (line 1-1227)

Step 3: Filter Entries

  1. Click Filter button to open filter drawer
  2. Apply filters:
    • Search - Search across multiple fields (title, description, id, entityId, relatedEntity)
    • Status - Filter by execution status
    • Type - Filter by entry type
    • Policy Status - Filter by compliance status (compliant, non_compliant, review_required)
    • Actors - Filter by actor types (AI, HUMAN, HYBRID)
    • Cost Range - Filter by cost (min/max)
    • Time Range - Filter by active time (min/max in seconds)
    • Model Name - Filter by TWU model name
UI Route: /ledger Component: WorkLedgerLandingPage with filter drawer Source: /Users/vincentgraham/clearline-ui/src/features/workLedger/api/workLedger.js (line 31-193)

Step 4: Sort Entries

  1. Click column headers to sort
  2. Default sort: createdAt,desc (newest first)
UI Route: /ledger Component: WorkLedgerLandingPage Source: /Users/vincentgraham/clearline-ui/src/features/workLedger/api/workLedger.js (line 34, 148-170)

Step 5: Paginate Results

  1. Use pagination controls at bottom of table
  2. Navigate between pages
  3. Adjust page size if available
UI Route: /ledger Component: WorkLedgerLandingPage Source: /Users/vincentgraham/clearline-ui/src/features/workLedger/api/workLedger.js (line 172-192)

Step 6: View Entry Details (Optional)

UI Route: /ledger (or future detail route) Source: Source: Feature Inventory

Backend API Calls

List Work Ledger Entries

Endpoint: GET /instances/:instanceId/work-ledger (inferred, not implemented) Called when: Loading work ledger page or applying filters Query Parameters:
  • page - Page number (0-based)
  • size - Page size
  • sort - Sort field and direction (e.g., “createdAt,desc”)
  • search - Search across multiple fields
  • status - Filter by status
  • type - Filter by type
  • policyStatus - Filter by policy status: “compliant”, “non_compliant”, “review_required”
  • actors - Filter by actors: “AI”, “HUMAN”, “HYBRID”
  • costMin - Minimum cost filter
  • costMax - Maximum cost filter
  • timeMin - Minimum time filter (seconds)
  • timeMax - Maximum time filter (seconds)
  • modelName - Filter by model name
Response: Paginated response with work ledger entries Source: /Users/vincentgraham/clearline-ui/src/features/workLedger/api/workLedger.js (line 31-193) Note: Currently using mock data. Actual API endpoint not yet implemented.

Get Work Ledger Entry

Endpoint: GET /instances/:instanceId/work-ledger/:entryId (inferred, not implemented) Called when: Viewing entry details Response: Work ledger entry object Source: /Users/vincentgraham/clearline-ui/src/features/workLedger/api/workLedger.js (line 201-220) Note: Currently using mock data. Actual API endpoint not yet implemented.

Audit/Evidence Implications

Work ledger entries track policy compliance status, which is used for audit purposes:
  • compliant - Entry meets all policy requirements (no action needed)
  • non_compliant - Entry violates policy requirements (requires investigation)
  • review_required - Entry needs manual review
Source: Source: Feature Inventory Work ledger entries also track:
  • Actor types (AI/HUMAN) for accountability
  • Cost and time metrics for resource tracking
  • Model name for traceability
Source: Source: Feature Inventory Source: Source: Feature Inventory

Troubleshooting

Error: “Failed to fetch work ledger entries”

Cause: Backend API not available or error Solution:
  • Verify backend API is running at http://localhost:8080
  • Check network connectivity
  • Review backend logs
  • Note: Currently using mock data, so this may not occur until API is implemented
Source: /Users/vincentgraham/clearline-ui/src/features/workLedger/api/workLedger.js (line 31-193)

No Entries Displayed

Cause: Filters too restrictive or no entries exist Solution:
  • Clear all filters
  • Check if entries exist in the system
  • Verify date range filters are not excluding all entries
  • Check pagination (navigate to first page)
Source: /Users/vincentgraham/clearline-ui/src/features/workLedger/api/workLedger.js (line 31-193)

Filter Not Working

Cause: Filter value invalid or API not implemented Solution:
  • Verify filter values are correct
  • Check filter syntax (e.g., policyStatus values: “compliant”, “non_compliant”, “review_required”)
  • Note: Some filters may not work until backend API is fully implemented
Source: /Users/vincentgraham/clearline-ui/src/features/workLedger/api/workLedger.js (line 52-145)

Search Not Finding Entries

Cause: Search term doesn’t match or search field not indexed Solution:
  • Try broader search terms
  • Search searches across: title, description, id, entityId, relatedEntity
  • Check for typos in search term
Source: /Users/vincentgraham/clearline-ui/src/features/workLedger/api/workLedger.js (line 52-63)

Sorting Not Working

Cause: Sort field invalid or API not implemented Solution:
  • Verify sort field is valid (e.g., “createdAt”, “updatedAt”, “cost”, “activeTime”)
  • Check sort direction is “asc” or “desc”
  • Note: Sorting may not work until backend API is fully implemented
Source: /Users/vincentgraham/clearline-ui/src/features/workLedger/api/workLedger.js (line 148-170)