Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@steven-tey
Copy link
Collaborator

@steven-tey steven-tey commented Oct 23, 2025

Summary by CodeRabbit

  • Refactor

    • Updated workspace identifier handling in data schema to separate processing between public API and ingestion layers.
  • Chores

    • Removed internal seed data utility.

@vercel
Copy link
Contributor

vercel bot commented Oct 23, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Preview Updated (UTC)
dub Ready Ready Preview Oct 23, 2025 0:16am

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Oct 23, 2025

Walkthrough

Modified workspace_id handling in TinyBird schema by relocating prefix transformation from public schema layer to the ingestion layer for recordLinkTB. Deleted the seed-data utility script used for TinyBird test data generation.

Changes

Cohort / File(s) Summary
TinyBird Schema Refactoring
apps/web/lib/tinybird/record-link.ts
Updated dubLinksMetadataSchema to remove workspace_id prefixing; moved prefix logic to recordLinkTB's event field via schema extension with overridden transform.
Seed Data Removal
apps/web/scripts/seed-data.ts
Deleted entire seed data script including static test data arrays and seeding functions (seedLinkMetadata, seedClicks, seedLeads, seedSales).

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

The workspace_id refactoring is a straightforward transform relocation with clear intent, and the seed-data deletion is a complete file removal. Both changes are homogeneous in nature with minimal interdependencies to trace.

Poem

🐰 A hop and a skip, we've refactored the schema,
Workspace IDs now flow where they're needed, not sooner,
Seed data scripts gone, the garden's now cleaner,
Logic transformed layer by layer—what a blooming tweener! ✨

Pre-merge checks and finishing touches

✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title Check ✅ Passed The pull request title "Remove prefixWorkspaceId for new Tinybird links metadata" clearly relates to the main change in the changeset. The primary modification updates dubLinksMetadataSchema to no longer prefix the workspace_id at the top-level schema, while the Tinybird ingestion path (recordLinkTB) handles the prefixing separately. The title accurately summarizes this refactoring of workspace ID handling, and a teammate scanning the history would understand the core intent—changing how workspace IDs are processed in the Tinybird links metadata. The secondary deletion of seed-data.ts does not diminish the clarity or accuracy of the title's focus on the primary schema changes.
Docstring Coverage ✅ Passed No functions found in the changes. Docstring coverage check skipped.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch remove-workspaceid-prefix

📜 Recent review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between d2b72a8 and ea675b8.

📒 Files selected for processing (2)
  • apps/web/lib/tinybird/record-link.ts (2 hunks)
  • apps/web/scripts/seed-data.ts (0 hunks)
💤 Files with no reviewable changes (1)
  • apps/web/scripts/seed-data.ts
🧰 Additional context used
🧬 Code graph analysis (1)
apps/web/lib/tinybird/record-link.ts (1)
apps/web/lib/api/workspaces/workspace-id.ts (1)
  • prefixWorkspaceId (1-3)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
  • GitHub Check: build
🔇 Additional comments (2)
apps/web/lib/tinybird/record-link.ts (2)

30-33: LGTM - Base schema correctly updated for new Tinybird endpoint.

The removal of prefixWorkspaceId from the base schema is correct. The transform now passes through non-null values unchanged while still coalescing nullish values to empty string, which aligns with the PR objective to remove prefixing for new Tinybird links metadata.


45-53: LGTM - Schema override maintains backward compatibility during migration.

The extension correctly overrides workspace_id to apply prefixWorkspaceId for the old Tinybird endpoint (recordLinkTB), maintaining backward compatibility while the new endpoint (recordLinkTBNew) uses the unprefixed version. This is a clean migration pattern that allows both systems to coexist safely.


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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@steven-tey steven-tey merged commit bee9d2a into main Oct 23, 2025
8 checks passed
@steven-tey steven-tey deleted the remove-workspaceid-prefix branch October 23, 2025 00:24
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