这是indexloc提供的服务,不要输入任何密码
Skip to content

Conversation

@stevenconner
Copy link
Contributor

Overview

This PR implements support for displaying Redux state action items in the Reactotron timeline, providing developers with better visibility into state management actions.

Changes Made

New Components

  • TimelineStateActionItem: New component to render state action items in the timeline
  • StateActionDetailContent: Detail panel content for state action items

Updated Components

  • TimelineScreen: Added rendering logic for state action items and updated filter types
  • DetailPanel: Added support for displaying state action details
  • TimelineToolbar: Updated to include state action items in logs filter

Type System Updates

  • Added TimelineItemStateActionComplete type definition
  • Updated TimelineItem union type to include state action items
  • Imported StateActionCompletePayload from reactotron-core-contract

Features

Timeline Integration: State action items now appear in the timeline alongside logs, network requests, and display items

Detail Panel Support: Clicking on a state action item shows detailed information including:

  • Action type
  • Action payload (displayed in tree view)

Filtering: State action items are included in the logs filter and appear in the all items view

Consistent UI: State action items follow the same visual pattern as other timeline items with:

  • "ACTION" title
  • Action name as preview text
  • Date and delta time display
  • Selection highlighting

Technical Details

  • Command Type: Uses CommandType.StateActionComplete from reactotron-core-contract
  • Payload Structure: Leverages StateActionCompletePayload for type safety
  • Rendering: Integrates seamlessly with existing timeline rendering system
  • Type Safety: Full TypeScript support with proper type guards

Testing

  • State action items appear in timeline
  • Detail panel displays action information correctly
  • Filtering works as expected
  • No breaking changes to existing functionality
  • TypeScript compilation passes

Screenshots

State action items will appear in the timeline with "ACTION" title and the action name as preview text. The detail panel will show the action type and payload in a structured tree view.

Breaking Changes

None - this is purely additive functionality.

Related Issues

Implements support for Redux state action tracking in Reactotron timeline.

@stevenconner stevenconner added enhancement New feature or request feature parity Things that are being brought over from Old Reactotron labels Oct 6, 2025
@stevenconner stevenconner linked an issue Oct 6, 2025 that may be closed by this pull request
Copy link
Collaborator

@joshuayoes joshuayoes left a comment

Choose a reason for hiding this comment

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

This is looking pretty good! I tested this using the example reactotron app and I'm seeing the actions coming through, but I'm not seeing the type property show up. Not a huge deal but I think we may want to figure that out.

Manual Test Steps

reactotron-macos setup

  1. gh pr checkout 49
  2. npm install
  3. npm run pod
  4. npm run start
  5. npm run macos
  6. node -e "require('./standalone-server').startReactotronServer({ port: 9292 })"

reactotron example app setup

  1. yarn install
    Add Reactotron standalone server port to example app configuration
diff --git a/apps/example-app/app/devtools/ReactotronConfig.ts b/apps/example-app/app/devtools/ReactotronConfig.ts
index a5c7d5b6..9b9c1dad 100644
--- a/apps/example-app/app/devtools/ReactotronConfig.ts
+++ b/apps/example-app/app/devtools/ReactotronConfig.ts
@@ -18,6 +18,7 @@ import { Reactotron } from "./ReactotronClient"
 
 const reactotron = Reactotron.configure({
   name: require("../../package.json").name,
+  port: 9292,
   onConnect: () => {
     /** since this file gets hot reloaded, let's clear the past logs every time we connect */
     Reactotron.clear()
  1. yarn workspace example-app start
  2. Start on a different port to avoid conflicting with reactotron-macos
  3. Press i to launch in iOS simulator
  4. Consider Cmd + Shift + R to reload reactotron-macos to get connection
  5. Tap "State Management: MST" in iOS Simulator
  6. Click "Reactotron" in iOS Simulator
  7. See "ACTION" timeline log in reactotron-macos

return (
<View style={$detailContent()}>
<DetailSection title="Type">
<Text>{action.type}</Text>
Copy link
Collaborator

@joshuayoes joshuayoes Oct 6, 2025

Choose a reason for hiding this comment

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

request: in my testing using the reactotron example app, I'm not seeing the type string come through 🤔

Screen.Recording.2025-10-06.at.12.29.49.PM.mov

Copy link
Collaborator

@joshuayoes joshuayoes left a comment

Choose a reason for hiding this comment

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

Looks good!

Screen.Recording.2025-10-06.at.4.23.19.PM.mov

@stevenconner stevenconner enabled auto-merge (squash) October 7, 2025 16:36
@stevenconner stevenconner merged commit cdb6c7f into main Oct 7, 2025
4 checks passed
@stevenconner stevenconner deleted the steve/state-action-item branch October 7, 2025 16:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request feature parity Things that are being brought over from Old Reactotron

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Feature parity: Redux actions

3 participants