Skip to content

Add missing features to Flutter plugin#8017

Draft
Copilot wants to merge 11 commits intomasterfrom
copilot/improve-flutter-plugin
Draft

Add missing features to Flutter plugin#8017
Copilot wants to merge 11 commits intomasterfrom
copilot/improve-flutter-plugin

Conversation

Copy link
Contributor

Copilot AI commented Mar 11, 2026

  • TypeScript connector: support multiple databases via process.databases map
  • TypeScript connector: process.close(databaseName) for targeted cleanup
  • Dart SDK: new collection methods (findOne, bulkInsert, bulkRemove, upsert, count, remove)
  • Dart SDK: new document methods (patch, incrementalPatch, incrementalRemove, primary, deleted, toJSON, get, set)
  • Dart SDK: event model fixes (documentData, startTime/endTime)
  • Dart SDK: RxDatabase.close() + closed property
  • Bug fixes: DocCache stale data, JS expression injection
  • Add tests for the Flutter TypeScript connector that run in CI (8 tests)
  • Add Flutter plugin improvements to 17.0.0.md release notes
  • Fix broken markdown link in 17.0.0.md (../flutter-database.md → ../articles/flutter-database.md)
  • Clean up accidentally committed docs/ build artifacts

💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Copilot AI and others added 2 commits March 11, 2026 01:48
…ve, upsert, count, patch, incrementalPatch, incrementalRemove, close, and fix DocCache

Co-authored-by: pubkey <8926560+pubkey@users.noreply.github.com>
…on set() method

Co-authored-by: pubkey <8926560+pubkey@users.noreply.github.com>
Copilot AI changed the title [WIP] Improve Flutter plugin by adding missing features Add missing features to Flutter plugin Mar 11, 2026
sendRxDBEvent(JSON.stringify(eventBulk));
});
(process as any).db = db;
(process as any).close = async () => {
Copy link
Owner

Choose a reason for hiding this comment

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

What happens if we want more then one database? @copilot

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Databases are now stored in a process.databases map keyed by name instead of a single process.db. Each init call adds to the map, and close(databaseName) targets just that entry. The Dart side uses process.databases[dbName].db[collectionName] for all JS expressions via _jsDbRef/_jsCollRef helpers. Fixed in c57f820.

Copilot AI and others added 2 commits March 11, 2026 10:49
…nstead of single process.db

Co-authored-by: pubkey <8926560+pubkey@users.noreply.github.com>
…rRxDatabaseConnector calls

Co-authored-by: pubkey <8926560+pubkey@users.noreply.github.com>
@pubkey
Copy link
Owner

pubkey commented Mar 11, 2026

@copilot

  • add tests that run in the CI
  • add to 17.0.0.md

Co-authored-by: pubkey <8926560+pubkey@users.noreply.github.com>
Copy link
Contributor Author

Copilot AI commented Mar 11, 2026

@copilot

  • add tests that run in the CI
  • add to 17.0.0.md
    ...

Added both in e3bf409:

  • Tests: New test/unit/flutter.test.ts with 8 tests covering setFlutterRxDatabaseConnector() setup, database init, event forwarding, multi-database support, and close lifecycle. Registered in test/unit.test.ts so they run in CI. All 1185 tests pass (including the 8 new ones).

  • Release notes: Added Flutter plugin entry under "Better/More Integrations" in docs-src/docs/releases/17.0.0.md.

@pubkey
Copy link
Owner

pubkey commented Mar 11, 2026

@copilot the CI for this fails, please inspect the logs and fix.

Copilot AI and others added 2 commits March 11, 2026 13:19
…tabase.md

Co-authored-by: pubkey <8926560+pubkey@users.noreply.github.com>
Co-authored-by: pubkey <8926560+pubkey@users.noreply.github.com>
Copy link
Contributor Author

Copilot AI commented Mar 11, 2026

@copilot the CI for this fails, please inspect the logs and fix.

The CI failure was caused by a broken markdown link in docs-src/docs/releases/17.0.0.md. The Flutter docs file is at docs-src/docs/articles/flutter-database.md, so the relative path needed to be ../articles/flutter-database.md instead of ../flutter-database.md. Fixed in 2d21bea.

@pubkey
Copy link
Owner

pubkey commented Mar 13, 2026

@copilot do not commit anythong to the "/docs" folder, this is generated.

@pubkey
Copy link
Owner

pubkey commented Mar 13, 2026

@copilot continue

…restore scripts/fix-types.mjs

Co-authored-by: pubkey <8926560+pubkey@users.noreply.github.com>
Copy link
Contributor Author

Copilot AI commented Mar 13, 2026

@copilot continue

Fixed the CI failure in fadee78: the eventSub variable was never declared before being used as a shorthand property on line 21. Also removed 143 remaining docs/ build artifacts from git tracking and restored scripts/fix-types.mjs to the master version. All 1188 tests pass.

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