Skip to content

refactor(bia-shared)!: 3.0.0 pure barrel + cross-repo schema-history archive - #64

Merged
BIBOYANG425 merged 3 commits into
mainfrom
refactor/cross-repo-contracts
Jul 7, 2026
Merged

BIBOYANG425 merged 3 commits into
mainfrom
refactor/cross-repo-contracts

Conversation

@BIBOYANG425

Copy link
Copy Markdown
Owner

Part 1 of the cross-repo cleanup (companion PRs land in bia-roommate and george).

bia-shared 3.0.0 (breaking)

  • Root barrel is now pure types + logic. ArticleRenderer moved to the new ./react subpath (source-only, mirrors next/*), so Node consumers (george) can import types without dragging react/jsdom.
  • In-repo consumer (BlogEditor) repointed.
  • Known residue: the barrel still transitively pulls isomorphic-dompurify via sanitizeArticleHtml (pure, Node-isomorphic) — acceptable, documented.

Schema-history archive (docs only)

  • docs/schema-history/{bia-roommate,george}/ archives the 29 + 15 migration files whose DDL created most shared tables (students, parcels, shipments, squad_*, sublets, events...). Inert documentation, not runnable migrations.
  • README maps each archived file to the tables it created, and warns about the three functions with divergent bodies across repos (enqueue_parcel_notification, admin_patch_parcel, admin_attach_parcels_to_shipment) — only root supabase/migrations/ is canonical.
  • Companion PRs delete supabase/ from bia-roommate and george and add CI guards, making this repo the single migrations owner in fact.

Merge order

Merge THIS first — publishing 3.0.0 unblocks the consumer bumps in the bia-roommate and george PRs.

Tests: bia-shared 67 + bia-admin 355 | 25 skipped green; tsc clean.

🤖 Generated with Claude Code

BIBOYANG425 and others added 2 commits July 7, 2026 03:19
…ve to ./react (3.0.0)

The root barrel (and ./articles) re-exported the ArticleRenderer React
component, so any pure Node/server consumer importing the barrel for a type
dragged in the `react` peer dependency (plus the "use client" boundary).

Move ArticleRenderer to a new ./react subpath
(@biboyang425/bia-shared/react), source-only like ./next/*. The root barrel
and ./articles now expose only types + pure logic (Article type, excerpt,
images, sanitize, slug helpers), so type-only imports stay React-free.

BREAKING: consumers importing ArticleRenderer from the root or ./articles
must switch to ./react. Bumped 2.0.0 -> 3.0.0. Sole in-repo consumer
(BlogEditor) updated.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…er policy

Copy the shared-table migration SQL from bia-roommate (29 files) and george
(15 files) into docs/schema-history/ as an inert, read-only provenance archive.
These are NOT runnable migrations and are never applied — the canonical
append-only history is supabase/migrations/ and the live DB is the source of
truth.

The README records: the single-owner story (bia-admin owns migrations going
forward; roommate/george supabase dirs are being deleted in parallel PRs), a
per-file table of which archived migration created which shared table, a
WARNING that three functions (enqueue_parcel_notification, admin_patch_parcel,
admin_attach_parcels_to_shipment) have divergent bodies whose only canonical
definitions live in supabase/migrations/, and a note that george's local set is
internally inconsistent (001 students lacks the user_id that 010-014 FK against
— that column actually came from roommate's shipping_user_link), so the archive
is provenance, not a replayable history.

CLAUDE.md's schema section now states this provenance and the single-owner
policy.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@vercel

vercel Bot commented Jul 7, 2026

Copy link
Copy Markdown

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

Project Deployment Actions Updated (UTC)
bia-admin-bia-admin Ready Ready Preview, Comment Jul 7, 2026 1:35pm

@cursor

cursor Bot commented Jul 7, 2026

Copy link
Copy Markdown

Bugbot is not enabled for your account, so this pull request was not reviewed.

Enable Bugbot in the Cursor dashboard to get automatic reviews on future PRs.

@coderabbitai

coderabbitai Bot commented Jul 7, 2026

Copy link
Copy Markdown
Contributor

Warning

Review limit reached

@BIBOYANG425, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 56 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 5cf42da4-3e39-498c-88dd-e0f7adbf795c

📥 Commits

Reviewing files that changed from the base of the PR and between 2152b3f and 6995b25.

📒 Files selected for processing (53)
  • CLAUDE.md
  • bia-admin/components/blog/BlogEditor.tsx
  • docs/schema-history/README.md
  • docs/schema-history/bia-roommate/20260101_roommate_profiles.sql
  • docs/schema-history/bia-roommate/20260102_profile_likes.sql
  • docs/schema-history/bia-roommate/20260103_profile_comments.sql
  • docs/schema-history/bia-roommate/20260104_sublet_listings.sql
  • docs/schema-history/bia-roommate/20260105_saved_schedules.sql
  • docs/schema-history/bia-roommate/20260401_course_rating.sql
  • docs/schema-history/bia-roommate/20260402_squad.sql
  • docs/schema-history/bia-roommate/20260414_consolidate_sublets.sql
  • docs/schema-history/bia-roommate/20260419_shipping.sql
  • docs/schema-history/bia-roommate/20260419_shipping_user_link.sql
  • docs/schema-history/bia-roommate/20260420_shipping_method_routes_contacts.sql
  • docs/schema-history/bia-roommate/20260420_shipping_sensitive_method.sql
  • docs/schema-history/bia-roommate/20260421_shipping_sensitive_route_seed.sql
  • docs/schema-history/bia-roommate/20260422_admin_indexes.sql
  • docs/schema-history/bia-roommate/20260423_admin_parcel_rpcs.sql
  • docs/schema-history/bia-roommate/20260424_avatars_bucket.sql
  • docs/schema-history/bia-roommate/20260424_feedback.sql
  • docs/schema-history/bia-roommate/20260425_roommate_contact_channels.sql
  • docs/schema-history/bia-roommate/20260426_roommate_profiles_grants.sql
  • docs/schema-history/bia-roommate/20260427_shipment_requests_and_frequency.sql
  • docs/schema-history/bia-roommate/20260428_pack_requests_and_qr_bucket.sql
  • docs/schema-history/bia-roommate/20260503_events_source_url_unique.sql
  • docs/schema-history/bia-roommate/20260606_parcel_notification_enqueue.sql
  • docs/schema-history/bia-roommate/20260612_hide_test_roommate_profiles.sql
  • docs/schema-history/bia-roommate/20260612_roommate_profiles_contact_privacy.sql
  • docs/schema-history/bia-roommate/20260612_roommate_profiles_is_test.sql
  • docs/schema-history/bia-roommate/20260624000000_apartment_comments.sql
  • docs/schema-history/bia-roommate/20260624100000_apartment_votes.sql
  • docs/schema-history/bia-roommate/20260624120000_apartment_vote_access.sql
  • docs/schema-history/george/001_george_schema.sql
  • docs/schema-history/george/002_courses_programs.sql
  • docs/schema-history/george/002_onboarding_tracking.sql
  • docs/schema-history/george/003_wechat_ingest_knowledge.sql
  • docs/schema-history/george/010_user_profiles.sql
  • docs/schema-history/george/011_user_heartbeat_config.sql
  • docs/schema-history/george/012_user_heartbeat_instructions.sql
  • docs/schema-history/george/013_heartbeat_log.sql
  • docs/schema-history/george/014_student_followups.sql
  • docs/schema-history/george/015_pending_users.sql
  • docs/schema-history/george/20260522_extend_memory_categories.sql
  • docs/schema-history/george/20260611_messages_user_id_session_memory.sql
  • docs/schema-history/george/20260624_user_heartbeat_config_authenticated_insert.sql
  • docs/schema-history/george/20260624_user_heartbeat_config_consent_memory.sql
  • docs/schema-history/george/20260625_message_flags.sql
  • packages/bia-shared/package.json
  • packages/bia-shared/src/articles/index.ts
  • packages/bia-shared/src/index.ts
  • packages/bia-shared/src/react-components/ArticleRenderer.tsx
  • packages/bia-shared/src/react-components/index.ts
  • packages/bia-shared/tsconfig.build.json
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch refactor/cross-repo-contracts

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.

…Url:./src shadowed the npm react package

The ./react export subpath is unchanged (consumers still import
@biboyang425/bia-shared/react); only the internal source directory moved, so
that a bare `import * as React from "react"` no longer resolves to the local
dir under baseUrl:./src (which broke next build's type-check).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@cursor

cursor Bot commented Jul 7, 2026

Copy link
Copy Markdown

Bugbot is not enabled for your account, so this pull request was not reviewed.

Enable Bugbot in the Cursor dashboard to get automatic reviews on future PRs.

@BIBOYANG425
BIBOYANG425 merged commit 490d18f into main Jul 7, 2026
5 checks passed
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.

1 participant