Skip to content

Address windows file writes#135

Merged
s0 merged 4 commits intomainfrom
address-windows-file-writes
Mar 9, 2026
Merged

Address windows file writes#135
s0 merged 4 commits intomainfrom
address-windows-file-writes

Conversation

@s0
Copy link
Copy Markdown
Member

@s0 s0 commented Mar 9, 2026

Attempt to add a bit more robust file writing, and debug issues occurring on windows

@s0 s0 enabled auto-merge (squash) March 9, 2026 19:27
@s0 s0 merged commit 9626ff7 into main Mar 9, 2026
4 checks passed
@s0 s0 deleted the address-windows-file-writes branch March 9, 2026 19:29
Copy link
Copy Markdown

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

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: 62d5fd17ce

ℹ️ 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 on lines 314 to 316
state.current.path === currentPath &&
state.current.data === currentData
state.current.saveChain === queuedSave
) {
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 dirty state until latest snapshot is persisted

In useDataFileCore's throttled saveData, this completion guard now checks saveChain instead of whether state.current.data still matches the snapshot being written. With throttle(..., { leading: true, trailing: true }), a second updateData inside the 500ms window marks the state dirty but does not run saveData immediately; if the first write finishes before the trailing call, this condition sets state back to saved, and the trailing invocation then returns early at the state === 'saved' check, dropping the newer update from disk.

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