kitlangton / kitlangton/Hex

Clearing Paste Last Transcript shortcut does not persist

Open Beginner friendly
#278 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Swift
Stars
2.9k
Forks
226
PR merge metrics
No merged PRs in 30d

Description

Hello!

Been using Hex for the paste couple of days and truly enjoy it, thanks for it!

However, I've noticed the following bug: when clearing the paste last transcript shortcut, it doesn't keep it as cleared and doesn't persist it. I have it bound to something else, and on each restart it would be restored and sometimes take over the other action.

Initially i had it set to something that is not possible to do so i never hit it, but decided to try and fix it. Creating this issue first and will open a PR with the fix in a few minutes.

If needed, here's the investigation session: https://pi.dev/session/#458caf612ec57bb98740109eb4193d72

Let me know if you need/want more details!

---

## Describe the bug

Clearing the **Paste Last Transcript** shortcut disables it only for the current Hex session. After quitting and reopening Hex, the default shortcut (`⌥⇧V`) returns.

## To reproduce

1. Open Hex Settings.
2. Under **History**, clear the **Paste Last Transcript** shortcut.
3. Confirm the setting shows **Not set**.
4. Quit Hex and launch it again.

## Expected behavior

The shortcut remains **Not set** after relaunch, so users can permanently disable it.

## Actual behavior

Hex restores the default `⌥⇧V` shortcut.

## Technical detail

The cleared setting is represented as `nil`. Its JSON encoder omits the key, while decoding treats a missing key as the legacy/default value. Encoding an explicit JSON `null` for a cleared shortcut, while retaining the default for genuinely missing legacy keys, preserves the disabled state.

Contributor guide

No contributing guide indexed for this repository

Research direction

Start in the Hex macOS Settings flow under History and trace how the Paste Last Transcript shortcut is encoded and decoded across relaunch; no file or test is named in the issue. Reproduce the quit-and-reopen steps, then verify that a cleared shortcut remains Not set while a missing legacy key still receives its default. Done means the disabled setting persists without restoring ⌥⇧V.

Written by the indexing model from the issue text.

Assessment

Tech stack
swift
Domain
desktop
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Quiet
Clarity
Clearly specified
Newbie friendliness
72/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.