feat: Add AI activity plugins plus HubSpot and Notion user activity ingestion#2
Open
irfanuddinahmad wants to merge 82 commits into
Open
feat: Add AI activity plugins plus HubSpot and Notion user activity ingestion#2irfanuddinahmad wants to merge 82 commits into
irfanuddinahmad wants to merge 82 commits into
Conversation
irfanuddinahmad
force-pushed
the
feature/hubspot-notion-plugins
branch
2 times, most recently
from
April 14, 2026 10:25
6f43704 to
e775a64
Compare
- Switched back from barchart to piechart - Set reduceOptions.values=true so each SQL row becomes a pie slice - Set reduceOptions.calcs=[sum] instead of lastNotNull - Set color.mode=palette-classic for multi-color segments - Applied to all 4 pie charts across both dashboards
- Scope ConvertActivity delete + cursor to OccurredAfter/Before window - Propagate loadSalesforceUserMap errors instead of silent fallback - Parse expires_in from OAuth response with 60s safety buffer - Add MaxUsers cap and count logging to user collection - MergeFromRequest returns errors.Error - Add unit tests for grouping, OAuth parsing, and user SOQL
feat: Added test coverage dashboard for GitHub
feat: added Salesforce user activity plugin
Save Connection now merges plugin initialValues with form values through a whitelisted helper, matching Test Connection behavior on create and preventing required defaults (e.g. GitHub's endpoint and authMethod) from being dropped on save. - Extract the merge into buildConnectionSavePayload, which picks only known connection fields so unexpected initialValues keys don't leak into the payload. - Document the intentional handleSave/handleTest asymmetry on the update path. - Add unit tests covering default preservation, explicit overrides (including empty string and false), undefined initialValues, empty values, undefined-override semantics, and unsupported-key dropping. - Add test infrastructure: tsconfig.test.json, npm test script, .test-dist gitignore entry.
- Single-source CONNECTION_FORM_FIELDS in payload.ts; SAVE_CONNECTION_FIELDS is now form fields + an explicit plugin-defaults list. - Make the test npm script cross-platform and discover tests via glob. - Add a yarn test step to the config-ui CI workflow. - Annotate helper return type; clarify the handleSave/handleTest asymmetry comment.
fix: include default connection values on save
Stop wiping App/token secrets on update and re-validate masked values against the existing connection.
* Prevent stuck loading and stale pagination in data scope picker * Add explicit Select All that loads all scopes before selecting * Show selected scopes as chips without opening a second dropdown * Keep Blueprint detail visible while refresh runs after save
…orgot password flow
…pe-loading-issue fix(github): Fix blueprint data scope selection UX
…er-default fix(github): stop default project blueprints limiting historical sync
…ord-support Configure Grafana SMTP for password reset emails and forgot password flow
When a blueprint's time_after was cleared (set to NULL) and a Full Sync was triggered, SubtaskStateManager was silently restoring the old cutoff from _devlake_subtask_states via a nil-fallback, causing collection to remain limited to the previous 6-month window instead of fetching all available history. Two-part fix: 1. NewSubtaskStateManager: skip the preState.TimeAfter fallback when FullSync is true, so nil TimeAfter on a full sync means "no cutoff". 2. Close(): always write TimeAfter (even nil) on full-sync completes, so the stored cutoff is cleared and subsequent incremental runs are not restricted to the old date. Updated the test case that was asserting the buggy fallback behavior.
…ull sync Same bug as SubtaskStateManager: github_graphql uses CollectorStateManager which writes to _devlake_collector_latest_state. When FullSync was triggered with no syncPolicy.TimeAfter, the stored cutoff was restored via the nil fallback, and Close() left it in the DB for the next run. Applied identical two-part fix: 1. Skip the state.TimeAfter fallback when syncPolicy.FullSync is true. 2. Always write TimeAfter (even nil) in Close() so the stale cutoff is cleared from _devlake_collector_latest_state after a full sync. Updated the test case asserting the buggy fallback behavior.
…s during full sync
…es-stored-time-after fix(github): full sync no longer inherits stale time_after cutoff
…failure fix(github): refactor issue handling in CollectIssues function
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR adds five activity-focused integrations across AI and collaboration tooling.
It extends Claude, Codex, and Cursor to normalize AI usage and review-related events into the shared ai_activities domain model. It also introduces new HubSpot and Notion plugins that collect user activity events and write them into a new shared user_activities domain table for daily activity reporting.
Main Changes
Added unified AI activity support for Claude, Codex, and Cursor, including interface type, suggestions, acceptances, commit/PR creation, token usage, and cost fields where supported.
Extended Codex coverage to include code review and code review response activity in addition to usage analytics.
Added new HubSpot and Notion plugins with connection APIs, scope APIs, scope-config APIs, blueprint support, polling collectors, and optional webhook ingestion.
Added owner/user enrichment for HubSpot and Notion so activity records can resolve user email/display-name data before conversion.
Added the shared user_activities domain table and related migrations.
Added user-project mapping APIs/services for project-scoped access and admin visibility.
Added config UI registration and connection forms for HubSpot and Notion.
Added and updated Grafana dashboards for AI adoption, token usage, code review, cost/billing, commit attribution, HubSpot activity, Notion activity, combined HubSpot/Notion activity, and admin access views.
Why
This work gives DevLake a consistent reporting layer for two adjacent needs:
AI engineering activity across Claude, Codex, and Cursor through one normalized domain model.
Collaboration and business-user activity across HubSpot and Notion through one normalized domain model.