Skip to content

Activity Log

First-Pass Node Dossier

This page is an evidence-backed node dossier generated from the domain hierarchy and node questionnaire.

What It Is

ActivityLog is the parsed timeline of record changes in Pyle. It is built on top of Spatie activity records and a parser layer that turns raw events into readable per-record histories.

Parent hierarchy:

  • Supporting Platform Capabilities
  • Activity And Collaboration History
  • Activity Log

Primary implementation paths:

  • packages/framework/src/Actions/ActivityLog
  • packages/framework/src/Http/Resources/Admin/ActivityLogResource.php
  • packages/admin/src/Livewire/Admin/ActivityLog
  • packages/framework/src/Http/Controllers/Api/Admin/*

What Users Can Do With It

Direct capabilities

Operators can:

  • review a record’s change history from its admin detail page
  • open the packaged activity-log dialog on supported records
  • see a parsed timeline rather than raw Spatie rows

Indirect capabilities

Other workflows use ActivityLog to:

  • reconstruct direct and related history for orders, customers, products, invoices, order returns, and fulfillment requests
  • show change timelines beside the record being reviewed
  • keep user-visible history separate from comments and collaboration threads

Things users cannot do directly

The shared package does not expose one global activity-log inbox. Activity history is reviewed per record.

Where It Is Managed

ChannelRoleNotes
Admin record detail pagesDirectActivity history is reviewed on the record that changed
Admin activity-log dialog and datatableDirectShared UI wrapper for parsed timelines
Record-specific getActivityLogs endpointsDirectOrders, customers, products, invoices, returns, and fulfillment requests all expose this pattern
Comments blocksAdjacentCollaboration threads that sit beside the activity timeline, not inside it

Sources:

  • packages/admin/src/Livewire/Admin/ActivityLog/Dialog.php
  • packages/admin/src/Livewire/Admin/ActivityLog/Datatable.php
  • packages/framework/src/Http/Controllers/Api/Admin/OrdersController.php
  • packages/framework/src/Http/Controllers/Api/Admin/CustomersController.php
  • packages/framework/src/Http/Controllers/Api/Admin/ProductsController.php
  • packages/framework/src/Http/Controllers/Api/Admin/InvoicesController.php
  • packages/framework/src/Http/Controllers/Api/Admin/OrderReturnsController.php
  • packages/framework/src/Http/Controllers/Api/Admin/FulfillmentRequestsController.php
  • packages/framework/src/Http/Controllers/Api/Admin/CommentsController.php

Timeline Construction

The parser layer builds each timeline from two sources:

  1. direct activities on the record itself
  2. related activities on configured child relations

The parser then merges, filters, and sorts those entries by date descending.

The admin datatable caches parsed output for a short time to avoid rebuilding the same timeline repeatedly.

Sources:

  • packages/framework/src/Actions/ActivityLog/ActivityLogParser.php
  • packages/admin/src/Livewire/Admin/ActivityLog/Datatable.php

Configuration And Data Model

Key implementation characteristics:

  • the resource serializer is a passthrough over the underlying activity payload
  • the parser looks up model-specific parsers from config('activity-logs.<model>')
  • the model type is derived from the record class name

Important adjacent record:

  • Comment

Comments are a separate collaboration record. They are often shown on the same record pages as activity history, but they are not activity-log entries.

Sources:

  • packages/framework/src/Http/Resources/Admin/ActivityLogResource.php
  • packages/framework/src/Actions/ActivityLog/ActivityLogParser.php
  • packages/framework/src/Models/Comment.php
  • packages/admin/src/Livewire/Admin/Comments/Block.php
  • packages/storefront/src/Livewire/Storefront/MyAccount/List/CommentsBlock.php

Relationships

ActivityLog directly connects to:

  • the underlying subject model
  • the causer
  • relation-specific activity parsers

Practical record owners:

  • orders
  • customers
  • products
  • invoices
  • order returns
  • fulfillment requests

Rules And Downstream Effects

Read-only history

Activity logs are history, not an editable business record.

Per-record scope

The same parser pattern is reused across multiple record types, but each record only exposes the activity history relevant to that record.

Not ERP logs

Do not confuse activity logs with ERP bridge request logs. They solve different problems and live in different packages.

Sources:

  • packages/framework/src/Actions/ActivityLog/ActivityLogParser.php
  • packages/framework/src/Http/Controllers/Api/Admin/OrdersController.php
  • packages/framework/src/Http/Controllers/Api/Admin/CustomersController.php
  • packages/framework/src/Http/Controllers/Api/Admin/ProductsController.php
  • packages/framework/src/Http/Controllers/Api/Admin/InvoicesController.php
  • packages/framework/src/Http/Controllers/Api/Admin/OrderReturnsController.php
  • packages/framework/src/Http/Controllers/Api/Admin/FulfillmentRequestsController.php
  • packages/erp-bridge/src/Models/RequestLog.php

Integrations And Automation

Spatie activity log

The shared package reads from Spatie activity records and translates them into readable timelines.

Parser-backed views

Different record types can register different parser classes, which lets the same activity-log page render record-specific language and grouping.

Comments adjacency

Comments remain an adjacent collaboration surface that complements activity logs on record pages.

Sources:

  • packages/framework/src/Actions/ActivityLog/ActivityLogParser.php
  • packages/framework/src/Actions/ActivityLog
  • packages/framework/src/Models/Comment.php
  • packages/admin/src/Livewire/Admin/Comments/Block.php

Where It Appears To End Users

ActivityLog is mostly a staff concept.

Operators see it inside record details and dialogs on the supported admin pages. Customers usually see comments or their own record history, not a global activity-log workspace.

Current Documentation Takeaways

  1. Activity logs are parsed per record, not globally.
  2. The parser layer is what turns raw Spatie data into readable timelines.
  3. Comments are adjacent collaboration history, not the same thing as activity logs.

Open Questions

  • This pass did not inspect every possible host-app record page, only the shared package record history surfaces that are visible in the repo.

Sources:

  • packages/framework/src/Actions/ActivityLog/ActivityLogParser.php
  • packages/framework/src/Http/Resources/Admin/ActivityLogResource.php
  • packages/admin/src/Livewire/Admin/ActivityLog/Dialog.php
  • packages/admin/src/Livewire/Admin/ActivityLog/Datatable.php
  • packages/framework/src/Http/Controllers/Api/Admin/OrdersController.php
  • packages/framework/src/Http/Controllers/Api/Admin/CustomersController.php
  • packages/framework/src/Http/Controllers/Api/Admin/ProductsController.php
  • packages/framework/src/Http/Controllers/Api/Admin/InvoicesController.php
  • packages/framework/src/Http/Controllers/Api/Admin/OrderReturnsController.php
  • packages/framework/src/Http/Controllers/Api/Admin/FulfillmentRequestsController.php
  • packages/framework/src/Models/Comment.php