Skip to content

Bump version to 2.12.0 and improve close-window prompt behavior - #19

Closed
kiyarose wants to merge 11 commits into
mainfrom
codex/fix-modal-dialog-behavior-issues-s3oldt
Closed

Bump version to 2.12.0 and improve close-window prompt behavior#19
kiyarose wants to merge 11 commits into
mainfrom
codex/fix-modal-dialog-behavior-issues-s3oldt

Conversation

@kiyarose

Copy link
Copy Markdown
Member

Motivation

  • Bump the app version from 2.6.5 to 2.12.0 across platform manifests and project configs for a new release.
  • Prevent unnecessary close confirmation when there is no saved note and avoid re-intercept/race conditions when programmatically closing the window.

Description

  • Updated MARKETING_VERSION in Jot.xcodeproj/project.pbxproj build configurations from 2.6.5 to 2.12.0.
  • Updated version in cross-platform/package.json and cross-platform/src-tauri/tauri.conf.json to 2.12.0.
  • Reworked the window close handler in cross-platform/src/main.js: renamed closeApproved to shouldBypassClosePrompt, moved the hasData check so the confirmation dialog is only shown when there is saved content, set the bypass flag before calling TAURI.window.appWindow.close(), and reset it on error to avoid re-intercept races.

Testing

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

Codex Task

CopilotAIand others added 11 commits April 6, 2026 09:27
Agent-Logs-Url: https://github.com/SillyLittleTech/PinStick/sessions/9548dbdf-fed4-4754-8944-7716e8ed98dd
Co-authored-by: kiyarose <75678535+kiyarose@users.noreply.github.com>
…ape; bump to 2.6.5
Agent-Logs-Url: https://github.com/SillyLittleTech/PinStick/sessions/19968bf9-a337-457c-b229-d21c45bbb52a
Co-authored-by: kiyarose <75678535+kiyarose@users.noreply.github.com>
@deepsource-io

deepsource-ioBot commented Apr 6, 2026

Copy link
Copy Markdown

DeepSource Code Review

We reviewed changes in 777cd26...1daeb2d 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 3:34p.m.Review ↗

@kiyarose
kiyarose changed the base branch from copilot/bug-fix-pinstick-close-prompt to mainApril 6, 2026 15:34
@kiyarose
kiyarose marked this pull request as ready for review April 6, 2026 15:34
CopilotAI review requested due to automatic review settings April 6, 2026 15:34

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 prepares a new PinStick release by bumping versions across macOS and the cross-platform (Tauri) preview, and updates the window-close flow to avoid prompting when no note is saved while preventing re-intercept/race conditions during programmatic close.

Changes:

  • Bump release/version metadata to 2.12.0 across macOS and Tauri config/package manifests.
  • Update macOS close prompt to offer “Keep Notes” vs “Delete Notes” and align edited state with persisted note presence.
  • Add a custom close-confirmation dialog (HTML/CSS/JS) and rework the Tauri onCloseRequested handler to avoid repeated interception.

Reviewed changes

Copilot reviewed 10 out of 12 changed files in this pull request and generated 6 comments.

Show a summary per file
FileDescription
PinStickApp.swiftUpdates close confirmation wording/choices and ties isDocumentEdited to persisted note state.
Jot.xcodeproj/project.pbxprojBumps MARKETING_VERSION to 2.12.0 across build configurations.
cross-platform/src/styles.cssAdds styles for the custom close dialog overlay (light/dark).
cross-platform/src/main.jsImplements close dialog behavior + close interception/bypass logic in Tauri.
cross-platform/src/index.htmlAdds the close dialog markup used by the new JS/CSS.
cross-platform/src-tauri/tauri.conf.jsonBumps Tauri package.version to 2.12.0.
cross-platform/src-tauri/Cargo.tomlUpdates Rust crate version (currently not aligned to 2.12.0).
cross-platform/src-tauri/Cargo.lockUpdates lockfile package version (currently not aligned to 2.12.0).
cross-platform/package.jsonBumps cross-platform package version to 2.12.0.
cross-platform/package-lock.jsonUpdates lockfile root version (currently not aligned to 2.12.0).
AGENTS.mdAdds repo-wide agent guidelines, including version bump policy.
.github/copilot-instructions.mdDocuments the version bump policy for contributors/automation.
Files not reviewed (1)
  • cross-platform/package-lock.json: Language not supported

Comment on lines +134 to +135
// closes; use closeApproved so our own appWindow.close() call is never
// re-intercepted, avoiding the unlisten race condition.

CopilotAIApr 6, 2026

Copy link

Choose a reason for hiding this comment

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

showCloseDialog uses the window-close bypass flag name shouldBypassClosePrompt, but the preceding comment still refers to closeApproved. This is misleading during future maintenance/debugging; update the comment to match the actual flag name/purpose.

Suggested change
// closes; use closeApproved so our own appWindow.close() call is never
// re-intercepted, avoiding the unlisten race condition.
// closes; use shouldBypassClosePrompt so our own appWindow.close() call is
// never re-intercepted, avoiding the unlisten race condition.

Copilot uses AI. Check for mistakes.
function onCancel() { cleanup(false); }

function onKeyDown(e) {
if (e.key === "Escape") { cleanup(true); return; } // Escape = keep data (safe default; window closes either way)

CopilotAIApr 6, 2026

Copy link

Choose a reason for hiding this comment

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

The Escape key handler currently resolves the dialog as “confirm/keep data” (cleanup(true)), which is opposite of common dialog/accessibility expectations where Escape dismisses/cancels. Consider making Escape cancel the close (or at least map it to the dialog’s cancel action) to avoid accidental acceptance when users hit Escape reflexively.

Suggested change
if(e.key==="Escape"){cleanup(true);return;}// Escape = keep data (safe default; window closes either way)
if(e.key==="Escape"){cleanup(false);return;}// Escape = cancel/dismiss

Copilot uses AI. Check for mistakes.
Comment on lines +23 to +26
<p id="dialog-msg">Heads up! Your data will be cached to this app. Is that okay?</p>
<div class="dialog-buttons">
<button id="dialog-yea" type="button">Yea</button>
<button id="dialog-nah" type="button">Nah</button>

CopilotAIApr 6, 2026

Copy link

Choose a reason for hiding this comment

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

The close prompt copy implies data will be cached and asks for consent, but the dialog is shown on close when data is already saved and the actual choice is “keep vs delete saved note”. The current message/buttons can mislead users into deleting their note. Update the text/buttons to accurately reflect the keep/delete decision.

Suggested change
<pid="dialog-msg">Heads up! Your data will be cached to this app. Is that okay?</p>
<divclass="dialog-buttons">
<buttonid="dialog-yea" type="button">Yea</button>
<buttonid="dialog-nah" type="button">Nah</button>
<pid="dialog-msg">Your note is already saved in PinStick. Do you want to keep it for next time, or delete it before closing?</p>
<divclass="dialog-buttons">
<buttonid="dialog-yea" type="button">Keep Note</button>
<buttonid="dialog-nah" type="button">Delete Note</button>

Copilot uses AI. Check for mistakes.
Comment on lines 1 to 10
{
"name": "pinstick-cross",
"version": "2.5.8",
"version": "2.6.5",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "pinstick-cross",
"version": "2.5.8",
"version": "2.6.5",
"devDependencies": {

CopilotAIApr 6, 2026

Copy link

Choose a reason for hiding this comment

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

package-lock.json still reports the app version as 2.6.5, which is inconsistent with cross-platform/package.json being bumped to 2.12.0. This can lead to confusing builds/releases; regenerate/update the lockfile so its root version matches package.json.

Copilot uses AI. Check for mistakes.
[package]
name = "pinstick"
version = "2.6.0"
version = "2.6.5"

CopilotAIApr 6, 2026

Copy link

Choose a reason for hiding this comment

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

The Rust crate version is set to 2.6.5 but the cross-platform app version in tauri.conf.json/package.json is 2.12.0. Keeping these out of sync makes builds/releases harder to reason about; bump Cargo.toml (and corresponding Cargo.lock entry) to the same version unless there’s a deliberate reason to diverge.

Suggested change
version = "2.6.5"
version = "2.12.0"

Copilot uses AI. Check for mistakes.
Comment on lines 414 to 418
LD_RUNPATH_SEARCH_PATHS = "@executable_path/Frameworks";
"LD_RUNPATH_SEARCH_PATHS[sdk=macosx*]" = "@executable_path/../Frameworks";
MACOSX_DEPLOYMENT_TARGET = 14.0;
MARKETING_VERSION = 2.5.8;
MARKETING_VERSION = 2.12.0;
PRODUCT_BUNDLE_IDENTIFIER = slf.PinStick;

CopilotAIApr 6, 2026

Copy link

Choose a reason for hiding this comment

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

PR description says the macOS MARKETING_VERSION is being bumped from 2.6.5, but the diff shows it was 2.5.8 in this file. Either the description is out of date or the version history is inconsistent; please reconcile so the release notes match what’s actually being changed.

Copilot uses AI. Check for mistakes.
@kiyarosekiyarose closed this Apr 6, 2026
@kiyarose
kiyarose deleted the codex/fix-modal-dialog-behavior-issues-s3oldt branch April 6, 2026 15:39
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.

3 participants

@kiyarose