Skip to content

bump lix#89

Open
alecmocatta wants to merge 6 commits into
v2from
am
Open

bump lix#89
alecmocatta wants to merge 6 commits into
v2from
am

Conversation

@alecmocatta

Copy link
Copy Markdown
Collaborator

No description provided.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 14dbe3c51f

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread electron/lix.mjs Outdated
Comment on lines +180 to +184
out = out.replace(
/\blix_working_changes\s+as\s+([A-Za-z_][A-Za-z0-9_]*)/g,
`${emptyWorkingChangesSubquery()} as $1`,
);
out = out.replace(/\blix_working_changes\b/g, emptyWorkingChangesSubquery());

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Preserve working-change rows instead of stubbing them

When the desktop app queries lix_working_changes (for example selectWorkingDiffCount and selectWorkingDiffFiles), this rewrite substitutes a WHERE false subquery, so every pending-change query returns zero rows after edits. In that context the checkpoint panel and diff badges never show uncheckpointed file changes, even though the underlying file state changed.

Useful? React with 👍 / 👎.

Comment thread electron/lix.mjs
Comment on lines +124 to +129
async createCheckpoint() {
const result = await nativeLix.execute(
"SELECT lix_active_branch_commit_id() AS id",
);
const id = String(result.rows[0]?.get("id") ?? crypto.randomUUID());
return { id, changeSetId: id };

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Create a real checkpoint record

Clicking “Create checkpoint” now only returns the current active branch commit id and does not create or label a checkpoint. The history/checkpoint queries look for commits labeled with lix_label.name = 'checkpoint', so checkpoints created through the Electron runtime will not appear in history and will not clear/report working changes as expected.

Useful? React with 👍 / 👎.

Comment thread src/lib/lix-client.ts
Comment on lines +211 to +215
return {
sequence: event.sequence,
stateCommitSequence: event.stateCommitSequence,
rows: event.rows.rows,
columns: event.rows.columns,

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Keep observe events compatible with editor consumers

This unwraps the IPC query result so desktop observe events now expose event.rows as an array plus top-level columns, but TipTapEditor still reads event.rows.rows[0] when applying external file updates. In the desktop runtime that makes firstRow null for every observed update, so edits made through another view/window are never reflected in an already-open editor.

Useful? React with 👍 / 👎.

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