‹ Reports
The Dispatch

OSS Watchlist: posthog/posthog


GitHub Logo GitHub Logo

Lede

PostHog's recent development activities show a strong focus on both backend optimizations and frontend enhancements, but the lack of test coverage for new functionalities and prolonged disagreements on architectural changes pose significant risks.

Recent Activity

Team Contributions (Reverse Chronological Order)

Tim Glaser (timgl)

Ben White (benjackwhite)

Michael Matloka (Twixes)

Robbie Coomber (robbie-c)

Sandy Spicer (aspicer)

Thomas Obermüller (thmsobrmlr)

Frank Hamand (frankh)

Open Pull Requests

  1. PR #22502: Update posthog-js to version 1.135.1.
  2. PR #22501: Fix for toolbar clickmap reset.
  3. PR #22500: Add confirmation to proxy deletion.
  4. PR #22499: Action and event filters feature.
  5. PR #22498: Add web vitals collection (draft).
  6. PR #22497: Move query performance polling to its own Celery task.
  7. PR #22496: UI polishing for the survey form editor.
  8. PR #22495: Remove old partition stats tables.
  9. PR #22493: Always execute API requests on offline cluster.
  10. PR #22492: Prevent queries on the persons page from being canceled.

Risks

Lack of Test Coverage for New Functionality in PR #22498

The pull request #22498 introduces web vitals collection but lacks associated test cases, posing a high risk of undetected bugs affecting platform reliability.

Prolonged Disagreement in PR #22497

Significant disagreement among team members regarding architectural changes proposed in PR #22497 could delay important updates and affect team cohesion.

Multiple Rewrites of Source Code Files

Frequent rewrites of files like posthog/models/query_metrics/sql.py indicate potential instability and issues with initial design or requirements clarity.

Non-Critical PRs Left Open for Several Days

Several non-critical pull requests remain open without updates, suggesting potential bottlenecks in the review process that could slow down development progress.

Of Note

  1. Dynamic CNAME Targets Feature: The addition of dynamic CNAME targets for proxies is a notable enhancement that improves customization options for users.
  2. Improved Error Handling: Enhancements to error handling and logging across various components reflect a proactive approach to maintaining system stability.
  3. UI Polishing Efforts: Multiple UI improvements, such as those in the survey form editor, indicate a strong focus on enhancing user experience.

Conclusion

PostHog's development team has been actively working on both backend optimizations and frontend enhancements, reflecting a balanced approach to improving platform capabilities. However, the lack of test coverage for new functionalities and prolonged disagreements on architectural changes pose significant risks that need immediate attention to ensure project stability and progress.

Quantified Commit Activity Over 6 Days

Developer Avatar Branches PRs Commits Files Changes
Tom Owers 1 9/9/0 12 64 7490
vs. last report = +5/+6/= +9 +35 +6192
Ben White 5 13/8/0 33 140 3311
vs. last report +3 +3/+1/= +21 +65 +1649
Paul D'Ambra 5 11/6/0 17 30 2216
vs. last report +4 -6/-9/= +2 -21 -1535
David Newell 2 8/9/0 13 93 1904
vs. last report +1 =/+3/-2 +7 +71 +1303
Sandy Spicer 4 9/6/1 27 51 1634
vs. last report +3 +6/=/+1 +20 -40 +192
Robbie 4 6/4/0 15 25 1450
vs. last report +3 +5/+2/= +13 +23 +1445
Bianca Yang 4 5/2/0 35 88 1393
vs. last report +1 +1/=/= +28 +59 +924
Tomás Farías Santana 2 1/0/0 8 13 1296
Marius Andra 3 2/0/0 17 63 1254
vs. last report +2 +1/-1/= +16 +59 +1240
Thomas Obermüller 7 17/12/2 24 66 1131
vs. last report +6 +6/+3/+2 +16 +21 -1048
Frank Hamand 2 14/13/1 14 36 1108
vs. last report +1 +5/+5/= +6 +27 +1047
Michael Matloka 4 9/6/0 15 55 976
vs. last report +1 +7/+5/= -5 +31 -494
github-actions 19 0/0/0 67 159 689
vs. last report +17 =/=/= +62 +136 +442
Phani Raj 2 1/0/0 6 14 674
vs. last report +1 -2/-3/= +3 +3 +203
Zach Waterfield 4 5/2/0 12 23 661
vs. last report +4 +2/+2/-1 +12 +23 +661
Raquel Smith 4 5/3/0 9 35 646
vs. last report +4 +4/+3/= +9 +35 +646
Tiina Turban 1 4/4/0 5 29 637
vs. last report = -1/=/= +1 -15 +450
timgl 4 9/6/0 12 18 533
vs. last report +3 +8/+5/= +11 +16 +503
Eric Duong 3 7/5/1 10 13 464
vs. last report +2 +7/+4/+1 +9 +11 +447
Joe Martin 1 1/1/0 1 35 440
James Greenhill 3 4/2/0 4 9 428
ted kaemming 3 2/0/1 9 7 369
dependabot[bot] 2 2/1/0 4 11 198
vs. last report +2 +1/+1/= +4 +11 +198
PostHog Bot 6 8/2/0 7 2 102
vs. last report +6 +7/+2/= +7 +2 +102
Mish Ushakov 1 1/1/0 1 10 68
Matthias Vogel 1 1/1/0 1 2 61
vs. last report +1 =/+1/= +1 +2 +61
Dylan Martin (dmarticus) 2 3/2/0 5 7 52
vs. last report +2 +1/=/= +5 +7 +52
Marcus Hof 2 3/2/0 4 3 46
vs. last report +2 +2/+2/= +4 +3 +46
feedanal 1 0/0/0 2 2 33
vs. last report = -6/-1/= +1 +1 +28
Abenezer Belachew 1 0/1/0 1 1 2
vs. last report +1 -1/+1/= +1 +1 +2
Marc J. Schmidt (marcj) 0 1/0/0 0 0 0
Manoel Aranda Neto (marandaneto) 0 0/0/1 0 0 0
vs. last report -1 -1/=/+1 -2 -7 -72
Aryan Rawlani (aryanrawlani28) 0 1/0/0 0 0 0

