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

feat(wip): support to session replay #116

Merged

Conversation

thisames
Copy link

@thisames thisames commented Sep 22, 2024

💡 Motivation and Context

#69

💚 How did you test it?

📝 Checklist

  • I reviewed the submitted code.
  • I added tests to verify the changes.
  • I updated the docs if needed.
  • No breaking change or entry added to the changelog.

@marandaneto
Copy link
Member

Amazing @thisames will take a look.

@thisames
Copy link
Author

thisames commented Oct 1, 2024

Everything is going well. In theory, the replay already works. However, I still need to thoroughly analyze the code and adjust other details. I also need to organize the folder structure and check if there is any code smell.

Additionally, here are the main tasks that are currently a priority:
[x] masks navigation context
[ ] Regular and improve the debounce (It currently works ok, but not enough)
[ ] Improve performance (It currently works ok, but not enough)
[ ] Add a solution to perfectly synchronize the mask with the current screenshot (maybe a manual schedule or queue?)
[ ] still missing, implement the bridge on the native side correctly. currently there are only test bridges

2024-10-01.03-20-57.mp4

@thisames thisames changed the title feat(wip): add initial structure of session replay feat(wip): support to session replay Oct 1, 2024
@marandaneto
Copy link
Member

@thisames look at this PR since I need to get this merged in first and will conflict with a few things for you

@thisames
Copy link
Author

thisames commented Oct 2, 2024

@thisames look at this PR since I need to get this merged in first and will conflict with a few things for you

I think you can merge this #117. Then I'll pull it and resolve the conflicts. But there's nothing that will impact my PR that much. I just need to adapt the initialization settings that I added to the style that you implemented.

void init(String apiKey, {PostHogOptions? options}) {
if (_initialized) {
throw Exception('Posthog is already initialized');
}
_apiKey = apiKey;
_options = options ?? PostHogOptions();
_initialized = true;
PostHogConfig().options = options!;
final initializer = PlatformInitializerFactory.getInitializer();
initializer.init(_apiKey, _options);
}

from what I understand, my init is equivalent to your setup.

Future<void> setup(PostHogConfig config) => _posthog.setup(config);

@xkxeeshankhan
Copy link

hello @thisames Hope you are doing well

I see you guys are working on the session recording is this feature will be available for Flutter web as well?

@thisames
Copy link
Author

thisames commented Oct 9, 2024

hello @thisames Hope you are doing well

I see you guys are working on the session recording is this feature will be available for Flutter web as well?

I think that @marandaneto may say better about that

@marandaneto
Copy link
Member

hello @thisames Hope you are doing well

I see you guys are working on the session recording is this feature will be available for Flutter web as well?

Flutter web target is already supported.

@marandaneto marandaneto changed the base branch from main to chore/session_replay October 9, 2024 10:47
@marandaneto marandaneto marked this pull request as ready for review October 9, 2024 10:48
@marandaneto marandaneto self-requested a review as a code owner October 9, 2024 10:48
@marandaneto marandaneto merged commit eeb0279 into PostHog:chore/session_replay Oct 9, 2024
0 of 4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants