Skip to content

feat: add WebF SQFlite native plugin for SQLite database support#793

Merged
andycall merged 3 commits intomainfrom
feat/sqlite_plugin
Jan 10, 2026
Merged

feat: add WebF SQFlite native plugin for SQLite database support#793
andycall merged 3 commits intomainfrom
feat/sqlite_plugin

Conversation

@andycall
Copy link
Member

@andycall andycall commented Jan 10, 2026

Summary

  • Add webf_sqflite native plugin that wraps the sqflite Flutter package to provide SQLite database operations for WebF applications
  • Update CLI to copy README files to npm packages for better documentation
  • Fix flex baseline calculation to avoid crashes on detached children and missing parentData

Features

The new webf_sqflite plugin provides:

  • Open, close, and delete databases
  • Raw SQL queries (SELECT, INSERT, UPDATE, DELETE)
  • Helper methods for common CRUD operations
  • Batch operations for improved performance
  • Transaction support for atomicity
  • In-memory database support
  • Database version management and migrations

Changes

Area Description
native_plugins/sqflite/ New SQFlite native plugin with Dart bindings and TypeScript typings
cli/ Added README copying to module npm packages
webf/lib/src/rendering/flex.dart Fixed baseline calculation for detached/missing parentData
webf/test/ Added unit test for flex baseline edge cases
use_cases/ Added demo page for SQFlite functionality

Summary by CodeRabbit

  • New Features

    • Introduced WebF SQFlite plugin: SQLite support (open/close/delete, CRUD, raw SQL, batch, transactions) with docs, changelog, and license.
    • Added TypeScript typings and JS API surface for SQFlite.
    • Added interactive example page and demo route showcasing users/tasks and DB workflows; example app now registers the plugin for macOS.
  • Bug Fixes

    • Fixed flex layout baseline calculation for detached widgets and missing parent data.
  • Chores

    • CLI now includes README files in generated packages; package versions and manifests updated.

✏️ Tip: You can customize this high-level summary in your review settings.

@vercel
Copy link

vercel bot commented Jan 10, 2026

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

Project Deployment Review Updated (UTC)
use-case Ready Ready Preview, Comment Jan 10, 2026 1:30pm
vue_usecase Ready Ready Preview, Comment Jan 10, 2026 1:30pm

@coderabbitai
Copy link

coderabbitai bot commented Jan 10, 2026

📝 Walkthrough

Walkthrough

This PR adds a new WebF SQFlite native plugin (Dart bindings, module implementation, TypeScript typings, docs, and packaging), updates the CLI to copy README when generating modules, integrates SQFlite into the example and use-case apps, and fixes flex baseline handling with a new test.

Changes

Cohort / File(s) Summary
CLI Updates
cli/package.json, cli/src/commands.ts
Version bumped to 0.24.2; generateModuleCommand and generateCommand now copy README.md from Flutter source into generated npm package root and log when copied.
SQFlite Plugin — Docs & Config
native_plugins/sqflite/CHANGELOG.md, native_plugins/sqflite/LICENSE, native_plugins/sqflite/README.md, native_plugins/sqflite/pubspec.yaml, native_plugins/sqflite/tsconfig.json
New plugin metadata, MIT license, comprehensive README and changelog, pubspec and TS config for the webf_sqflite package.
SQFlite Plugin — Bindings & API Surface
native_plugins/sqflite/lib/src/sq_flite_module_bindings_generated.dart, native_plugins/sqflite/lib/src/sqflite.module.d.ts, native_plugins/sqflite/lib/webf_sqflite.dart
Generated Dart DTOs and abstract bindings (many option/result types) and TypeScript declaration file exposing a Promise-based WebFSQFlite interface; library export added.
SQFlite Plugin — Implementation
native_plugins/sqflite/lib/src/sqflite_module.dart
New SQFliteModule implementing database lifecycle, CRUD, raw SQL, batch and transaction operations, state management, and error handling.
Use Cases / Demo App
use_cases/package.json, use_cases/src/App.tsx, use_cases/src/pages/FeatureCatalogPage.tsx, use_cases/src/pages/WebFSQFlitePage.tsx
Added @openwebf/webf-sqflite dependency, route and catalog entry for /webf-sqflite, and large React demo page (WebFSQFlitePage) with DB lifecycle, CRUD, batch/transaction flows, raw queries, and logging UI.
Example App Integration
webf/example/macos/Flutter/GeneratedPluginRegistrant.swift, webf/example/macos/Runner.xcodeproj/project.pbxproj, webf/example/pubspec.yaml, webf/example/lib/main.dart
Registered and embedded sqflite_darwin for macOS, added path dependencies for webf_share and webf_sqflite, and defined modules in example main.dart.
Rendering Engine — Flex Baseline
webf/lib/src/rendering/flex.dart, webf/test/src/rendering/flex_baseline_detached_layout_test.dart
Safer baseline calculation for detached/placeholder children and robust parentData offset handling; added test to validate detached baseline layout behavior.

Sequence Diagram

sequenceDiagram
    actor User
    participant React as React Component<br/>(WebFSQFlitePage)
    participant JS as WebF JS Bridge<br/>(webf-sqflite)
    participant Dart as Dart Module<br/>(SQFliteModule)
    participant SQLite as SQLite DB<br/>(sqflite)
    
    User->>React: Open SQFlite Demo
    React->>JS: openDatabase(options)
    JS->>Dart: invoke('openDatabase', options)
    Dart->>SQLite: open database
    SQLite-->>Dart: DB instance
    Dart-->>JS: OpenDatabaseResult {success, databaseId}
    JS-->>React: Promise resolves
    React->>React: store databaseId, render UI

    User->>React: Add User / Query
    React->>JS: insert/query(options)
    JS->>Dart: invoke('insert'/'query', options)
    Dart->>SQLite: perform operation
    SQLite-->>Dart: results
    Dart-->>JS: result object
    JS-->>React: Promise resolves
    React->>React: update state

    User->>React: Batch / Transaction
    React->>JS: batch/transaction(operations)
    JS->>Dart: invoke('batch'/'transaction', ops)
    Dart->>SQLite: execute ops atomically
    SQLite-->>Dart: aggregated results
    Dart-->>JS: BatchResult/TransactionResult
    JS-->>React: Promise resolves
    React->>React: update UI with results
Loading

Estimated Code Review Effort

🎯 4 (Complex) | ⏱️ ~60 minutes

Possibly Related PRs

Poem

🐰 A hop, a skip, a database hop!
SQLite stores what must not stop,
From Flutter's heart to browser's grace,
The SQFlite module finds its place! 📦✨
With rows and batches, fast and free,
Our data persists so joyfully! 🎉

🚥 Pre-merge checks | ✅ 2 | ❌ 1
❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately describes the main change: adding a new WebF SQFlite native plugin for SQLite database support, which is the primary feature introduced across the changeset.

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


📜 Recent review details

Configuration used: defaults

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 8902a49 and 110aead.

📒 Files selected for processing (3)
  • webf/example/lib/main.dart
  • webf/lib/src/rendering/flex.dart
  • webf/test/src/rendering/flex_baseline_detached_layout_test.dart
🚧 Files skipped from review as they are similar to previous changes (2)
  • webf/lib/src/rendering/flex.dart
  • webf/test/src/rendering/flex_baseline_detached_layout_test.dart
🧰 Additional context used
📓 Path-based instructions (2)
webf/**/*.dart

📄 CodeRabbit inference engine (webf/CLAUDE.md)

webf/**/*.dart: Follow rules in webf/analysis_options.yaml for Dart code style
Use single quotes for strings in Dart code
File names must use snake_case in Dart
Class names must use PascalCase in Dart
Variables and functions must use camelCase in Dart
Prefer final fields when applicable in Dart code
Lines should be max 120 characters in Dart code
Always free allocated memory in Dart FFI using malloc.free() for toNativeUtf8() allocations
Free FFI allocated memory in finally blocks to ensure cleanup on exceptions
Track ownership of allocated pointers in FFI callbacks
Free NativeValue pointers after converting with fromNativeValue in FFI code
Document memory ownership clearly in FFI async callbacks
Implement WidgetElement to create custom Flutter widgets integrated into WebF's DOM tree
Register custom WidgetElements using WidgetElementRegistry.register(tagName, builder)
Override buildWidget(BuildContext context) method in WidgetElement to build the Flutter widget
Call updateWidget() when attributes change in WidgetElement implementations
Dispose controllers and subscriptions in WidgetElement for memory management
Follow W3C event standards when dispatching events from WidgetElement
Minimize widget rebuilds in WidgetElement for performance optimization
Implement ARIA attributes in WidgetElement when applicable for accessibility

Dart code in webf module must follow naming conventions: snake_case for file names, PascalCase for classes, and camelCase for class members

webf/**/*.dart: Always free allocated memory in Dart FFI
Use malloc.free() for toNativeUtf8() allocations in Dart FFI
Track pointer ownership in callbacks within Dart FFI

Files:

  • webf/example/lib/main.dart
{bridge/**/*.{cc,h},webf/**/*.dart}

📄 CodeRabbit inference engine (CLAUDE.md)

Document memory ownership clearly in FFI implementations

Files:

  • webf/example/lib/main.dart
🧠 Learnings (12)
📓 Common learnings
Learnt from: CR
Repo: openwebf/webf PR: 0
File: webf/CLAUDE.md:0-0
Timestamp: 2025-12-08T23:28:00.818Z
Learning: No build needed for Dart-only changes in webf/
Learnt from: CR
Repo: openwebf/webf PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-12-13T16:32:47.644Z
Learning: Applies to docs/**/*.md : Clarify that WebF builds Flutter apps, not web apps in documentation
Learnt from: CR
Repo: openwebf/webf PR: 0
File: scripts/CLAUDE.md:0-0
Timestamp: 2025-12-08T23:27:41.357Z
Learning: Applies to scripts/bridge/core/**/*.d.ts : Transform WebF-specific type annotations: `DartImpl<T>` → `T`, `StaticMember<T>` → `T`, `StaticMethod<T>` → `T`, `SupportAsync<T>` → generates both sync and async variants, `DependentsOnLayout<T>` → `T`
📚 Learning: 2025-12-08T23:28:00.818Z
Learnt from: CR
Repo: openwebf/webf PR: 0
File: webf/CLAUDE.md:0-0
Timestamp: 2025-12-08T23:28:00.818Z
Learning: No build needed for Dart-only changes in webf/

Applied to files:

  • webf/example/lib/main.dart
📚 Learning: 2025-12-08T23:28:00.818Z
Learnt from: CR
Repo: openwebf/webf PR: 0
File: webf/CLAUDE.md:0-0
Timestamp: 2025-12-08T23:28:00.818Z
Learning: Applies to webf/**/*.dart : Prefer final fields when applicable in Dart code

Applied to files:

  • webf/example/lib/main.dart
📚 Learning: 2025-12-08T23:28:11.651Z
Learnt from: CR
Repo: openwebf/webf PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-12-08T23:28:11.651Z
Learning: Applies to webf/**/*.dart : Dart code in webf module must follow naming conventions: snake_case for file names, PascalCase for classes, and camelCase for class members

Applied to files:

  • webf/example/lib/main.dart
📚 Learning: 2025-12-08T23:28:00.818Z
Learnt from: CR
Repo: openwebf/webf PR: 0
File: webf/CLAUDE.md:0-0
Timestamp: 2025-12-08T23:28:00.818Z
Learning: Applies to webf/lib/bridge.dart : lib/bridge.dart contains FFI bindings to C++ bridge

Applied to files:

  • webf/example/lib/main.dart
📚 Learning: 2025-12-08T23:28:00.818Z
Learnt from: CR
Repo: openwebf/webf PR: 0
File: webf/CLAUDE.md:0-0
Timestamp: 2025-12-08T23:28:00.818Z
Learning: Applies to webf/**/*.dart : Implement WidgetElement to create custom Flutter widgets integrated into WebF's DOM tree

Applied to files:

  • webf/example/lib/main.dart
📚 Learning: 2025-12-08T23:27:15.946Z
Learnt from: CR
Repo: openwebf/webf PR: 0
File: bridge/CLAUDE.md:0-0
Timestamp: 2025-12-08T23:27:15.946Z
Learning: Applies to bridge/**/*.{cc,cpp,h,hpp} : Use `WEBF_EXPORT_C` macro for exporting C functions to Dart FFI

Applied to files:

  • webf/example/lib/main.dart
📚 Learning: 2025-12-08T23:28:00.818Z
Learnt from: CR
Repo: openwebf/webf PR: 0
File: webf/CLAUDE.md:0-0
Timestamp: 2025-12-08T23:28:00.818Z
Learning: Applies to webf/**/*.dart : Follow rules in webf/analysis_options.yaml for Dart code style

Applied to files:

  • webf/example/lib/main.dart
📚 Learning: 2025-12-08T23:28:00.818Z
Learnt from: CR
Repo: openwebf/webf PR: 0
File: webf/CLAUDE.md:0-0
Timestamp: 2025-12-08T23:28:00.818Z
Learning: Applies to webf/**/*.dart : Document memory ownership clearly in FFI async callbacks

Applied to files:

  • webf/example/lib/main.dart
📚 Learning: 2025-12-08T23:28:00.818Z
Learnt from: CR
Repo: openwebf/webf PR: 0
File: webf/CLAUDE.md:0-0
Timestamp: 2025-12-08T23:28:00.818Z
Learning: Applies to webf/**/*.dart : Track ownership of allocated pointers in FFI callbacks

Applied to files:

  • webf/example/lib/main.dart
📚 Learning: 2025-12-08T23:28:00.818Z
Learnt from: CR
Repo: openwebf/webf PR: 0
File: webf/CLAUDE.md:0-0
Timestamp: 2025-12-08T23:28:00.818Z
Learning: Applies to webf/**/*.dart : Use single quotes for strings in Dart code

Applied to files:

  • webf/example/lib/main.dart
📚 Learning: 2025-12-08T23:28:00.818Z
Learnt from: CR
Repo: openwebf/webf PR: 0
File: webf/CLAUDE.md:0-0
Timestamp: 2025-12-08T23:28:00.818Z
Learning: Applies to webf/test/**/*_test.dart : When testing with WebFController, wait for initialization with: await controller.controlledInitCompleter.future

Applied to files:

  • webf/example/lib/main.dart
⏰ 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). (4)
  • GitHub Check: build_windows_bridge (Debug)
  • GitHub Check: Analyze (javascript-typescript)
  • GitHub Check: Analyze (c-cpp)
  • GitHub Check: Analyze (rust)
🔇 Additional comments (2)
webf/example/lib/main.dart (2)

41-43: WebF.defineModule is idempotent and safe for multiple calls.

The module registration stores creators in a global map keyed by module name (_customizedCreatorMap[customModule.name]). Multiple calls with the same module simply overwrite the previous entry. Each ModuleManager instance (per WebFController) instantiates modules fresh from the final registered creators, so there's no risk of duplicate instances or memory leaks, even during hot restarts or tests.


24-26: No action needed—webf/example is a mobile-only example (iOS/Android) with no web target in CI or configuration. The unconditional imports of webf_share and webf_sqflite are appropriate for this platform scope, as the underlying packages (sqflite, share_plus) are not web-compatible and only needed for native platforms where they are fully supported.


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

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

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
webf/lib/src/rendering/flex.dart (1)

1753-1756: Remove unused local dy to avoid analyzer noise / CI failures.
dy is assigned but never used.

Proposed fix
-          double dy = 0;
-          if (child.parentData is RenderLayoutParentData) {
-            dy = (child.parentData as RenderLayoutParentData).offset.dy;
-          }
-
🤖 Fix all issues with AI agents
In @native_plugins/sqflite/lib/src/sqflite_module.dart:
- Around line 66-72: The dispose method currently calls asynchronous db.close()
on each database without awaiting, risking incomplete closes; change dispose
(the dispose method in sqflite_module.dart) to return Future<void>, collect all
futures from calling close() on each DB in _databases.values, and await
Future.wait on that list before clearing _databases; update any callers to await
dispose or, if async disposal cannot be supported, add a clear comment on the
intentional fire-and-forget behavior and keep the current signature.

In @native_plugins/sqflite/LICENSE:
- Around line 1-21: Replace the incorrect MIT text with the correct BSD-2-Clause
license text from the upstream sqflite plugin and update the package metadata to
match: replace the LICENSE file contents with the BSD-2-Clause license (keeping
the project copyright/notice as appropriate) and update the pubspec.yaml license
field (and any license-related metadata) to "BSD-2-Clause" so the plugin and its
packaging reflect the upstream license rather than MIT.

In @native_plugins/sqflite/README.md:
- Line 24: Update the README entry for the plugin to match the actual package
version in pubspec.yaml: change the version string "webf_sqflite: ^1.0.0" to
"webf_sqflite: ^1.0.1" (or the exact version declared under version in
pubspec.yaml) so documentation and package metadata are consistent.

In @use_cases/package.json:
- Line 11: Update the dependency entry for the package key
"@openwebf/webf-sqflite" in package.json to use the local file reference
"file:../native_plugins/sqflite-npm" instead of the semver range "^1.0.1" so
installations without a package-lock.json resolve the local plugin correctly;
locate the dependency key "@openwebf/webf-sqflite" in package.json and replace
the version string accordingly.

In @use_cases/src/pages/WebFSQFlitePage.tsx:
- Around line 59-87: When handling the WebFSQFlite.openDatabase response, don't
assume databaseId exists when result.success === 'true'; update the branch that
currently uses result.databaseId! to first verify result.databaseId is a
non-empty value, call setDatabaseId(result.databaseId) only when present, and
only invoke loadUsers(result.databaseId) and loadTasks(result.databaseId) when
that id is present; otherwise log an error via addLog that the database opened
but no databaseId was returned and avoid using the non-null assertion to prevent
a crash (references: WebFSQFlite.openDatabase, result.databaseId, setDatabaseId,
addLog, loadUsers, loadTasks).
- Around line 36-43: The cleanup in the useEffect captures the initial stale
databaseId (null) because deps are [], so the DB may not close; create a ref
(e.g., databaseIdRef) to hold the latest databaseId, update
databaseIdRef.current whenever setDatabaseId is called (inside
initializeDatabase or wherever you assign the id), and use databaseIdRef.current
inside the cleanup to call WebFSQFlite.closeDatabase(databaseIdRef.current).
Also ensure initializeDatabase still calls setDatabaseId as before so the ref
stays in sync.
🧹 Nitpick comments (3)
cli/package.json (1)

3-3: Version bump looks fine; ensure release artifacts align (tags/changelog/publish pipeline).

cli/src/commands.ts (1)

1118-1125: Consider using the logger utility for consistency.

While the README copy logic is sound, the coding guidelines specify using the logger utility (debug, info, warn, error from './logger') instead of console methods. However, since these appear to be user-facing CLI messages rather than debug logs, console.log may be intentional here.

For consistency across the codebase, consider whether these messages should use the logger utility.

As per coding guidelines: "Use the logger utility (debug, info, warn, error from './logger') for debugging instead of console methods"

native_plugins/sqflite/lib/src/sqflite.module.d.ts (1)

30-41: Prefer 'true' | 'false' over string for success (and exists) to make callsites type-safe.
Right now TS won’t catch success === true mistakes and can’t narrow on success.

Example adjustment
-interface OpenDatabaseResult {
-  /** "true" on success, "false" on failure. */
-  success: string;
+type WebFSQFliteBool = 'true' | 'false';
+
+interface OpenDatabaseResult {
+  /** "true" on success, "false" on failure. */
+  success: WebFSQFliteBool;
   /** Unique database handle ID for subsequent operations. */
   databaseId?: string;
   /** Database file path. */
   path?: string;
   /** Current database version. */
   version?: number;
   /** Error message if operation failed. */
   error?: string;
 }

Also applies to: 84-93, 112-119, 142-149, 168-175, 192-201, 254-261, 276-283, 288-317

📜 Review details

Configuration used: defaults

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between bca8353 and 8902a49.

⛔ Files ignored due to path filters (3)
  • cli/package-lock.json is excluded by !**/package-lock.json
  • use_cases/package-lock.json is excluded by !**/package-lock.json
  • use_cases/pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
📒 Files selected for processing (20)
  • cli/package.json
  • cli/src/commands.ts
  • native_plugins/sqflite/CHANGELOG.md
  • native_plugins/sqflite/LICENSE
  • native_plugins/sqflite/README.md
  • native_plugins/sqflite/lib/src/sq_flite_module_bindings_generated.dart
  • native_plugins/sqflite/lib/src/sqflite.module.d.ts
  • native_plugins/sqflite/lib/src/sqflite_module.dart
  • native_plugins/sqflite/lib/webf_sqflite.dart
  • native_plugins/sqflite/pubspec.yaml
  • native_plugins/sqflite/tsconfig.json
  • use_cases/package.json
  • use_cases/src/App.tsx
  • use_cases/src/pages/FeatureCatalogPage.tsx
  • use_cases/src/pages/WebFSQFlitePage.tsx
  • webf/example/macos/Flutter/GeneratedPluginRegistrant.swift
  • webf/example/macos/Runner.xcodeproj/project.pbxproj
  • webf/example/pubspec.yaml
  • webf/lib/src/rendering/flex.dart
  • webf/test/src/rendering/flex_baseline_detached_layout_test.dart
🧰 Additional context used
📓 Path-based instructions (6)
webf/**/*.dart

📄 CodeRabbit inference engine (webf/CLAUDE.md)

webf/**/*.dart: Follow rules in webf/analysis_options.yaml for Dart code style
Use single quotes for strings in Dart code
File names must use snake_case in Dart
Class names must use PascalCase in Dart
Variables and functions must use camelCase in Dart
Prefer final fields when applicable in Dart code
Lines should be max 120 characters in Dart code
Always free allocated memory in Dart FFI using malloc.free() for toNativeUtf8() allocations
Free FFI allocated memory in finally blocks to ensure cleanup on exceptions
Track ownership of allocated pointers in FFI callbacks
Free NativeValue pointers after converting with fromNativeValue in FFI code
Document memory ownership clearly in FFI async callbacks
Implement WidgetElement to create custom Flutter widgets integrated into WebF's DOM tree
Register custom WidgetElements using WidgetElementRegistry.register(tagName, builder)
Override buildWidget(BuildContext context) method in WidgetElement to build the Flutter widget
Call updateWidget() when attributes change in WidgetElement implementations
Dispose controllers and subscriptions in WidgetElement for memory management
Follow W3C event standards when dispatching events from WidgetElement
Minimize widget rebuilds in WidgetElement for performance optimization
Implement ARIA attributes in WidgetElement when applicable for accessibility

Dart code in webf module must follow naming conventions: snake_case for file names, PascalCase for classes, and camelCase for class members

webf/**/*.dart: Always free allocated memory in Dart FFI
Use malloc.free() for toNativeUtf8() allocations in Dart FFI
Track pointer ownership in callbacks within Dart FFI

Files:

  • webf/test/src/rendering/flex_baseline_detached_layout_test.dart
  • webf/lib/src/rendering/flex.dart
webf/test/**/*_test.dart

📄 CodeRabbit inference engine (webf/CLAUDE.md)

webf/test/**/*_test.dart: Use WebFWidgetTestUtils.prepareWidgetTest() to test HTML/CSS rendering in widget unit tests
Access render objects in tests to verify layout calculations
Call setupTest() in setUpAll() method for one-time setup in unit tests
When testing with WebFController, wait for initialization with: await controller.controlledInitCompleter.future
Use mock bundles from test/src/foundation/mock_bundle.dart for testing in unit tests

Files:

  • webf/test/src/rendering/flex_baseline_detached_layout_test.dart
webf/test/**/*.dart

📄 CodeRabbit inference engine (AGENTS.md)

Dart/Flutter widget and unit tests must be placed in webf/test/ and use WebFWidgetTestUtils and pumpAndSettle() where needed

Files:

  • webf/test/src/rendering/flex_baseline_detached_layout_test.dart
{bridge/**/*.{cc,h},webf/**/*.dart}

📄 CodeRabbit inference engine (CLAUDE.md)

Document memory ownership clearly in FFI implementations

Files:

  • webf/test/src/rendering/flex_baseline_detached_layout_test.dart
  • webf/lib/src/rendering/flex.dart
cli/**/*.ts

📄 CodeRabbit inference engine (cli/CLAUDE.md)

cli/**/*.ts: Use async/await for asynchronous operations in TypeScript implementation files
Implement proper error handling with try-catch and add descriptive error messages
Use the logger utility (debug, info, warn, error from './logger') for debugging instead of console methods
Boolean attributes in TypeScript interfaces must always generate non-nullable bool types in Dart (use generateAttributeSetter for type conversion)
Handle HTML attribute type conversion automatically: booleans use 'value == true || value == empty', integers use int.tryParse with default 0, doubles use double.tryParse with default 0.0, strings use direct assignment
Preserve directory structure from source in generated output files, maintaining original file paths
Clear caches before generation when file changes need to be detected
Process files in batches using processFilesInBatch for optimal parallelism
Check for literal types containing null when handling null type handling in AST analysis
Apply metadata synchronization from pubspec.yaml (version and description) when creating typing projects
Automatically run npm run build after code generation if a build script is present in package.json
Support automatic npm publishing via --publish-to-npm flag and interactive prompts, including custom registry configuration
Validate npm login status before attempting to publish, and manage temporary registry configuration for custom registries
Auto-detect and create missing project files (package.json, global.d.ts, tsconfig.json) when running codegen without an existing project
Detect framework from existing package.json dependencies when not explicitly provided

TypeScript code in cli module must use strict TypeScript configuration

Files:

  • cli/src/commands.ts
webf/lib/src/rendering/**/*.dart

📄 CodeRabbit inference engine (webf/CLAUDE.md)

Use RenderBoxModel as base class for layout in Dart rendering code

Files:

  • webf/lib/src/rendering/flex.dart
🧠 Learnings (41)
📓 Common learnings
Learnt from: CR
Repo: openwebf/webf PR: 0
File: webf/CLAUDE.md:0-0
Timestamp: 2025-12-08T23:28:00.818Z
Learning: No build needed for Dart-only changes in webf/
Learnt from: CR
Repo: openwebf/webf PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-12-13T16:32:47.644Z
Learning: Applies to docs/**/*.md : Clarify that WebF builds Flutter apps, not web apps in documentation
Learnt from: CR
Repo: openwebf/webf PR: 0
File: webf/CLAUDE.md:0-0
Timestamp: 2025-12-08T23:28:00.818Z
Learning: Applies to webf/**/*.dart : Use single quotes for strings in Dart code
Learnt from: CR
Repo: openwebf/webf PR: 0
File: webf/CLAUDE.md:0-0
Timestamp: 2025-12-08T23:28:00.818Z
Learning: Applies to webf/**/*.dart : Implement WidgetElement to create custom Flutter widgets integrated into WebF's DOM tree
📚 Learning: 2025-12-08T23:28:00.818Z
Learnt from: CR
Repo: openwebf/webf PR: 0
File: webf/CLAUDE.md:0-0
Timestamp: 2025-12-08T23:28:00.818Z
Learning: No build needed for Dart-only changes in webf/

Applied to files:

  • use_cases/package.json
  • native_plugins/sqflite/lib/webf_sqflite.dart
  • native_plugins/sqflite/pubspec.yaml
  • webf/test/src/rendering/flex_baseline_detached_layout_test.dart
  • webf/example/pubspec.yaml
📚 Learning: 2025-12-13T16:32:47.644Z
Learnt from: CR
Repo: openwebf/webf PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-12-13T16:32:47.644Z
Learning: Applies to webf/**/*.dart : Use `malloc.free()` for `toNativeUtf8()` allocations in Dart FFI

Applied to files:

  • native_plugins/sqflite/lib/webf_sqflite.dart
  • native_plugins/sqflite/lib/src/sq_flite_module_bindings_generated.dart
📚 Learning: 2025-12-08T23:28:00.818Z
Learnt from: CR
Repo: openwebf/webf PR: 0
File: webf/CLAUDE.md:0-0
Timestamp: 2025-12-08T23:28:00.818Z
Learning: Applies to webf/lib/bridge.dart : lib/bridge.dart contains FFI bindings to C++ bridge

Applied to files:

  • native_plugins/sqflite/lib/webf_sqflite.dart
📚 Learning: 2025-12-08T23:27:15.946Z
Learnt from: CR
Repo: openwebf/webf PR: 0
File: bridge/CLAUDE.md:0-0
Timestamp: 2025-12-08T23:27:15.946Z
Learning: Applies to bridge/**/*.{cc,cpp,h,hpp} : Use `WEBF_EXPORT_C` macro for exporting C functions to Dart FFI

Applied to files:

  • native_plugins/sqflite/lib/webf_sqflite.dart
📚 Learning: 2025-12-08T23:28:11.651Z
Learnt from: CR
Repo: openwebf/webf PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-12-08T23:28:11.651Z
Learning: Applies to webf/**/*.dart : Dart code in webf module must follow naming conventions: snake_case for file names, PascalCase for classes, and camelCase for class members

Applied to files:

  • native_plugins/sqflite/lib/webf_sqflite.dart
  • native_plugins/sqflite/pubspec.yaml
📚 Learning: 2025-12-08T23:28:00.818Z
Learnt from: CR
Repo: openwebf/webf PR: 0
File: webf/CLAUDE.md:0-0
Timestamp: 2025-12-08T23:28:00.818Z
Learning: Applies to webf/**/*.dart : Prefer final fields when applicable in Dart code

Applied to files:

  • native_plugins/sqflite/lib/webf_sqflite.dart
  • native_plugins/sqflite/lib/src/sq_flite_module_bindings_generated.dart
📚 Learning: 2025-12-08T23:28:00.818Z
Learnt from: CR
Repo: openwebf/webf PR: 0
File: webf/CLAUDE.md:0-0
Timestamp: 2025-12-08T23:28:00.818Z
Learning: Applies to webf/**/*.dart : Use single quotes for strings in Dart code

Applied to files:

  • native_plugins/sqflite/lib/webf_sqflite.dart
📚 Learning: 2025-12-08T23:28:00.818Z
Learnt from: CR
Repo: openwebf/webf PR: 0
File: webf/CLAUDE.md:0-0
Timestamp: 2025-12-08T23:28:00.818Z
Learning: Applies to webf/**/*.dart : Document memory ownership clearly in FFI async callbacks

Applied to files:

  • native_plugins/sqflite/lib/webf_sqflite.dart
📚 Learning: 2025-12-08T23:28:00.818Z
Learnt from: CR
Repo: openwebf/webf PR: 0
File: webf/CLAUDE.md:0-0
Timestamp: 2025-12-08T23:28:00.818Z
Learning: Applies to webf/**/*.dart : Follow rules in webf/analysis_options.yaml for Dart code style

Applied to files:

  • native_plugins/sqflite/lib/webf_sqflite.dart
  • webf/example/pubspec.yaml
📚 Learning: 2025-12-08T23:28:00.818Z
Learnt from: CR
Repo: openwebf/webf PR: 0
File: webf/CLAUDE.md:0-0
Timestamp: 2025-12-08T23:28:00.818Z
Learning: Applies to webf/**/*.dart : Always free allocated memory in Dart FFI using malloc.free() for toNativeUtf8() allocations

Applied to files:

  • native_plugins/sqflite/lib/webf_sqflite.dart
📚 Learning: 2025-12-08T23:28:00.818Z
Learnt from: CR
Repo: openwebf/webf PR: 0
File: webf/CLAUDE.md:0-0
Timestamp: 2025-12-08T23:28:00.818Z
Learning: Run Flutter dart tests with: cd webf && flutter test

Applied to files:

  • native_plugins/sqflite/pubspec.yaml
  • webf/test/src/rendering/flex_baseline_detached_layout_test.dart
  • webf/example/pubspec.yaml
📚 Learning: 2025-12-08T23:28:00.818Z
Learnt from: CR
Repo: openwebf/webf PR: 0
File: webf/CLAUDE.md:0-0
Timestamp: 2025-12-08T23:28:00.818Z
Learning: Applies to webf/test/**/*_test.dart : Access render objects in tests to verify layout calculations

Applied to files:

  • webf/test/src/rendering/flex_baseline_detached_layout_test.dart
  • webf/lib/src/rendering/flex.dart
📚 Learning: 2025-12-08T23:28:00.818Z
Learnt from: CR
Repo: openwebf/webf PR: 0
File: webf/CLAUDE.md:0-0
Timestamp: 2025-12-08T23:28:00.818Z
Learning: Use widget unit tests to verify rendering changes with: cd webf && flutter test test/src/rendering/

Applied to files:

  • webf/test/src/rendering/flex_baseline_detached_layout_test.dart
📚 Learning: 2025-12-08T23:28:00.818Z
Learnt from: CR
Repo: openwebf/webf PR: 0
File: webf/CLAUDE.md:0-0
Timestamp: 2025-12-08T23:28:00.818Z
Learning: Applies to webf/test/**/*_test.dart : Use WebFWidgetTestUtils.prepareWidgetTest() to test HTML/CSS rendering in widget unit tests

Applied to files:

  • webf/test/src/rendering/flex_baseline_detached_layout_test.dart
📚 Learning: 2025-12-08T23:28:00.818Z
Learnt from: CR
Repo: openwebf/webf PR: 0
File: webf/CLAUDE.md:0-0
Timestamp: 2025-12-08T23:28:00.818Z
Learning: Applies to webf/lib/src/rendering/**/*.dart : Use RenderBoxModel as base class for layout in Dart rendering code

Applied to files:

  • webf/test/src/rendering/flex_baseline_detached_layout_test.dart
  • webf/lib/src/rendering/flex.dart
📚 Learning: 2025-12-08T23:28:11.651Z
Learnt from: CR
Repo: openwebf/webf PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-12-08T23:28:11.651Z
Learning: Applies to webf/test/**/*.dart : Dart/Flutter widget and unit tests must be placed in `webf/test/` and use `WebFWidgetTestUtils` and `pumpAndSettle()` where needed

Applied to files:

  • webf/test/src/rendering/flex_baseline_detached_layout_test.dart
  • webf/example/pubspec.yaml
📚 Learning: 2025-12-08T23:28:00.818Z
Learnt from: CR
Repo: openwebf/webf PR: 0
File: webf/CLAUDE.md:0-0
Timestamp: 2025-12-08T23:28:00.818Z
Learning: Run widget unit tests with: cd webf && flutter test test/src/rendering/

Applied to files:

  • webf/test/src/rendering/flex_baseline_detached_layout_test.dart
📚 Learning: 2025-12-08T23:28:00.818Z
Learnt from: CR
Repo: openwebf/webf PR: 0
File: webf/CLAUDE.md:0-0
Timestamp: 2025-12-08T23:28:00.818Z
Learning: Applies to webf/test/**/*_test.dart : Use mock bundles from test/src/foundation/mock_bundle.dart for testing in unit tests

Applied to files:

  • webf/test/src/rendering/flex_baseline_detached_layout_test.dart
📚 Learning: 2025-12-08T23:28:11.651Z
Learnt from: CR
Repo: openwebf/webf PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-12-08T23:28:11.651Z
Learning: Applies to webf/integration_test/**/*.dart : Dart/Flutter integration tests must be placed in `webf/integration_test/` directory

Applied to files:

  • webf/test/src/rendering/flex_baseline_detached_layout_test.dart
  • webf/example/pubspec.yaml
📚 Learning: 2025-12-08T23:28:00.818Z
Learnt from: CR
Repo: openwebf/webf PR: 0
File: webf/CLAUDE.md:0-0
Timestamp: 2025-12-08T23:28:00.818Z
Learning: Applies to webf/**/*.dart : Implement WidgetElement to create custom Flutter widgets integrated into WebF's DOM tree

Applied to files:

  • webf/test/src/rendering/flex_baseline_detached_layout_test.dart
📚 Learning: 2025-12-08T23:28:00.818Z
Learnt from: CR
Repo: openwebf/webf PR: 0
File: webf/CLAUDE.md:0-0
Timestamp: 2025-12-08T23:28:00.818Z
Learning: Applies to webf/test/**/*_test.dart : When testing with WebFController, wait for initialization with: await controller.controlledInitCompleter.future

Applied to files:

  • webf/test/src/rendering/flex_baseline_detached_layout_test.dart
📚 Learning: 2025-12-08T23:27:41.357Z
Learnt from: CR
Repo: openwebf/webf PR: 0
File: scripts/CLAUDE.md:0-0
Timestamp: 2025-12-08T23:27:41.357Z
Learning: The WebF type generation system is composed of interconnected tasks that generate TypeScript definitions from multiple sources in a coordinated pipeline

Applied to files:

  • native_plugins/sqflite/LICENSE
📚 Learning: 2025-12-13T16:32:47.644Z
Learnt from: CR
Repo: openwebf/webf PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-12-13T16:32:47.644Z
Learning: Applies to docs/**/*.md : Include WebFControllerManager setup in code examples within documentation

Applied to files:

  • native_plugins/sqflite/LICENSE
📚 Learning: 2025-12-08T23:27:15.946Z
Learnt from: CR
Repo: openwebf/webf PR: 0
File: bridge/CLAUDE.md:0-0
Timestamp: 2025-12-08T23:27:15.946Z
Learning: Applies to bridge/ios/webf_ios.podspec : Ensure all source files, particularly `member_installer.cc`, are included in the `source_files` pattern in `ios/webf_ios.podspec`

Applied to files:

  • webf/example/macos/Runner.xcodeproj/project.pbxproj
📚 Learning: 2025-11-26T10:24:13.090Z
Learnt from: CR
Repo: openwebf/webf PR: 0
File: cli/CLAUDE.md:0-0
Timestamp: 2025-11-26T10:24:13.090Z
Learning: Applies to cli/**/*.ts : Apply metadata synchronization from pubspec.yaml (version and description) when creating typing projects

Applied to files:

  • native_plugins/sqflite/tsconfig.json
  • cli/src/commands.ts
📚 Learning: 2025-12-08T23:28:11.651Z
Learnt from: CR
Repo: openwebf/webf PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-12-08T23:28:11.651Z
Learning: Applies to cli/**/*.ts : TypeScript code in cli module must use strict TypeScript configuration

Applied to files:

  • native_plugins/sqflite/tsconfig.json
📚 Learning: 2025-12-08T23:27:41.357Z
Learnt from: CR
Repo: openwebf/webf PR: 0
File: scripts/CLAUDE.md:0-0
Timestamp: 2025-12-08T23:27:41.357Z
Learning: Applies to scripts/bridge/polyfill/**/*.{ts,tsx} : DO NOT manually edit `bridge/typings/polyfill.d.ts` - it is generated from polyfill TypeScript source

Applied to files:

  • native_plugins/sqflite/tsconfig.json
📚 Learning: 2025-12-08T23:27:41.357Z
Learnt from: CR
Repo: openwebf/webf PR: 0
File: scripts/CLAUDE.md:0-0
Timestamp: 2025-12-08T23:27:41.357Z
Learning: Applies to scripts/bridge/polyfill/rollup.config.dts.js : Use `rollup.config.dts.js` in `bridge/polyfill/` directory as the configuration for Rollup-based type generation

Applied to files:

  • native_plugins/sqflite/tsconfig.json
📚 Learning: 2025-12-08T23:27:41.357Z
Learnt from: CR
Repo: openwebf/webf PR: 0
File: scripts/CLAUDE.md:0-0
Timestamp: 2025-12-08T23:27:41.357Z
Learning: Applies to scripts/bridge/polyfill/**/*.{ts,tsx,d.ts} : Use Rollup with `rollup-plugin-dts` to generate types from `bridge/polyfill/src` into `bridge/typings/polyfill.d.ts`

Applied to files:

  • native_plugins/sqflite/tsconfig.json
📚 Learning: 2025-11-26T10:24:13.090Z
Learnt from: CR
Repo: openwebf/webf PR: 0
File: cli/CLAUDE.md:0-0
Timestamp: 2025-11-26T10:24:13.090Z
Learning: Update documentation when adding new features, along with TypeScript interfaces, tests, and templates

Applied to files:

  • native_plugins/sqflite/tsconfig.json
  • native_plugins/sqflite/lib/src/sqflite.module.d.ts
📚 Learning: 2025-12-08T23:27:27.888Z
Learnt from: CR
Repo: openwebf/webf PR: 0
File: integration_tests/CLAUDE.md:0-0
Timestamp: 2025-12-08T23:27:27.888Z
Learning: Applies to integration_tests/specs/**/*.ts : Use TypeScript (.ts extension) for test files

Applied to files:

  • native_plugins/sqflite/tsconfig.json
📚 Learning: 2025-12-08T23:27:41.357Z
Learnt from: CR
Repo: openwebf/webf PR: 0
File: scripts/CLAUDE.md:0-0
Timestamp: 2025-12-08T23:27:41.357Z
Learning: Applies to scripts/bridge/core/**/*.d.ts : Scan all `.d.ts` files in `bridge/core/` directory and merge them into a single `bridge/typings/webf.d.ts` file using the `merge-bridge-typings` task

Applied to files:

  • native_plugins/sqflite/tsconfig.json
📚 Learning: 2025-11-26T10:24:13.090Z
Learnt from: CR
Repo: openwebf/webf PR: 0
File: cli/CLAUDE.md:0-0
Timestamp: 2025-11-26T10:24:13.090Z
Learning: Applies to cli/**/*.ts : Auto-detect and create missing project files (package.json, global.d.ts, tsconfig.json) when running codegen without an existing project

Applied to files:

  • native_plugins/sqflite/tsconfig.json
📚 Learning: 2025-11-26T10:24:13.090Z
Learnt from: CR
Repo: openwebf/webf PR: 0
File: cli/CLAUDE.md:0-0
Timestamp: 2025-11-26T10:24:13.090Z
Learning: Applies to cli/**/*.ts : Preserve directory structure from source in generated output files, maintaining original file paths

Applied to files:

  • cli/src/commands.ts
📚 Learning: 2025-12-08T23:28:11.651Z
Learnt from: CR
Repo: openwebf/webf PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-12-08T23:28:11.651Z
Learning: Generate bindings and types before commits by running `node scripts/generate_binding_code.js`

Applied to files:

  • cli/src/commands.ts
📚 Learning: 2025-12-08T23:28:00.818Z
Learnt from: CR
Repo: openwebf/webf PR: 0
File: webf/CLAUDE.md:0-0
Timestamp: 2025-12-08T23:28:00.818Z
Learning: Run a single Flutter test with: cd webf && flutter test test/path/to/test_file.dart

Applied to files:

  • webf/example/pubspec.yaml
📚 Learning: 2025-12-08T23:27:41.357Z
Learnt from: CR
Repo: openwebf/webf PR: 0
File: scripts/CLAUDE.md:0-0
Timestamp: 2025-12-08T23:27:41.357Z
Learning: Applies to scripts/bridge/core/**/*.d.ts : Transform WebF-specific type annotations: `DartImpl<T>` → `T`, `StaticMember<T>` → `T`, `StaticMethod<T>` → `T`, `SupportAsync<T>` → generates both sync and async variants, `DependentsOnLayout<T>` → `T`

Applied to files:

  • native_plugins/sqflite/lib/src/sqflite.module.d.ts
📚 Learning: 2025-12-08T23:27:41.357Z
Learnt from: CR
Repo: openwebf/webf PR: 0
File: scripts/CLAUDE.md:0-0
Timestamp: 2025-12-08T23:27:41.357Z
Learning: Applies to scripts/bridge/core/**/*.d.ts : DO NOT manually edit `bridge/typings/webf.d.ts` - it is generated from bridge/core/*.d.ts

Applied to files:

  • native_plugins/sqflite/lib/src/sqflite.module.d.ts
📚 Learning: 2025-12-08T23:27:41.357Z
Learnt from: CR
Repo: openwebf/webf PR: 0
File: scripts/CLAUDE.md:0-0
Timestamp: 2025-12-08T23:27:41.357Z
Learning: Applies to scripts/bridge/typings/index.d.ts : Configure `bridge/typings/index.d.ts` to reference both `webf.d.ts` and `polyfill.d.ts` and re-export polyfill module exports for a unified interface

Applied to files:

  • native_plugins/sqflite/lib/src/sqflite.module.d.ts
📚 Learning: 2025-12-08T23:28:00.818Z
Learnt from: CR
Repo: openwebf/webf PR: 0
File: webf/CLAUDE.md:0-0
Timestamp: 2025-12-08T23:28:00.818Z
Learning: Applies to webf/lib/src/css/**/*.dart : Use CSSRenderStyle for style computation and storage in Dart CSS code

Applied to files:

  • webf/lib/src/rendering/flex.dart
🧬 Code graph analysis (1)
use_cases/src/App.tsx (1)
use_cases/src/pages/WebFSQFlitePage.tsx (1)
  • WebFSQFlitePage (19-626)
⏰ 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). (5)
  • GitHub Check: Build iOS Example
  • GitHub Check: build_windows_bridge (Debug)
  • GitHub Check: Analyze (javascript-typescript)
  • GitHub Check: Analyze (c-cpp)
  • GitHub Check: Analyze (rust)
🔇 Additional comments (16)
webf/example/pubspec.yaml (1)

33-36: Path dependencies verified. Both webf_share and webf_sqflite plugins exist at the specified paths with matching package names in their pubspec.yaml files. Configuration is correct.

webf/example/macos/Flutter/GeneratedPluginRegistrant.swift (1)

15-15: macOS plugin registrant wiring is correct and consistent with dependencies. The sqflite_darwin import (line 15) and SqflitePlugin registration (line 27) are present, properly wired, and match the webf_sqflite dependency declared in the example's pubspec.yaml. The file is correctly marked as auto-generated and contains no duplicates or syntax errors.

native_plugins/sqflite/tsconfig.json (1)

1-25: LGTM! TypeScript configuration follows best practices.

The tsconfig.json is well-configured with strict mode enabled, appropriate compiler options for ES2020/CommonJS, and proper include/exclude patterns for a TypeScript declarations project.

native_plugins/sqflite/pubspec.yaml (1)

1-30: LGTM! Package manifest is well-configured.

The pubspec.yaml follows Flutter package conventions with appropriate metadata, version constraints, and dependencies. SDK constraint of ^3.6.0 aligns with modern Dart/Flutter requirements.

webf/example/macos/Runner.xcodeproj/project.pbxproj (1)

272-272: LGTM! Standard CocoaPods framework integration.

The addition of sqflite_darwin.framework to the inputPaths and outputPaths is the expected CocoaPods-generated configuration for embedding the native SQLite plugin on macOS.

Also applies to: 289-289

native_plugins/sqflite/lib/src/sqflite_module.dart (1)

1-105: Well-structured module with consistent error handling.

The implementation follows good patterns:

  • Consistent try-catch with result objects
  • Clear separation of database management, CRUD, raw SQL, batch, and transaction operations
  • Proper null checking and validation
  • Single quotes used consistently per coding guidelines
native_plugins/sqflite/lib/src/sq_flite_module_bindings_generated.dart (1)

1-774: Auto-generated bindings look correct.

The generated DTOs and bindings follow consistent patterns with proper type guards and null handling in fromMap() factories. The invoke() routing correctly maps method calls to typed implementations.

native_plugins/sqflite/lib/webf_sqflite.dart (1)

1-89: Comprehensive library documentation with practical examples.

The entry point provides clear setup instructions for both Flutter (Dart) and JavaScript consumers, with working code examples. The library declaration and export are correct.

use_cases/src/App.tsx (1)

20-20: Route integration follows existing patterns.

The import and route registration for WebFSQFlitePage are consistent with other native plugin pages like WebFSharePage.

Also applies to: 219-219

use_cases/src/pages/FeatureCatalogPage.tsx (1)

118-118: Catalog entry correctly added to Native Plugins section.

The entry follows the existing pattern and provides a clear description of the feature.

native_plugins/sqflite/CHANGELOG.md (1)

1-11: Comprehensive changelog for initial release.

The changelog accurately documents all features implemented in the SQFlite module.

webf/test/src/rendering/flex_baseline_detached_layout_test.dart (2)

34-66: Test correctly verifies baseline calculation with detached children.

The test properly follows WebF testing patterns:

  • Uses WebFWidgetTestUtils.prepareWidgetTest() as per guidelines
  • Calls setupTest() in setUpAll()
  • Tests the specific edge case of parentData being null
  • Uses returnsNormally matcher to verify no crash

The test effectively validates the fix for flex baseline crashes on detached children.


14-17: Test setup follows WebF conventions.

The setUpAll calls setupTest() as required by the coding guidelines.

webf/lib/src/rendering/flex.dart (1)

1584-1614: Good hardening of baseline computation for detached render trees + safer parentData handling.
The new helper avoids RenderBox.getDistanceToBaseline assertions when child.attached == false, and the ParentData offset extraction no longer assumes RenderLayoutParentData.

Also applies to: 1654-1673, 1724-1727, 1781-1803

native_plugins/sqflite/lib/src/sqflite.module.d.ts (1)

12-477: No changes needed.

This file is a code generator specification for webf module-codegen, not a TypeScript module for consumer use. The .module.d.ts files define interfaces that the CLI reads and parses to generate the actual npm package (with exports in src/index.ts and src/types.ts) and Dart bindings. The interfaces in this file require no explicit export or declare module statements—they exist solely as input for the codegen pipeline.

use_cases/src/pages/WebFSQFlitePage.tsx (1)

297-308: No issue found. The batch operation encoding is correct.

The native batch() implementation (line 657 in sqflite_module.dart) JSON-decodes the entire operations string once, then expects each operation's values field to be a Map<String, dynamic> (object)—not a string. The code correctly embeds the user object directly in the operations array before JSON stringifying the entire array. After jsonDecode on the native side, values becomes the expected Map type. This matches the README documentation (lines 162-169) and the native implementation.

@andycall andycall merged commit bbb53c3 into main Jan 10, 2026
13 of 14 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