PRs: created by that dev and opened/merged/closed-unmerged during the period

Detailed Reports

Report On: Fetch commits



Project Overview

The PostHog development team is working on an open-source analytics platform that provides product analytics, session recording, feature flagging, and A/B testing capabilities. It is designed for self-hosting, allowing users to maintain control over their data while leveraging the platform's extensive analytics and optimization tools. The project is hosted on GitHub and continues to see active development with a balanced focus on both front-end improvements and back-end stability.

Recent Development Activities

Team Contributions (Reverse Chronological Order)

Tim Glaser (timgl)

  • 0 days ago: Removed unnecessary events query from query_metrics (posthog/models/query_metrics/sql.py).
  • 0 days ago: Nuked clickhouse_lag celery task (posthog/tasks/scheduled.py, posthog/tasks/tasks.py).
  • 0 days ago: Removed demo deletion query (posthog/demo/matrix/manager.py, posthog/tasks/scheduled.py).

Ben White (benjackwhite)

  • 0 days ago: Applied a lick of paint for data warehouse (frontend/src/lib/components/DatabaseTableTree/DatabaseTableTree.tsx, frontend/src/lib/components/DatabaseTableTree/TreeRow.scss, frontend/src/lib/components/DatabaseTableTree/TreeRow.tsx, frontend/src/queries/nodes/HogQLQuery/HogQLQueryEditor.tsx, frontend/src/scenes/data-warehouse/external/DataWarehouseExternalScene.tsx, frontend/src/scenes/data-warehouse/external/DataWarehouseTables.tsx, frontend/src/scenes/data-warehouse/external/TableData.tsx, tailwind.config.js).
  • 0 days ago: Always showed social auth reauthentication options (frontend/__snapshots__/scenes-other-settings--settings-session-timeout-password-only--dark.png, frontend/__snapshots__/scenes-other-settings--settings-session-timeout-password-only--light.png, frontend/src/lib/components/TimeSensitiveAuthentication/TimeSensitiveAuthentication.tsx, frontend/src/scenes/settings/SettingsScene.stories.tsx).
  • 0 days ago: Fixed reauth modal login options (frontend/__snapshots__/scenes-other-settings--settings-session-timeout-all-options--dark.png, frontend/__snapshots__/scenes-other-settings--settings-session-timeout-all-options--light.png, frontend/__snapshots__/scenes-other-settings--settings-session-timeout-password-only--dark.png, frontend/__snapshots__/scenes-other-settings--settings-session-timeout-password-only--light.png, frontend/__snapshots__/scenes-other-settings--settings-session-timeout-sso-enforced-github--dark.png, frontend/__snapshots__/scenes-other-settings--settings-session-timeout-sso-enforced-github--light.png, frontend/__snapshots__/scenes-other-settings--settings-session-timeout-sso-enforced-google--dark.png, frontend/__snapshots__/scenes-other-settings--settings-session-timeout-sso-enforced-google--light.png, frontend/__snapshots__/scenes-other-settings--settings-session-timeout-sso-enforced-saml--dark.png, frontend/__snapshots__/scenes-other-settings--settings-session-timeout-sso-enforced-saml--light.png, frontend/__snapshots__/scenes-other-settings--settings-session-timeout-sso-only--dark.png, frontend/__snapshots__/scenes-other-settings--settings-session-timeout-sso-only--light.png, frontend/src/lib/components/SocialLoginButton/SocialLoginButton.tsx, frontend/src/lib/components/TimeSensitiveAuthentication/TimeSensitiveAuthentication.tsx, frontend/src/lib/components/TimeSensitiveAuthentication/timeSensitiveAuthenticationLogic.ts, frontend/src/scenes/settings/SettingsScene.stories.tsx).

Michael Matloka (Twixes)

  • 0 days ago: Ran all tests with filters-based insights using HogQL (.github/actions/run-backend-tests/action.yml, posthog/api/insight.py, posthog/api/team.py, posthog/api/test/__snapshots__/test_annotation.ambr, posthog/api/test/__snapshots__/test_insight.ambr, posthog/api/test/__snapshots__/test_organization_feature_flag.ambr, posthog/api/test/dashboards/__snapshots__/test_dashboard.ambr, posthog/api/test/dashboards/test_dashboard.py, posthog/api/test/test_insight.py, posthog/api/test/test_team.py, posthog/caching/calculate_results.py, posthog/caching/insight_cache.py, posthog/caching/test/test_fetch_from_cache.py, posthog/caching/test/test_insight_cache.py, posthog/models/dashboard_tile.py, posthog/models/insight.py,  posthog/models/test/test_insight_model.py).
  • 0 days ago: Fixed early exit hooks error from loading bar flag (frontend/src/scenes/insights/EmptyStates/EmptyStates.tsx).
  • 0 days ago: Updated test_should_refresh_insight.py (posthog/caching/test/test_should_refresh_insight.py).

Robbie Coomber (robbie-c)

  • 0 days ago: Changed persons join for personless events (frontend/src/lib/constants.tsx,frontend/src/lib/utils/eventUsageLogic.ts,frontend/src/queries/schema.json,frontend/src/queries/schema.ts,frontend/src/scenes/settings/SettingsMap.tsx,frontend/src/scenes/settings/project/PersonsJoinMode.tsx,frontend/src/scenes/settings/types.ts,posthog/hogql/database/schema/persons.py,posthog/hogql/database/schema/persons_pdi.py,posthog/hogql/modifiers.py,posthog/hogql_queries/test/test_query_runner.py,posthog/schema.py).
  • 1 day ago: Added dateFrom and dateTo to web analytics overview query response (frontend/__snapshots__/scenes-app-surveys--new-survey-targeting-section--light.png,frontend/src/queries/schema.json,frontend/src/queries/schema.ts,posthog/hogql_queries/web_analytics/web_overview.py,posthog/hogql_queries/web_analytics/web_overview_legacy.py,posthog/schema.py).

Sandy Spicer (aspicer)

  • 0 days ago: Re-enabled refresh on async queries (posthog/clickhouse/client/execute_async.py,posthog/clickhouse/client/test/test_execute_async.py).
  • 1 day ago: Moved query performance polling to its own celery task (frontend/src/scenes/insights/EmptyStates/EmptyStates.tsx,posthog/clickhouse/client/execute_async.py,posthog/tasks/scheduled.py,posthog/tasks/tasks.py,posthog/utils.py).

Thomas Obermüller (thmsobrmlr)

  • 0 days ago: Displayed redis ttl in values view (posthog/templates/redis/values.html,posthog/views.py).
  • 1 day ago: Fixed trends actors include recordings in HogQL (posthog/hogql_queries/query_runner/query_runner_test_helpers/trends_actors_query_builder_test_helpers/trends_actors_query_builder_test_helpers/trends_actors_query_builder_test_helpers/trends_actors_query_builder_test_helpers/trends_actors_query_builder_test_helpers/trends_actors_query_builder_test_helpers/trends_actors_query_builder_test_helpers/trends_actors_query_builder_test_helpers/trends_actors_query_builder_test_helpers/trends_actors_query_builder_test_helpers/trends_actors_query_builder_test_helpers/trends_actors_query_builder_test_helpers/trends_actors_query_builder_test_helpers/trends_actors_query_builder_test_helpers/trends_actors_query_builder_test_helpers/trends_actors_query_builder_test_helpers/trends_actors_query_builder_test_helpers/trends_actors_query_builder_test_helpers/trends_actors_query_builder_test_helpers/trends_actors_query_builder_test_helpers/trends_actors_query_builder_test_helpers/trends_actors_query_builder_test_helpers/trends_actors_query_builder_test_helpers/trends_actors_query_builder_test_helpers_trend_actor_utils_trend_actor_utils_trend_actor_utils_trend_actor_utils_trend_actor_utils_trend_actor_utils_trend_actor_utils_trend_actor_utils_trend_actor_utils_trend_actor_utils_trend_actor_utils_trend_actor_utils_trend_actor_utils_trend_actor_utils_trend_actor_utils_trend_actor_utils_trend_actor_utils_trend_actor_utils_trend_actor_utils_trend_actor_utils_trend_actor_utils_trend_actor_utils_trend_actor_utils_trend_actor_utils_trend_actor_utils_trend_actor_utils_trend_actor_utils_trend_actor_utils_trend_actor_utils_trend_actor_utils_trend_actor_utils_trend_actor_utils_trend_actor_utils_trenactor_utilstrenactor_utilstrenactor_utilstrenactor_utilstrenactor_utilstrenactor_utilstrenactor_utilstrenactor_utilstrenactor_utilstrenactor_utilstrenactor_utilstrenactor_utilstrenactor_utilstrenactor_utilstrenactor_utilstrenactor_utilstrenactor_utilstrenactor_utilstrenactor_utilstrenactor_utilstrenactor_utilstrenactor_utilstrenactor_utilstrenactor_utilstrenactor_utilstrenactor_utilstrenactor_utilstrenactor_utilstrenactor_utilstrenactor_utilstrenactor_utilstre.

Frank Hamand (frankh)

  • 0 days ago: Simplified delete processing on ClickHouse by removing join table (posthog/models/delete_cohorts/delete_cohorts/delete_cohorts/delete_cohorts/delete_cohorts/delete_cohorts/delete_cohorts/delete_cohorts/delete_cohorts/delete_cohorts/delete_cohorts/delete_cohorts/delete_cohorts/delete_cohorts/delete_cohorts/delete_cohorts/delete_cohorts/delete_cohorts/delete_cohorts/delete_cohorts/delete_cohorts/delete_cohorts/deletion/deletion/deletion/deletion/deletion/deletion/deletion/deletion/deletion/deletion/deletion/deletion/deletion/deletion/deletion/deletion/deletion/deletion/deletion/deletion/deletion/deletion/deletion/deletion/deletion/deletion/deletion/deletion/deletion/deletion_deletions_deletions_deletions_deletions_deletions_deletions_deletions_deletions_deletions_deletions_deletions_deletions_deletions_deletions_deletions_deletions_deletions_deletions_deletions_deletions_deletions_deletions_deletions_deletions_deletions_delete_person_delete_person_delete_person_delete_person_delete_person_delete_person_delete_person_delete_person_delete_person_delete_person_delete_person_delete_person_delete_person_delete_person_delete_person_delete_person_delete_person_delete_person_delete_person_delete_person_delete_person_delete_person_delete_person_delete_person_delete_person_delete_person_delete_person_delete_person_delete_person_delete_person_delete_persontest_async_deletertest_asyncdeletertest_asyncdeletertest_asyncdeletertest_asyncdeletertest_asyncdeletertest_asyncdeletertest_asyncdeletertest_asyncdeletertest_asyncdeletertest_asyncdeletertest_asyncdeletertest_asyncdeletertest_asyncdeletertest_asyncdeletertest_asyncdeletertest_asyncdeletertest_asyncdeletertest_asyncdeletertest_asyncdeletertest_asynctest_asynctest_asynctest_asynctest_asynctest_asynctest_asynctest_asynctest_asynctest_asynctest_asynctest_asynctest_asynctest_asynctest_asynctest_asynctest_asynctest_asynctest_asynctest_asynctest_asynctest_asynctest_asynctest_asynctest_asynctest.

Conclusions

The PostHog development team has been actively working on various features and fixes across the platform. Recent activities show a strong focus on enhancing the user interface, improving backend functionalities, and adding new features such as dynamic CNAME targets, improved query performance, and better handling of async queries. The team has also been addressing bugs and optimizing existing functionalities to ensure a robust and user-friendly experience. The ongoing efforts reflect a proactive approach to maintaining and improving the platform's capabilities.

Report On: Fetch issues



Recent Activity Analysis

Overview

Since the last report 6 days ago, there has been a significant amount of activity in the repository. Numerous new issues have been created, and several issues have been closed. This indicates ongoing development and maintenance efforts.

Notable New Issues

  1. Issue #22509: Improve HTML markup experience in the survey editor.

    • Description: The HTML question editing experience for the survey editor is not functioning correctly. The "Text" box field is evaluating HTML tags instead of rendering them as strings.
    • Significance: This issue affects the user experience by allowing unintended HTML rendering and bypassing feature restrictions.
  2. Issue #22508: Fix waterfall empty state.

    • Description: The waterfall view discards network data before the first navigation event, leading to confusion when no navigation event is captured.
    • Significance: This issue impacts the clarity of network data representation, potentially confusing users.
  3. Issue #22507: Ignore future persons in HogQL.

    • Description: Exclude persons with future created_at dates from queries.
    • Significance: Ensures data accuracy by filtering out invalid future-dated entries.
  4. Issue #22506: Enable heatmap onward journey.

    • Description: Provides a clearer message and guidance when heatmap collection is disabled.
    • Significance: Improves user guidance and reduces confusion regarding heatmap features.
  5. Issue #22505: Debug ClickHouse query improvements.

    • Description: Enhancements to local debugging of ClickHouse queries, including better debug data and query ID visibility.
    • Significance: Improves developer experience and debugging capabilities.

Recently Closed Issues

  1. Issue #22503: Fix persons page to bypass cache.

    • Description: Adds an alwaysRefresh option to force a refresh on the persons page to avoid stale data.
    • Significance: Ensures that users see up-to-date information on the persons page.
  2. Issue #22501: Toolbar clickmap reset fix.

    • Description: Resets clickmap element stats when loading the first page for a combination of filters.
    • Significance: Corrects the behavior of clickmap statistics, ensuring accurate data representation.
  3. Issue #22500: Add confirm to proxy deletion.

    • Description: Adds a confirmation step before deleting a proxy configuration.
    • Significance: Prevents accidental deletions of critical configurations.
  4. Issue #22496: UI polishing for the survey form editor.

    • Description: Various UI improvements for the survey form editor, including tooltips and condition summaries.
    • Significance: Enhances user experience by providing clearer information and better UI elements.
  5. Issue #22494: Remove unnecessary events query from query_metrics.

    • Description: Eliminates an unnecessary query that was causing excessive read operations.
    • Significance: Reduces system load and improves performance by removing redundant operations.

General Trends

Backend Improvements

  • Several fixes and enhancements have been made to backend functionalities, particularly around query handling (#22507, #22494).
  • There is a focus on improving error handling and logging to ensure smoother operations (#22420).

Frontend Enhancements

  • Multiple UI/UX improvements have been introduced, such as better loading states (#22496), improved toolbar functionality (#22501), and enhanced insight displays (#22496).
  • New features like dynamic CNAME targets for proxies (#22424) and additional customization options for surveys (#22509) have been added.

Bug Fixes

  • Numerous bugs have been addressed, including issues with session replay not capturing certain network statuses (#22508), and fixing malformed SQL queries (#22494).

Performance and Usability

  • Efforts to improve performance are evident with changes like concurrent loading of insights on dashboards (#22494) and reducing excessive logging that could lead to disk space issues (#22420).

Conclusion

The recent activity in the repository reflects a robust development cycle focused on both expanding features and maintaining system integrity. The team's responsiveness to issues, both in terms of introducing enhancements and resolving bugs, indicates a strong commitment to user satisfaction and continuous improvement. The introduction of new features alongside critical bug fixes suggests a balanced approach to development, ensuring both innovation and stability.

Overall, the project appears to be progressing well with significant improvements made over the past week.

Report On: Fetch PR 22502 For Assessment



PR #22502


Summary

PR Title: chore(deps): Update posthog-js to 1.135.1

Repo: PostHog/posthog

State: Open

Created: 0 days ago

Changes

This pull request updates the posthog-js dependency from version 1.134.0 to 1.135.1. The changes are reflected in two files:

  • package.json: Updated the version of posthog-js.
  • pnpm-lock.yaml: Updated the lock file to reflect the new version of posthog-js.

Detailed Diff Analysis

diff --git a/package.json b/package.json
index cde64574a54a1..b2b30dbb7caf8 100644
--- a/package.json
+++ b/package.json
@@ -146,7 +146,7 @@
         "pmtiles": "^2.11.0",
         "postcss": "^8.4.31",
         "postcss-preset-env": "^9.3.0",
-        "posthog-js": "1.134.0",
+        "posthog-js": "1.135.1",
         "posthog-js-lite": "3.0.0",
         "prettier": "^2.8.8",
         "prop-types": "^15.7.2",
diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml
index e266fba7ad9c1..e34bc4bbc3f13 100644
--- a/pnpm-lock.yaml
+++ b/pnpm-lock.yaml
@@ -260,8 +260,8 @@ dependencies:
     specifier: ^9.3.0
     version: 9.3.0(postcss@8.4.31)
   posthog-js:

-    specifier: 1.134.0
-    version: 1.134.0
+    specifier: 1.135.1
+    version: 1.135.1
   posthog-js-lite:
     specifier: 3.0.0
     version: 3.0.0
@@ -17564,8 +17564,8 @@ packages:
     resolution: {integrity: sha512-dyajjnfzZD1tht4N7p7iwf7nBnR1MjVaVu+MKr+7gBgA39bn28wizCIJZztZPtHy4PY0YwtSGgwfBCuG/hnHgA==}
     dev: false

-  /posthog-js@1.134.0:

-    resolution: {integrity: sha512-AUUsnw0uZrMOI+MMO6vXcdOPZI3yRJw9xhB6FWImi9mXRIEOSVvBta6WHwE+AXuX6+3yTxYgEEaVdunKvNojDQ==}
+  /posthog-js@1.135.1:
+    resolution: {integrity: sha512-ZHEJYByEyvxO20Nu86iH9ZzMa+iufpXfbBwc1e93obDOxtQkV9trEM+iEz+QkZYV4HR1RvNVQOXwGLxu7M+wSQ==}
     dependencies:
       fflate: 0.4.8
       preact: 10.22.0

Code Quality Assessment

Code Changes

The changes are minimal and straightforward, involving only an update to the version of a dependency (posthog-js). This is a typical maintenance task to ensure that the project uses the latest stable version of its dependencies.

Dependency Management

Updating dependencies regularly is crucial for maintaining security and taking advantage of new features and bug fixes provided by the library maintainers.

Automated Process

The commit was made by PostHog Bot, indicating that this update might be part of an automated dependency management process, which is a good practice for keeping dependencies up-to-date without manual intervention.

Conclusion

This PR is a simple dependency update with no significant code changes or additions beyond updating the package versions in package.json and pnpm-lock.yaml. The code quality is maintained as there are no functional changes or additions that could introduce bugs or require additional testing.

Given that this is a minor version update, it should be safe to merge after ensuring that the new version of posthog-js has been tested and does not introduce any breaking changes or regressions in functionality.

Recommendation

  • Merge: This PR can be safely merged after confirming that all automated tests pass and there are no compatibility issues with the new version of posthog-js.
  • Testing: Ensure that integration tests cover any critical paths that might be affected by this dependency update.

Report On: Fetch pull requests



Analysis of Progress Since Last Report

Summary

Since the last analysis 6 days ago, there has been significant activity in the PostHog/posthog repository. Numerous pull requests (PRs) have been opened and closed, with various enhancements, bug fixes, and new features being introduced. Below is a detailed report of the changes:

Open Pull Requests

  1. PR #22502: Chore to update posthog-js to version 1.135.1.
  2. PR #22501: Fix for toolbar clickmap reset.
  3. PR #22500: Feature to add confirmation to proxy deletion.
  4. PR #22499: Feature for action and event filters.
  5. PR #22498: Draft to add web vitals collection.
  6. PR #22497: Feature to move query performance polling to its own Celery task.
  7. PR #22496: UI polishing for the survey form editor.
  8. PR #22495: Refactor to remove old partition stats tables.
  9. PR #22493: Performance improvement to always execute API requests on offline cluster.
  10. PR #22492: Fix to prevent queries on the persons page from being canceled.

Notable Closed Pull Requests

No PRs have been closed since the last report.

Significant Issues and Resolutions

  • PR #22497 introduces a significant change by moving query performance polling to its own Celery task, which should improve performance and reliability.
  • PR #22496 addresses several UI issues in the survey form editor, improving user experience.
  • PR #22495 removes old partition stats tables, which should help in reducing clutter and improving maintainability.
  • PR #22493 ensures that API requests are always executed on the offline cluster, which should help in load balancing and performance optimization.

Observations

  • There has been a notable focus on refining existing functionalities, improving error handling, and enhancing user experience across various components of PostHog.
  • The project continues to evolve with significant contributions aimed at both expanding capabilities and ensuring reliability.

Overall, the recent activity indicates an active development cycle aimed at both expanding capabilities and ensuring the reliability of the platform.


This level of activity suggests that the PostHog team is actively working on both new features and improvements to existing functionalities, ensuring that the platform remains robust and user-friendly.

Report On: Fetch Files For Assessment



Source Code Assessment

File: posthog/models/query_metrics/sql.py

Structure and Quality:

  1. Modularization:

    • The file uses lambda functions to define SQL queries, which keeps the code concise but can reduce readability.
    • SQL queries are well-structured and use appropriate ClickHouse features like MergeTreeEngine, LowCardinality, and materialized views.
  2. Performance Considerations:

    • The use of PARTITION BY and ORDER BY clauses in table creation helps optimize query performance.
    • Kafka settings like kafka_skip_broken_messages ensure resilience in message processing.
  3. Readability:

    • Inline comments provide context for the experimental nature of the tables.
    • The commented-out section at the end is useful for manual schema management but should ideally be moved to a separate script or documentation.
  4. Maintainability:

    • The use of constants and lambda functions for SQL queries makes it easier to manage changes.
    • The file is self-contained, focusing on metrics-related tables and views.

File: frontend/src/lib/components/DatabaseTableTree/DatabaseTableTree.tsx

Structure and Quality:

  1. Component Design:

    • The component is well-structured, with clear separation of concerns through different interfaces (TreeProps, TreeItem, etc.).
    • The use of TypeScript interfaces enhances type safety and code clarity.
  2. Readability:

    • The code is easy to read, with meaningful variable names and consistent formatting.
    • JSX elements are well-organized, making the component's structure clear.
  3. Functionality:

    • Handles different types of tree items (TreeItemFolder, TreeTableItemLeaf, TreeItemLeaf) effectively.
    • Provides a clean UI for displaying database tables with selectable rows.
  4. Maintainability:

    • The component is modular, making it easy to extend or modify individual parts.
    • Use of TypeScript ensures that changes are less likely to introduce type-related bugs.

File: posthog/tasks/scheduled.py

Structure and Quality:

  1. Task Management:

    • The file defines a comprehensive set of periodic tasks using Celery, covering various aspects like monitoring, data synchronization, and usage reporting.
    • Tasks are scheduled with appropriate intervals and conditions, ensuring efficient resource utilization.
  2. Readability:

    • Clear function names and docstrings make the purpose of each task evident.
    • Use of helper functions like add_periodic_task_with_expiry improves readability by abstracting common patterns.
  3. Performance Considerations:

    • Tasks are scheduled with expiry times to avoid redundant executions during backlogs.
    • Monitoring tasks are frequent but lightweight, ensuring timely detection of issues without overloading the system.
  4. Maintainability:

    • The file is well-organized, grouping related tasks together.
    • Use of settings for configurable parameters allows easy adjustments without code changes.

File: posthog/api/test/test_insight.py

Structure and Quality:

  1. Test Coverage:

    • This file is crucial for ensuring the correctness of insight-related features.
    • Given its length (3435 lines), it likely covers a wide range of test cases, which is essential for robust testing.
  2. Readability:

    • Test files can become lengthy, but maintaining clear test case descriptions and organizing tests into logical sections can improve readability.
  3. Maintainability:

    • Regular updates and refactoring might be needed to keep the tests aligned with evolving features.
  4. Performance Considerations:

    • Long test files can slow down CI/CD pipelines; consider breaking down into smaller files if necessary.

File: frontend/src/scenes/data-warehouse/external/TableData.tsx

Structure and Quality:

  1. Component Design:

    • The component handles various states (editing mode, schema mode) effectively using hooks like useState and useEffect.
  2. Readability:

    • Well-organized JSX structure with clear conditional rendering based on the state.
  3. Functionality:

    • Provides comprehensive UI for managing data warehouse tables, including editing schemas and queries.
  4. Maintainability:

    • Modular design with separate logic files (viewLinkLogic, dataWarehouseSceneLogic) makes it easier to manage state and actions.

File: posthog/clickhouse/client/execute_async.py

Structure and Quality:

  1. Async Query Execution:

    • Implements robust mechanisms for managing async query execution using Redis for status tracking.
  2. Error Handling:

    • Comprehensive error handling ensures that errors are logged and appropriate actions are taken (e.g., revoking tasks).
  3. Performance Considerations:

    • Uses Prometheus histograms to track query wait and process times, aiding in performance monitoring.
  4. Maintainability:

    • Well-structured classes (QueryStatusManager) encapsulate related functionalities, making the codebase easier to maintain.

File: posthog/hogql/database/test/__snapshots__/test_database.ambr

Structure and Quality:

  1. Snapshot Testing:

    • Snapshot files capture the state of database schemas or logic at a specific point in time.
  2. Readability & Maintainability:

    • Snapshot files can become large; ensure they are updated consistently with schema changes to avoid discrepancies.

File: posthog/models/kafka_partition_stats/sql.py

Structure and Quality:

  1. Modularization:

    • Defines classes (PartitionStatsKafkaTable, PartitionStatsV2Table) for managing Kafka partition statistics tables, promoting modularity.
  2. SQL Queries:

    • Uses appropriate ClickHouse engines (AggregatingMergeTree, ReplacingMergeTree) for efficient data storage and retrieval.
  3. Maintainability:

    • Clear separation between different versions (V1, V2) makes it easier to manage schema evolution.

File: frontend/src/scenes/settings/project/PersonsJoinMode.tsx

Structure and Quality:

  1. Component Design:

    • Simple yet effective component for managing persons join mode settings using radio buttons.
  2. Readability & Maintainability:

    • Clear separation of concerns with hooks (useActions, useValues) managing state updates and actions.
  3. User Guidance:

    • Provides helpful descriptions for each join mode option, guiding users in making informed choices.

File: posthog/api/plugin.py

Structure and Quality (General Observations):

  1. Plugin Management:

    • This file likely handles API endpoints related to plugin management.
    • Ensure that any removed lines do not affect critical plugin functionalities or introduce security risks.
  2. Error Handling & Logging:

    • Adequate error handling should be present to manage plugin-related errors gracefully.
  3. Maintainability & Readability:

    • Given its length (939 lines), consider breaking down into smaller modules if necessary to improve maintainability.

This assessment covers the structure, quality, readability, performance considerations, and maintainability aspects of each provided file based on their context within the PostHog project repository on GitHub.

Aggregate for risks



Notable Risks

Lack of Test Coverage for New Functionality in PR #22498

Severity: High (3/3)

Rationale

The pull request #22498, which aims to add web vitals collection, lacks any associated test cases. This absence of test coverage is critical because it introduces new functionality that could potentially affect the performance and reliability of the analytics platform.

  • Evidence: The PR #22498 does not include any new test files or updates to existing test files.
  • Reasoning: Introducing new functionality without adequate test coverage can lead to undetected bugs and issues in production, affecting the reliability and accuracy of the analytics platform.

Next Steps

  • Immediately add comprehensive test cases for the new web vitals collection functionality.
  • Ensure that these tests cover various scenarios and edge cases to validate the correctness and performance of the new feature.

Prolonged Disagreement in PR #22497

Severity: Medium (2/3)

Rationale

There has been considerable disagreement among team members regarding the architectural changes proposed in PR #22497, which moves query performance polling to its own Celery task. This prolonged disagreement could indicate deeper underlying issues that may affect project timelines and team cohesion.

  • Evidence: The discussion thread in PR #22497 shows ongoing debates and lack of consensus on the proposed changes.
  • Reasoning: Prolonged disagreements can delay important updates and create friction within the team, potentially impacting overall productivity and project timelines.

Next Steps

  • Escalate this discussion to a tech lead or technical executive for resolution.
  • Facilitate a meeting to reach a consensus and document the agreed-upon approach to avoid future misunderstandings.

Multiple Rewrites of Source Code Files

Severity: Medium (2/3)

Rationale

Several source code files have undergone multiple rewrites within a short period. This pattern can introduce instability and indicates potential issues with initial design or requirements clarity.

  • Evidence: Files such as posthog/models/query_metrics/sql.py and frontend/src/lib/components/DatabaseTableTree/DatabaseTableTree.tsx have seen multiple recent changes.
  • Reasoning: Frequent rewrites can lead to code instability, increased likelihood of bugs, and potential technical debt if not managed properly.

Next Steps

  • Conduct a review to understand the reasons behind these frequent changes.
  • Ensure that requirements are clearly defined and initial designs are thoroughly reviewed before implementation.
  • Implement stricter code review processes to catch potential issues early.

Non-Critical PRs Left Open for Several Days

Severity: Low (1/3)

Rationale

Several non-critical pull requests have been left open for several days without any updates or reviews. While not immediately critical, this can slow down development progress and indicate potential bottlenecks in the review process.

  • Evidence: PRs such as #22502 (dependency update) have been open for multiple days without significant activity.
  • Reasoning: Delays in reviewing and merging non-critical PRs can accumulate over time, leading to slower development cycles and potential backlog build-up.

Next Steps

  • Streamline the review process to ensure timely reviews and merges of non-critical PRs.
  • Assign specific reviewers or set up automated reminders to address pending PRs promptly.