Skip to content

fix: [DATABASE] Link the query logs to their database by its id - #742

Open
florent37 wants to merge 8 commits into
mainfrom
fix/database-logs-by-id
Open

florent37 wants to merge 8 commits into
mainfrom
fix/database-logs-by-id

Conversation

@florent37

Copy link
Copy Markdown
Contributor

Description

The Logs screen of a database stayed empty while the same queries were visible in the timeline: the logs were stored under the name the app gave to floconLogs(name = ...) (cats), and the screen filtered with the name displayed in the sidebar (cats (Room 2)). The database id is now the only identifier used for the database protocol methods (get_databases, query, log_query); the name is only a label.

  • SDK: register(id, displayName, database) (Room and Room 3) takes a required id, and the plugin refuses a second database registered with the same id (IllegalArgumentException; registering the same database twice is fine). floconLogs(id = ...) replaces floconLogs(name = ...), logQuery(dbId, ...) replaces logQuery(dbName, ...). The no-op modules and the samples follow.
  • Protocol: log_query sends dbId (required) instead of dbName. Breaking, on purpose: the v2 SDK is not published yet. protocol/database.md updated.
  • Desktop: query logs are stored and filtered by dbId (Logs screen, page count, exports, MCP list_database_query_logs, timeline). The Room schema goes to version 90 (destructive migration already configured: the previous logs are dropped). A log without dbId is no longer supported.
  • Docs: docs2/database.md and docs2/migration.md. docs/database.md still documents the old floconRegisterDatabase API and is left as is.
  • Other SDKs: FloconSwift needs the same change, see openflocon/FloconSwift#23. The two must be released together.

Tested: :database:core:jvmTest, desktop :mcp:allTests, :data:remote:allTests, :data:local:allTests, :data:core:allTests, ktlint, debug and release builds of :sample:android. Checked with the desktop app and the Android sample: the logs of cats (Room 2) arrive with dbId and are returned by list_database_query_logs. The iOS sample was not built.

/gemini review

)

Co-authored-by: Florent Champigny <florent@bere.al>
@florent37
florent37 marked this pull request as ready for review October 30, 2026 22:45
@florent37
florent37 enabled auto-merge (squash) October 30, 2026 22:53
@florent37 florent37 self-assigned this Oct 30, 2026

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant