Skip to content
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

Button to toggle pause/continue logging #2

Open
danikaze opened this issue Oct 11, 2024 · 1 comment
Open

Button to toggle pause/continue logging #2

danikaze opened this issue Oct 11, 2024 · 1 comment
Labels
enhancement New feature or request

Comments

@danikaze
Copy link
Owner

danikaze commented Oct 11, 2024

Same as the one shown in the Chromium Network tab, a button to pause or continue logging the requests (IPC messages for this).

  • When logging is active (recording), it's shown as the red circumference with a red square in the middle. Clicking it will set it in pause. Title string when hovered should read Stop recording IPC messages.
  • When logging is not active (paused), it's shown as the grey circumference with a grey squared in the middle. Clicking it will restart the logging. Title string when hovered should read Record IPC messages.

Considerations:

  • Should it be responsibility of the UI or the main process?
    1. The main process still listen to the messages and send them to the UI. The UI is the only one knowing that is "paused"? Meaning is the UI the one that will "drop" the messages.
    2. The main process listens to the messages but drops them (not sending them to the UI) when paused. UI will log everything that it receives. This also implies that the UI needs to notify the main process when the button is clicked, so the main process knows what to do.
    3. The main process de-register listeners completely when paused, and register them again when un-paused (probably too much work for just this).
  • Should the custom callback onIpcMessage be called when paused? (if provided)
    1. No, because pause affects everything
    2. Yes, up to the callback to do whatever they want with them.
    3. Call always onIpcMessage but add a new field or a new parameter isPaused.
@danikaze danikaze added the enhancement New feature or request label Oct 11, 2024
@danikaze
Copy link
Owner Author

Current inclinations are:

  • Should it be responsibility of the UI or the main process? → ii
  • Should the custom callback onIpcMessage be called when paused? (if provided) → i

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant