Skip to content

Bump version to 2.11.0 and fix Tauri window close handler race - #18

Merged
kiyarose merged 2 commits into
copilot/bug-fix-pinstick-close-promptfrom
codex/fix-modal-dialog-behavior-issues
Apr 6, 2026
Merged

Bump version to 2.11.0 and fix Tauri window close handler race#18
kiyarose merged 2 commits into
copilot/bug-fix-pinstick-close-promptfrom
codex/fix-modal-dialog-behavior-issues

Conversation

@kiyarose

Copy link
Copy Markdown
Member

Motivation

  • Bump the app's marketing/package version from 2.6.5 to 2.11.0 across native and cross-platform configs to reflect a new release.
  • Fix a race/unlisten re-entry issue in the Tauri window close flow so the app only prompts when needed and avoids re-intercepting its own close.

Description

  • Updated MARKETING_VERSION in the Xcode project (Jot.xcodeproj/project.pbxproj) for all build configurations from 2.6.5 to 2.11.0.
  • Updated the cross-platform version fields in cross-platform/package.json and cross-platform/src-tauri/tauri.conf.json from 2.6.5 to 2.11.0.
  • Reworked the close handler in cross-platform/src/main.js by renaming closeApproved to shouldBypassClosePrompt, short-circuiting when the handler has already approved closure, moving the hasData check earlier to avoid unnecessary prompts, ensuring event.preventDefault() is only called when prompting, preventing re-entry via isCloseDialogOpen, and setting shouldBypassClosePrompt before calling await TAURI.window.appWindow.close() with proper error handling.

Testing

  • No automated tests were executed as part of this change.

Codex Task

CopilotAI review requested due to automatic review settings April 6, 2026 13:07
@deepsource-io

deepsource-ioBot commented Apr 6, 2026

Copy link
Copy Markdown

DeepSource Code Review

We reviewed changes in 236725f...9a2c653 on this pull request. Below is the summary for the review, and you can see the individual issues we found as inline review comments.

See full review on DeepSource ↗

PR Report Card

Overall GradeSecurity

Reliability

Complexity

Hygiene

Code Review Summary

AnalyzerStatusUpdated (UTC)Details
RustApr 6, 2026 1:08p.m.Review ↗

CopilotAI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

This PR bumps the app version to 2.11.0 across the macOS Xcode project and key cross-platform (Tauri) config files, and adjusts the Tauri window close handler to avoid re-entry/race issues while only prompting when there is note data.

Changes:

  • Bump MARKETING_VERSION in Jot.xcodeproj/project.pbxproj from 2.6.5 to 2.11.0 across configurations.
  • Bump cross-platform version fields in cross-platform/package.json and cross-platform/src-tauri/tauri.conf.json to 2.11.0.
  • Rework the Tauri onCloseRequested flow in cross-platform/src/main.js to short-circuit when bypassing, avoid unnecessary prompts, and prevent re-entry while the dialog is open.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.

FileDescription
Jot.xcodeproj/project.pbxprojUpdates macOS app marketing version to 2.11.0.
cross-platform/src/main.jsRefines the close-request interception/prompting logic to avoid re-entry/races.
cross-platform/src-tauri/tauri.conf.jsonUpdates Tauri bundle/app version to 2.11.0.
cross-platform/package.jsonUpdates npm package version to 2.11.0.
Comments suppressed due to low confidence (1)

cross-platform/src/main.js:135

  • The explanatory comment above the close handler is now inaccurate: it still mentions closeApproved and says you "Always call event.preventDefault()", but the handler now uses shouldBypassClosePrompt and only calls preventDefault() when hasData is true. Please update the comment so it matches the current logic (and remove the outdated variable name).
 pinBtn.classList.toggle("pinned", pinned);
pinBtn.title = pinned ? "Unpin window" : "Pin window";
pinBtn.setAttribute("aria-label", pinned ? "Unpin window" : "Pin window");
setStatus(pinned ? "Pinned on top" : "Not pinned");

Comment threadcross-platform/package.json
@kiyarose
kiyarose merged commit 566475b into copilot/bug-fix-pinstick-close-promptApr 6, 2026
1 check passed
@kiyarose
kiyarose deleted the codex/fix-modal-dialog-behavior-issues branch April 6, 2026 13:10
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

@kiyarose