Skip to content

Conversation

@seefeldb
Copy link
Contributor

@seefeldb seefeldb commented Nov 5, 2025

Changed OpaqueRef type to properly unwrap BrandedCell types instead of wrapping them recursively. This prevents OpaqueRef<Cell> from becoming OpaqueRef<OpaqueRef>.

Also updated IKeyableOpaque.key() return type to use OpaqueCell instead of OpaqueRef for consistency, and added necessary type casts throughout the codebase where OpaqueCell methods (connect, set, setSchema, export) are called on OpaqueRef values.

This allows passing Cell as recipe inputs and using them as such in code that closes over them (future PRs will add actual closure support for them).


Summary by cubic

Fixes OpaqueRef so OpaqueRef<Cell> unwraps to Cell instead of nesting. Aligns key() to return OpaqueCell, enabling Cells to be passed as recipe inputs and used directly.

  • Bug Fixes
    • Updated OpaqueRef to correctly unwrap BrandedCell types.
    • Changed IKeyableOpaque.key() to return OpaqueCell for consistency.
    • Updated call sites and ts-transformer to use OpaqueCell, emitting asCell for Cell inputs (connect, set, setSchema, export).

Written for commit 0db1d04. Summary will update automatically on new commits.

Changed OpaqueRef type to properly unwrap BrandedCell types instead of
wrapping them recursively. This prevents OpaqueRef<Cell<T>> from
becoming OpaqueRef<OpaqueRef<T>>.

Also updated IKeyableOpaque.key() return type to use OpaqueCell instead
of OpaqueRef for consistency, and added necessary type casts throughout
the codebase where OpaqueCell methods (connect, set, setSchema, export)
are called on OpaqueRef values.

This allows passing `Cell` as recipe inputs and using them as such in code that closes over them (future PRs will add actual closure support for them).
@seefeldb seefeldb requested a review from mathpirate November 5, 2025 00:04
Copy link
Contributor

@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 6 files

Copy link
Contributor

@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 2 files

Copy link
Contributor

@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 2 files

@seefeldb seefeldb merged commit 381e6a2 into main Nov 5, 2025
9 checks passed
@seefeldb seefeldb deleted the fix/opaque-ref-of-cell-unwraps-to-cell branch November 5, 2025 17:49
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