data-elbobserve#692
Conversation
|
Note Reviews pausedIt looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the Use the following commands to manage reviews:
Use the checkboxes below for quick actions:
📝 WalkthroughWalkthroughThis PR adds per-flow event provenance via ChangesSource Release Provenance
Browser data-elbobserve Auto-Registration
Include Section Flattening
Docs, Sidebar, and Theme Updates App docs and MCP/cloud styling
Getting started content and examples
Sidebar and navigation ordering
Estimated code review effort: 4 (Complex) | ~60 minutes Possibly related PRs
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 inconclusive)
✅ Passed checks (4 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🧹 Nitpick comments (1)
packages/core/src/include.ts (1)
29-36: 🗄️ Data Integrity & Integration | 🔵 Trivial | 💤 Low valueUnderscore-joined keys can silently collide.
Flattening joins nested keys with
_, so an already-underscored flat key and a nested map can resolve to the same output key and overwrite each other (e.g.{ a_b: 1 }vs{ a: { b: 2 } }both →a_b). This is an edge case for the current event shapes, but worth a note since the last writer silently wins.🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@packages/core/src/include.ts` around lines 29 - 36, The flattenInto helper in include.ts can overwrite values when underscore-joined keys collide, so update the key handling to avoid silent last-writer-wins behavior. Either add collision detection/guarding before assigning to out[prefix], or change the flattening strategy in flattenInto to preserve both paths unambiguously; use flattenInto and isObject to locate the nested/object branch and the final assignment.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@packages/web/sources/browser/src/trigger.ts`:
- Around line 125-131: `reapElement` in `trigger.ts` only removes the first
matching `scrollElements` tuple for an element, leaving stale entries behind for
multi-trigger registrations. Update the cleanup logic in `reapElement` so it
removes all `[HTMLElement, number]` entries matching the target element from
`bucket.scrollElements` (instead of using `findIndex`/`splice`), ensuring
`handleTrigger` won’t later process detached elements.
---
Nitpick comments:
In `@packages/core/src/include.ts`:
- Around line 29-36: The flattenInto helper in include.ts can overwrite values
when underscore-joined keys collide, so update the key handling to avoid silent
last-writer-wins behavior. Either add collision detection/guarding before
assigning to out[prefix], or change the flattening strategy in flattenInto to
preserve both paths unambiguously; use flattenInto and isObject to locate the
nested/object branch and the final assignment.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: fa5c2d0b-ad2a-4d23-8f97-865f8ea428ad
📒 Files selected for processing (41)
.changeset/browser-data-elbobserve.md.changeset/source-release-provenance.mdapps/quickstart/src/__tests__/web-basic.test.tspackages/cli/src/__tests__/integration/bundle/programmatic.test.tspackages/cli/src/__tests__/unit/bundle/bundler-codegen.test.tspackages/cli/src/cli.tspackages/cli/src/commands/bundle/__tests__/archive-output.test.tspackages/cli/src/commands/bundle/__tests__/multi-flow-output.test.tspackages/cli/src/commands/bundle/bundler.tspackages/cli/src/commands/bundle/index.tspackages/cli/src/telemetry/__tests__/emitter.test.tspackages/cli/src/telemetry/emitter.tspackages/collector/src/__tests__/flow-identity.test.tspackages/collector/src/collector.tspackages/collector/src/handle.tspackages/collector/src/observerEmit.tspackages/core/src/__tests__/include.test.tspackages/core/src/include.tspackages/core/src/schemas/collector.tspackages/core/src/schemas/walkeros.tspackages/core/src/types/collector.tspackages/core/src/types/walkeros.tspackages/mcps/mcp/src/__tests__/telemetry.test.tspackages/server/core/src/__tests__/collector.test.tspackages/server/core/src/__tests__/destination.test.tspackages/transformers/validate/src/event-format.schema.tspackages/web/destinations/gtag/src/examples/step.tspackages/web/sources/browser/src/__tests__/observeIntegration.test.tspackages/web/sources/browser/src/__tests__/observeMutation.test.tspackages/web/sources/browser/src/__tests__/observeReaper.test.tspackages/web/sources/browser/src/__tests__/observeRegister.test.tspackages/web/sources/browser/src/__tests__/observeRegistry.test.tspackages/web/sources/browser/src/__tests__/observeShadow.test.tspackages/web/sources/browser/src/__tests__/trigger.test.tspackages/web/sources/browser/src/trigger.tspackages/web/sources/browser/src/types/elb.tspackages/web/sources/browser/src/types/index.tspackages/web/sources/browser/src/types/scope.tsskills/walkeros-understanding-events/SKILL.mdwebsite/docs/getting-started/event-model.mdxwebsite/docs/sources/web/browser/commands.mdx
Preview deployed |
|
📦 Pre-release published (next) Packages
Install: 🐳 Docker images published
Docker: |
|
📦 Pre-release published (next) Packages
Install: 🐳 Docker images published
Docker: |
Summary by CodeRabbit
data-elbobservedeclarative discovery for SPA-injected tagged content, including automatic cleanup and support for open shadow roots.--release <id>towalkeros bundleto stamp per-flowsource.releaseprovenance.source.release(and omitsource.version), with correct per-flowflowId.source.releaseanddata-elbobserve.