Skip to content

Conversation

@beynar
Copy link
Owner

@beynar beynar commented Sep 30, 2025

Summary by CodeRabbit

  • New Features

    • None
  • Refactor

    • Removed real‑time presence and the synchronized data types and editors (arrays, maps, sets, objects, text, numbers, booleans, dates, enums, rich text, discriminated unions).
    • Removed the schema builder, type/validator surface, and associated utilities, significantly reducing the public API.
  • Chores

    • Removed several top‑level exports related to state syncing and schema creation.
  • Style

    • Removed Tailwind base/components/utilities imports from the app stylesheet.
  • Tests

    • Deleted the corresponding unit and integration test suites.

@coderabbitai
Copy link

coderabbitai bot commented Sep 30, 2025

Walkthrough

This PR removes Tailwind imports from the CSS entry, deletes multiple public re-exports, and removes a large portion of the Yjs-backed sync system: presence, all Synced* proxy implementations, schema factory/types, utilities, and most related tests. A new core/package.json is added.

Changes

Cohort / File(s) Summary
CSS entry imports removed
package/src/app.css
Removed Tailwind layer imports: @import 'tailwindcss/base', components, and utilities.
Public index exports trimmed
package/src/lib/index.ts
Removed re-exports: syncroState, usePresence, and y.
Presence module removed
package/src/lib/presence.svelte.ts
Deleted Presence types, class, usePresence and Yjs awareness integration.
Proxy system removed
package/src/lib/proxys/* (e.g., .../array.svelte.ts, .../base.svelte.ts, .../boolean.svelte.ts, .../date.svelte.ts, .../discriminatedUnion.svelte.ts, .../enum.svelte.ts, .../map.svelte.ts, .../number.svelte.ts, .../object.svelte.ts, .../richText.svelte.ts, .../set.svelte.ts, .../syncroState.svelte.ts, .../text.svelte.ts, common.ts)
Removed all Synced* classes, base types, syncroState factory, createSyncroState, and related proxy implementations.
Schema factory and specific schemas removed
package/src/lib/schemas/schema.ts, package/src/lib/schemas/date.ts
Deleted y factory, schema/type machinery, and Date schema/validator.
Utilities removed
package/src/lib/utils.ts
Deleted Yjs-related helpers (type creation, array/set observers, NULL handling, validation helpers, logging utilities).
Proxy tests removed
package/src/tests/proxys/* (...multiple files)
Deleted all proxy behavior and diagnostic test suites (arrays, boolean, date, enum, map, number, object, set, string, discriminatedUnion, etc.).
Schema tests removed
package/src/tests/schemas/* (boolean.test.ts, date.test.ts, enum.test.ts, number.test.ts, string.test.ts)
Removed validator tests for primitives and date schema.
Integration & sync tests removed
package/src/tests/integration/discriminatedUnion.integration.test.ts, package/src/tests/syncroState.test.ts
Deleted discriminated union integration tests and end-to-end syncroState tests.
Added package manifest
core/package.json
New package.json for @syncrostate/core with entries, scripts, peer/runtime/dev deps, and publish config.

Sequence Diagram(s)

(omitted — changes remove features and do not introduce a new control-flow to diagram)

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~60 minutes

Possibly related PRs

Poem

A rabbit trims the tangled vine,
Drops old proxies, clears the line.
Schemas folded, tests set free,
Lighter hops and fewer keys.
I nibble crumbs and bound away — hooray! 🐇✨

Pre-merge checks and finishing touches

❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Title Check ⚠️ Warning The title claims extraction of core and creation of Svelte and vanilla packages, but the diff only adds a core/package.json and removes existing proxy modules and tests without introducing any Svelte or vanilla package structure, so it misrepresents the changes. Please revise the title to focus on what this PR actually does—such as “Extract core package and remove legacy proxies”—and defer mentioning Svelte and vanilla package creation until those are added in a separate PR.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Docstring Coverage ✅ Passed No functions found in the changes. Docstring coverage check skipped.
✨ Finishing touches
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch agnostic

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
🧪 Early access (Sonnet 4.5): enabled

We are currently testing the Sonnet 4.5 model, which is expected to improve code review quality. However, this model may lead to increased noise levels in the review comments. Please disable the early access features if the noise level causes any inconvenience.

Note:

  • Public repositories are always opted into early access features.
  • You can enable or disable early access features from the CodeRabbit UI or by updating the CodeRabbit configuration file.

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

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 2

🧹 Nitpick comments (1)
core/package.json (1)

23-23: Consider safer publish workflow.

The patch script doesn't fail on build errors (due to shell && continuation) and skips running tests before publishing. Consider adding test execution and ensuring failures halt the process.

Apply this diff:

-    "patch": "npm version patch && npm run build && npm publish"
+    "patch": "npm run test && npm version patch && npm run build && npm publish"
📜 Review details

Configuration used: Path: .coderabbit.yml

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 28bc7b3 and e3a8a2c.

⛔ Files ignored due to path filters (1)
  • .coderabbit.yml is excluded by none and included by none
📒 Files selected for processing (1)
  • core/package.json (1 hunks)
🔇 Additional comments (1)
core/package.json (1)

36-36: No runtime imports of alien-signals found
Import appears only in tests (core/tests/fixture.ts), so alien-signals is correctly placed in devDependencies.

@@ -0,0 +1,41 @@
{
"name": "@syncrostate/core",
"module": "index.ts",
Copy link

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major

Fix module field to point to built output.

The module field points to the source file index.ts, while exports, main, and types correctly reference the built output in dist/. For a published package, all entry points should reference built artifacts.

Apply this diff:

-  "module": "index.ts",
+  "module": "./dist/index.js",
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
"module": "index.ts",
"module": "./dist/index.js",
🤖 Prompt for AI Agents
In core/package.json around line 3, the "module" field currently points to the
source file "index.ts"; change it to point to the built output (e.g.,
"dist/index.js") to match "exports", "main", and "types" which reference dist/,
ensuring all package entry points reference the compiled artifacts before
publishing.

"typescript": "^5"
},
"dependencies": {
"@vitest/coverage-v8": "^3.2.4",
Copy link

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major

Move test coverage tool to devDependencies.

@vitest/coverage-v8 is a testing utility and should be in devDependencies, not dependencies. Runtime consumers of @syncrostate/core don't need coverage tooling.

Apply this diff:

   "dependencies": {
-    "@vitest/coverage-v8": "^3.2.4",
     "esm-env": "^1.2.2",
     "y-protocols": "^1.0.6",
     "yjs": "^13.6.27"
   },
   "devDependencies": {
     "@vitest/ui": "^3.2.4",
+    "@vitest/coverage-v8": "^3.2.4",
     "alien-signals": "^3.0.0",
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
"@vitest/coverage-v8": "^3.2.4",
++ b/core/package.json
@@ -26,8 +26,7 @@
"dependencies": {
- "@vitest/coverage-v8": "^3.2.4",
"esm-env": "^1.2.2",
"y-protocols": "^1.0.6",
"yjs": "^13.6.27"
@@ -33,7 +32,8 @@
"devDependencies": {
"@vitest/ui": "^3.2.4",
"@vitest/coverage-v8": "^3.2.4",
"alien-signals": "^3.0.0",
"tsdown": "...",
"typescript": "...",
🤖 Prompt for AI Agents
In core/package.json around line 29, the package "@vitest/coverage-v8" is
currently listed under "dependencies" but it is a testing tool and should be
moved to "devDependencies"; update package.json by removing the
"@vitest/coverage-v8" entry from the "dependencies" section and add the same
entry with the same version string to "devDependencies", then run npm/yarn
install (or update lockfile) to ensure dependency state is consistent.

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