-
Notifications
You must be signed in to change notification settings - Fork 1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Replay App #191
Comments
Looks interesting. I'm working on something like this as well. Moreover, I'm planning not only to show scenes (logs / reports), but also to have more details about them (to help collaborative debugging). A dropdown/selection list fro quick jumping to the scene wold be also useful. Basically, you could import If you feel like using About "all actions should be blocked", a |
Whoa, you really took off with this :) I'm more than happy to help if you need any! Here are some specifics of my situation that I think would be a good idea to consider to make this tool as generic as possible.
|
Though
We want our dashboard, which will allow to filter reports and to show related reports. So, if you got a similar one, will know how it was solved before.
Even though in our architecture we can save them as json, we also serialize the actions, so it will knot affect the server performance. Along with the serialized actions we'll also send the last action type ("failed action"). Additionally we can send the commited (initial) state (also serialized), so we can limit the maximum number of actions, and send only the last N actions (otherwise, hundreds of actions will just freeze the app). There's also a problem with multiple stores in one app to be solves, but I guess it's not your case.
Since our plan is not to communicate with elasticsearch directly from the app, the idea is that you'll just indicate a token along with the host and port to access
Sounds great. The filtering by user id is planned.
Also sounds like a great feature we want to have. Actually, if you intend to send data to elasticsearch directly, you don't need to host The reason we want to host |
So Kibana and Elasticsearch are for doing user analytics, creating dashboards about app usage, and analyzing A/B tests. That's not within the scope of this project. But I did want to point out that if you send Redux actions only on errors, you're missing out on a plethora of very rich usage information. I'm sending all Redux actions to our analytics/tracking stack -- I'm flattening the actions so I can query them in SQL if I want to make a Kibana dashboard or run some aggregate queries, and then I plan to be able to unflatten them and run them through the devtool. Actually being able to control the other persons computer another really cool idea actually. Nice talk too! That's not exactly what I'm looking to build right now but I bet you could sell that software to Intercom! I looks like there is definitely overlap though. Here's what I'm still trying to figure out:
Looks like you already know how to do this but I havent figured it out. I'm trying to figure out how this store "enhancer" is able to control actions, states, and also render to the UI. I'm poking around here but couldn't find where you instantiate the Provider. Is there a simple example of how an "enhancer" works?
Looking at the code for importing state, I can't find where any of this goes through a reducer to actually update the devtool state. I get lost right here with all this lifted store stuff. But it seems like we just need to flip a few booleans to hide some views and display just the views we want.
I'm planning on having some JSON hardcoded into the app that gets configured with the replay tool. The key will be the name of the scene, and the value is just an array of actions. I want to have a list / dropdown / some way of selecting these scenes, importing the state, and given a slider to run through. This is oging to be very useful for compliance-type stuff. I'd really appreciate any direction you have here. The more you tell me about your way of doing this, the more cohesive this tool will be with everything your building :) |
Definitely. Except
I will keep everything OSS, and even will allow debugging via our remote servers for a moderate use.
Via Remote Redux DevTools for instrumenting the store, and Well, it's not exactly for your case to have the monitoring decoupled from your app (and to communicate with it via sockets). But it could offer more opportunities, for example using it for the mobile app or having one instance in production and another one in development. If you feel like it's out of your scope, then you probably want just to have a custom monitor for vanilla Redux DevTools.
This feature is only proposed yet. The current idea is that new actions will be logged but not dispatched till you exit from the loop mode (unlock). We could just dismiss them, not sure which approach is better.
I think we need something like this: import DevTools from `remotedev-app`;
// ...
<DevTools monitors={['slider']} logs={yourJson} /> Will look into this in few days, have to finish something else right now. |
Hey @ccorcos, It takes more time than I've expected, as have to refactor the whole app. See zalmoxisus/remotedev-app#16. The good news is that it will be possible to use it without BTW, I've released a lib to send reports from production, you can use to have more control of the data you send. |
nice looks good! any suggestions on how to figure out how "enhancers" work? Whats the simplest example? |
The simplest example is I guess for your use case using a middleware is enough. If you want more control (like sanitizing, blacklisting actions...), you can use |
oh interesting. not actually all that complicated. |
Hey @ccorcos, I've published a Slider Monitor with the ability to import reports with a simple example of integration. It's highly customizable. I'm open for any improvements. An integration with elasticsearch would be more than welcome. Feel free to file any issues there. Here's how it works in the extension (but you can include that component directly in your admin page): |
@zalmoxisus this is amazing! I'll keep you posted on this. I think it might be easier for us to just download the data into a static build like you've done with the example -- that way we can pass the builds around... |
Hey guys, is there any way to extend this and replay my custom actions? I've got all the actions from a bug report, now I want to paste the entire array and it should be able to play it. Is that possible? |
@cyberhck, yes, you can import an array of actions. The format should be like: {
"payload": "[{\"type\": \"action1\"}, {\"type\": \"action2\"}]"
} Also you can do it with your client script: store.liftedStore.dispatch({ type: 'IMPORT_STATE', nextLiftedState: [{ type: 'action1' }, { type: 'action2' }] }) |
So now that we've figured out how to import an array of actions and play them back, I now want to be able to take several action arrays and build a static "replay" application. Basically, we should be able to select a scene from a list, and then scrub through them with a slider (very useful for legal review of loan applications here at Affirm.com ;)
I've already built a little prototype:
But ideally I could reuse some code from this devtool and contribute back. I'm just not sure how. I don't want to have to install the redux dev tools in order to scrub around. I'd like everything to be packages up together. Any thoughts on how I can do this?
Recap:
The text was updated successfully, but these errors were encountered: