fix(history): a SQLite database is a path, not localhost//a/path - #276
Merged
Conversation
Last of the schema-history friendliness pass, found by reading the shipped v0.2.111 build rather than the diff: the header and the database picker both rendered `sqlite · localhost//tmp/app.db · main`. The location was built by joining host and database with a slash, and a file dialect has no host — so a value that means nothing for SQLite or DuckDB was glued onto a path that already starts with one. `databaseLocation` now decides per dialect and both labels read it, instead of each joining the parts itself. The rest of that pass is confirmed live in v0.2.111: no "reused" and no "Lokee" in user-facing text, no MQT filter on a schema that has none, no React Flow badge, and the type filters match what the database actually contains. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Contributor
Bugbot couldn't run - usage limit reachedBugbot is counted against Cursor usage for this user or team, and this run hit a usage or spend limit. A user or team admin can review and increase usage limits in the Cursor dashboard. (requestId: serverGenReqId_158ec2ec-dfb2-4c8f-a921-85831d938aaa) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closing out the schema-history friendliness pass, found by reading the shipped v0.2.111 build rather than the diff.
The bug
The History header and the database picker both rendered:
The location was built by joining host and database with a slash. A file dialect has no host — so
localhostwas glued onto a path that already begins with/, producing the double slash. Two call sites each did their own join, so both were wrong the same way.databaseLocationnow decides per dialect and both labels read it.After:
sqlite · /tmp/foxschema-e2e-schema-history-mszbgfmn/history.db · main, in the header and the picker, verified in the running app.Verified live in v0.2.111 while I was there
The rest of the friendliness pass is confirmed shipped and working:
Gates
tsc --noEmitclean ·vitest run1968 pass / 2 expected-fail · eslint 0 errors.🤖 Generated with Claude Code
Note
Low Risk
Display-only label logic in the history UI with no auth, data, or API changes; covered by unit tests.
Overview
Fixes schema history labels that showed
localhost//pathfor SQLite/DuckDB by centralizing how a captured database’s location is formatted.Adds
databaseLocationinhistoryCompare.ts: forsqliteandduckdbit uses only the file path (ignoring host); for server dialects it still joins host and database, omitting empty halves.lokeeDatabaseLabelandLokeeWeaveView’sdescribe()now call it so the history header and database picker stay consistent.Tests cover file vs server dialects, partial host/database fields, empty location fallback, and picker-style labels.
Reviewed by Cursor Bugbot for commit c561849. Bugbot is set up for automated code reviews on this repo. Configure here.