Skip to content

Add Angular framework adapter to core#104

Open
sonukapoor wants to merge 4 commits into
open-circle:mainfrom
sonukapoor:feat/103-angular-core-adapter
Open

Add Angular framework adapter to core#104
sonukapoor wants to merge 4 commits into
open-circle:mainfrom
sonukapoor:feat/103-angular-core-adapter

Conversation

@sonukapoor
Copy link
Copy Markdown

@sonukapoor sonukapoor commented May 20, 2026

Adds the Angular framework adapter to core. The adapter wires Angular's WritableSignal and untracked() to Formisch's framework interface - createSignal wraps WritableSignal<T> with a { value } getter/setter to match the Signal<T> contract, batch is a no-op since Angular's scheduler coalesces writes automatically, and untrack delegates to untracked() from @angular/core.

Also adds 'angular' to the Framework type, exports @formisch/core/angular, and adds @angular/core as an optional peer dependency (>=17, where signals are stable).

This is the foundation for the upcoming frameworks/angular package.

Copilot AI review requested due to automatic review settings May 20, 2026 02:40
@dosubot dosubot Bot added the size:M This PR changes 30-99 lines, ignoring generated files. label May 20, 2026
@vercel
Copy link
Copy Markdown

vercel Bot commented May 20, 2026

@sonukapoor is attempting to deploy a commit to the Open Circle Team on Vercel.

A member of the Team first needs to authorize it.

@dosubot dosubot Bot added the enhancement New feature or request label May 20, 2026
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 20, 2026

Review Change Stack

Note

Reviews paused

It 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 reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review

Walkthrough

This PR adds Angular as a supported framework to the core package. The change extends the Framework type union to include 'angular', introduces a new Angular adapter module that exports framework utilities (ID generation, Signal wrappers with type-safe overloads, and batching/untracking helpers), and updates the package configuration to expose the adapter via a subpath export with corresponding optional peer dependencies on @angular/core.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately and concisely summarizes the main change: adding an Angular framework adapter to the core package, which is the primary objective of the PR.
Description check ✅ Passed The description provides relevant details about the Angular adapter implementation, explains the design decisions, and outlines what is being added to the package and why.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.


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.

Copy link
Copy Markdown

@cubic-dev-ai cubic-dev-ai Bot left a comment

Choose a reason for hiding this comment

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

No issues found across 4 files

Re-trigger cubic

@sonukapoor sonukapoor force-pushed the feat/103-angular-core-adapter branch from 0b74f86 to 217995f Compare May 20, 2026 02:44
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Adds first-class Angular support to @formisch/core by introducing an Angular framework adapter and exposing it as @formisch/core/angular.

Changes:

  • Added packages/core/src/framework/index.angular.ts implementing Formisch’s framework adapter using Angular signal() and untracked().
  • Extended the core Framework union type to include 'angular'.
  • Exposed the new Angular entrypoint via packages/core/package.json exports and added @angular/core as an optional peer dependency (plus devDependency for local builds).

Reviewed changes

Copilot reviewed 3 out of 4 changed files in this pull request and generated 3 comments.

File Description
pnpm-lock.yaml Adds @angular/core to the lockfile for core package development.
packages/core/src/framework/index.ts Extends the Framework union with 'angular'.
packages/core/src/framework/index.angular.ts New Angular adapter wiring Angular signals to Formisch’s framework interface.
packages/core/package.json Exposes ./angular entrypoint and adds Angular dependency metadata.
Files not reviewed (1)
  • pnpm-lock.yaml: Language not supported

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread packages/core/package.json
Comment thread packages/core/package.json
Comment thread packages/core/src/framework/index.angular.ts Outdated
Copy link
Copy Markdown

@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: 1

🤖 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/core/package.json`:
- Line 75: The peerDependency range for "`@angular/core`" is too restrictive
(currently "^17.0.0") and conflicts with the devDependency using "^21.0.0";
update the "peerDependencies" entry for "`@angular/core`" to a broader range that
covers supported Angular versions (for example ">=17.0.0 <22.0.0" or a caret
range like "^17 || ^18 || ^19 || ^20 || ^21") so peer resolution won't warn for
Angular 18+; ensure the change is applied to the "peerDependencies" block and
keep the devDependency for "`@angular/core`" at "^21.0.0" if you need that for
local testing.
🪄 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: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 3edae2e9-318a-4c37-ac28-efb6424cc3cf

📥 Commits

Reviewing files that changed from the base of the PR and between 0b74f86 and 217995f.

⛔ Files ignored due to path filters (1)
  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
📒 Files selected for processing (3)
  • packages/core/package.json
  • packages/core/src/framework/index.angular.ts
  • packages/core/src/framework/index.ts

Comment thread packages/core/package.json
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

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

Files not reviewed (1)
  • pnpm-lock.yaml: Language not supported

Comment thread packages/core/src/framework/index.angular.ts Outdated
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 4 out of 5 changed files in this pull request and generated no new comments.

Files not reviewed (1)
  • pnpm-lock.yaml: Language not supported

Copy link
Copy Markdown
Member

@fabian-hiller fabian-hiller left a comment

Choose a reason for hiding this comment

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

Rest looks good to me

*
* @returns The created signal.
*/
export function createSignal<T>(): Signal<T | undefined>;
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I don't think we need the "without an initial value" variant. I would keep it similar to the SolidJS implementation.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Addressed.

*
* @returns The return value of the function.
*/
export function untrack<T>(fn: () => T): T {
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Can you try changing that to export { untracked as untrack } from '@angular/core'? I would prefer it if it does not break the types. See the other frameworks for reference.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Addressed.

@sonukapoor sonukapoor force-pushed the feat/103-angular-core-adapter branch 2 times, most recently from fa219e9 to edcd736 Compare May 21, 2026 20:40
Wires Angular signals (WritableSignal, untracked) to the Formisch
framework interface. Adds @angular/core as optional peer dep and
exports @formisch/core/angular.

Closes open-circle#103
- Add angular build entry to tsdown.config.ts so dist/index.angular.*
  is emitted and @angular/core is treated as external
- Widen peer dep range from ^17.0.0 to >=17.0.0 to cover Angular 18+
- Explicitly type the createSignal setter parameter as T | undefined
- Fix Signal import path after upstream type reorganization
Use non-generic implementation signature to align with the pattern
in index.ts and avoid overload-compatibility errors.
Aligns with the SolidJS adapter pattern: createSignal takes a required
initial value, and untrack is a direct re-export rather than a wrapper.
@sonukapoor sonukapoor force-pushed the feat/103-angular-core-adapter branch from edcd736 to 5f7097f Compare May 21, 2026 21:01
@sonukapoor sonukapoor requested a review from fabian-hiller May 21, 2026 21:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request size:M This PR changes 30-99 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants