Skip to content

chore(telemetry): add document field telemetry and document update cancelled COMPASS-10767 - #8308

Open
Anemy wants to merge 5 commits into
mainfrom
COMPASS-10767-data-viewing-telemetry-2
Open

chore(telemetry): add document field telemetry and document update cancelled COMPASS-10767#8308
Anemy wants to merge 5 commits into
mainfrom
COMPASS-10767-data-viewing-telemetry-2

Conversation

@Anemy

@Anemy Anemy commented Jul 31, 2026

Copy link
Copy Markdown
Member

COMPASS-10767

Adds Document Field Added, Document Field Removed, and Document Update Cancelled. There will be one more pr with field editing and type changing.

@Anemy
Anemy requested a review from a team as a code owner July 31, 2026 20:52
@Anemy
Anemy requested review from Copilot, gribnoysup and mabaasit July 31, 2026 20:52
* Tracks how the user edits documents, so that various ways of
* editing (list, table and the insert dialog) can share similar tracking.
*/
export function useDocumentEditsTelemetry(

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I opted for a hook here that listens to hadron-document events instead of drilling down props for each of these events to the various places that would emit them. Curious how y'all feel about this approach.
We'll also be adding field document edited and type changes here.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds new telemetry coverage for document field-level edits and edit-cancel actions in Compass CRUD, aligning tracking across the list/table views and the insert dialog.

Changes:

  • Introduces new connection-scoped telemetry events for field add/remove and update cancellation.
  • Adds a reusable useDocumentEditsTelemetry hook that listens to hadron-document edit/cancel events and emits the corresponding telemetry.
  • Wires the hook into the main documents list and the insert document modal, with a focused unit test suite for the hook.

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
packages/compass-telemetry/src/telemetry-events.ts Adds the new telemetry event type definitions and includes them in the global TelemetryEvent union.
packages/compass-crud/src/hooks/use-document-edits-telemetry.ts Implements centralized document edit telemetry wiring (field add/remove + update cancel).
packages/compass-crud/src/hooks/use-document-edits-telemetry.spec.tsx Adds tests validating emitted events and connection scoping behavior.
packages/compass-crud/src/components/insert-document.tsx Hooks insert-document editing UI into the shared telemetry hook for field add/remove tracking.
packages/compass-crud/src/components/document-list.tsx Hooks list/table/json document editing UI into the shared telemetry hook for consistent tracking.

Comment thread packages/compass-telemetry/src/telemetry-events.ts
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.

2 participants