Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
113fe34
add plan and bench baseline
samuelstroschein Aug 29, 2025
66a5336
update generate commit to current model
samuelstroschein Aug 29, 2025
587ea57
update state cache implementation from upstream
samuelstroschein Aug 29, 2025
271f506
update generate commit to align with current behavior
samuelstroschein Aug 29, 2025
a6e1fc3
use generate commit in commit
samuelstroschein Aug 29, 2025
b7b4e85
update for 10 change model
samuelstroschein Aug 29, 2025
0824f4e
all tests pass for 10 change model
samuelstroschein Aug 30, 2025
42cd917
att step 1 bench
samuelstroschein Aug 30, 2025
131e217
add commit.parent_commit_ids
samuelstroschein Aug 30, 2025
45b8066
extended vocab size
samuelstroschein Aug 30, 2025
7149953
mergeVersion() use commit.parent_commit)ids
samuelstroschein Aug 30, 2025
3f8de5b
derived edges on commit
samuelstroschein Aug 31, 2025
45ce650
add materialized foreign key mode
samuelstroschein Aug 31, 2025
3147e55
add step 2 bench
samuelstroschein Aug 31, 2025
6064f37
merge step 3 & 4 in plan
samuelstroschein Aug 31, 2025
ef556e7
fix: dont cache clear on internal tables
samuelstroschein Sep 1, 2025
b56316d
one commit model 12 tests failing
samuelstroschein Sep 1, 2025
1f811ac
merge version 1 failing test remaining
samuelstroschein Sep 2, 2025
334e472
merge version tests passing
samuelstroschein Sep 2, 2025
38e8365
ensure cache table xists
samuelstroschein Sep 2, 2025
4c04a09
3 failing tests remaining
samuelstroschein Sep 2, 2025
34c22ca
14 failing tests
samuelstroschein Sep 5, 2025
d54e5af
all tests pass
samuelstroschein Sep 5, 2025
1c9c56b
step 5 bench
samuelstroschein Sep 5, 2025
389ba97
remove drops
samuelstroschein Sep 5, 2025
9f4fe48
simplify graph traversal
samuelstroschein Sep 5, 2025
2b1061c
cleanup
samuelstroschein Sep 5, 2025
ab36ce2
clean up
samuelstroschein Sep 5, 2025
0c3e83c
clean up
samuelstroschein Sep 5, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions packages/csv-app/src/components/ChangeSet.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import {
createThread,
createCheckpoint,
Thread,
Version,
LixVersion,
} from "@lix-js/sdk";
import { useAtom } from "jotai";
import { useCallback, useEffect, useState } from "react";
Expand Down Expand Up @@ -252,7 +252,7 @@ const getChanges = async (
changeSetId: string,
fileId: string,
// @ts-expect-error - not used yet
currentVersion: Version,
currentVersion: LixVersion,
previousChangeSetId?: string | undefined | null
): Promise<
Record<
Expand Down
8 changes: 2 additions & 6 deletions packages/csv-app/src/layouts/OpenFileLayout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,7 @@ import { useCallback, useMemo, useState } from "react";
import { currentVersionAtom, existingVersionsAtom, lixAtom } from "../state.ts";
import { saveLixToOpfs } from "../helper/saveLixToOpfs.ts";
import clsx from "clsx";
import {
Version,
createVersion,
switchVersion,
} from "@lix-js/sdk";
import { LixVersion, createVersion, switchVersion } from "@lix-js/sdk";
import CustomLink from "../components/CustomLink.tsx";

export default function Layout(props: { children: React.ReactNode }) {
Expand Down Expand Up @@ -221,7 +217,7 @@ const VersionDropdown = () => {
const [lix] = useAtom(lixAtom);

const switchToversion = useCallback(
async (version: Version) => {
async (version: LixVersion) => {
await switchVersion({ lix, to: version });
await saveLixToOpfs({ lix });
},
Expand Down
10 changes: 2 additions & 8 deletions packages/csv-app/src/state.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,4 @@
import {
Account,
Lix,
Version,
openLix,
switchAccount,
} from "@lix-js/sdk";
import { Account, Lix, LixVersion, openLix, switchAccount } from "@lix-js/sdk";
import { atom } from "jotai";
import { plugin as csvPlugin } from "@lix-js/plugin-csv";
import { getOriginPrivateDirectory } from "native-file-system-adapter";
Expand Down Expand Up @@ -155,7 +149,7 @@ export const lixAtom = atom(async (get) => {
});

export const currentVersionAtom = atom<
Promise<Version & { targets: Version[] }>
Promise<LixVersion & { targets: LixVersion[] }>
>(async (get) => {
get(withPollingAtom);
const lix = await get(lixAtom);
Expand Down
8 changes: 4 additions & 4 deletions packages/lix-file-manager/src/components/MergeDialog.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import {
DialogTitle,
DialogFooter,
} from "@/components/ui/dialog.js";
import { Version } from "@lix-js/sdk";
import { LixVersion } from "@lix-js/sdk";
import {
Select,
SelectContent,
Expand All @@ -20,10 +20,10 @@ import { transition } from "@lix-js/sdk";
interface MergeDialogProps {
open: boolean;
onOpenChange: (open: boolean) => void;
versions: Version[];
activeVersion: Version;
versions: LixVersion[];
activeVersion: LixVersion;
lix: any;
initialSourceVersion: Version | null;
initialSourceVersion: LixVersion | null;
onMergeComplete: () => void;
}

Expand Down
12 changes: 7 additions & 5 deletions packages/lix-file-manager/src/components/VersionDropdown.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import {
isSyncingAtom,
lixAtom,
} from "../state.js";
import { Version, createVersion, switchVersion } from "@lix-js/sdk";
import { LixVersion, createVersion, switchVersion } from "@lix-js/sdk";
import { saveLixToOpfs } from "../helper/saveLixToOpfs.js";
import { Check, Trash2, ChevronDown, Plus } from "lucide-react";
import { MergeDialog } from "./MergeDialog.js";
Expand All @@ -32,16 +32,18 @@ export function VersionDropdown() {
const [existingVersions] = useAtom(existingVersionsAtom);
const [lix] = useAtom(lixAtom);
const [isSyncing] = useAtom(isSyncingAtom);
const [versionToDelete, setVersionToDelete] = useState<Version | null>(null);
const [versionToDelete, setVersionToDelete] = useState<LixVersion | null>(
null
);
const [dropdownOpen, setDropdownOpen] = useState(false);
const [deleteConfirmation, setDeleteConfirmation] = useState("");
const [isHovered, setIsHovered] = useState(false);
const [mergeDialogOpen, setMergeDialogOpen] = useState(false);
const [selectedSourceVersion, setSelectedSourceVersion] =
useState<Version | null>(null);
useState<LixVersion | null>(null);

const switchToVersion = useCallback(
async (version: Version) => {
async (version: LixVersion) => {
if (!lix) return;
await switchVersion({ lix, to: version });
await saveLixToOpfs({ lix });
Expand All @@ -60,7 +62,7 @@ export function VersionDropdown() {
await switchToVersion(newVersion);
}, [lix, activeVersion, switchToVersion]);

const handleDeleteVersion = async (version: Version) => {
const handleDeleteVersion = async (version: LixVersion) => {
if (!lix) return;

await lix.db.transaction().execute(async (trx) => {
Expand Down
32 changes: 14 additions & 18 deletions packages/lix-file-manager/src/state.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,4 @@
import {
openLix,
Account,
switchAccount,
Lix,
Version,
} from "@lix-js/sdk";
import { openLix, Account, switchAccount, Lix, LixVersion } from "@lix-js/sdk";
import { atom } from "jotai";
import { plugin as csvPlugin } from "@lix-js/plugin-csv";
import { plugin as txtPlugin } from "@lix-js/plugin-txt";
Expand Down Expand Up @@ -211,19 +205,21 @@ export const lixAtom = atom(async (get) => {
*/
export const withPollingAtom = atom(Date.now());

export const activeVersionAtom = atom<Promise<Version | null>>(async (get) => {
get(withPollingAtom);
const lix = await get(lixAtom);
if (!lix) return null;
export const activeVersionAtom = atom<Promise<LixVersion | null>>(
async (get) => {
get(withPollingAtom);
const lix = await get(lixAtom);
if (!lix) return null;

const activeVersion = await lix.db
.selectFrom("active_version")
.innerJoin("version", "active_version.version_id", "version.id")
.selectAll("version")
.executeTakeFirstOrThrow();
const activeVersion = await lix.db
.selectFrom("active_version")
.innerJoin("version", "active_version.version_id", "version.id")
.selectAll("version")
.executeTakeFirstOrThrow();

return activeVersion;
});
return activeVersion;
}
);

export const existingVersionsAtom = atom(async (get) => {
get(withPollingAtom);
Expand Down
Loading
Loading