fix: vertical-text regression, toggle chevron clicks, thumbnail click reliability - #1
Conversation
… reliability - no-wrap: disable widthTracksTextView before setting containerSize (timing-dependent race clamped container to 10pt -> 1 char per line), plus self-healing guard in updateWidth() - toggles: start expanded, inserted title 'Toggle', chevron gutter moved to container view (NSScrollView drops custom-subview hit-testing) - screenshots: watch Cmd+Shift+3/4 save folder, content-hash dedup, sidebar off by default, path labels, click copies file path, 4px drag threshold (jitter clicks were swallowed as micro-drags), clickCount passed from event (currentEvent crashes on non-mouse events)
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using default effort and found 4 potential issues.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 62f102b. Configure here.
| if let prev = pendingSizes[name], prev == size, size > 0 { | ||
| knownFiles.insert(name) | ||
| pendingSizes.removeValue(forKey: name) | ||
| importFile(at: url) |
There was a problem hiding this comment.
Desktop import marked too early
Medium Severity
In checkWatchDir, each screenshot filename is added to knownFiles before importFile(at:) runs. If reading the file or copying into the app screenshots directory fails, that name stays marked as handled and the watcher never retries, so the image never appears in the sidebar.
Reviewed by Cursor Bugbot for commit 62f102b. Configure here.
| let fmt = DateFormatter() | ||
| fmt.dateFormat = "yyyy-MM-dd-HHmmss" | ||
| let stamp = fmt.string(from: Date()) | ||
| let stamp = Self.timestamp(for: Date()) |
There was a problem hiding this comment.
Hash stored before PNG saved
Medium Severity
checkPasteboard inserts the image content hash into knownHashes before data.write(to:) succeeds. A failed write leaves the hash recorded with no sidebar file, so later pasteboard copies of the same screenshot are treated as duplicates and ignored.
Reviewed by Cursor Bugbot for commit 62f102b. Configure here.
| n += 1 | ||
| } | ||
| try? FileManager.default.copyItem(at: url, to: dest) | ||
| onCapture?(dest) |
There was a problem hiding this comment.
Hash before copy completes
Medium Severity
importFile adds the content hash to knownHashes before copyItem(at:to:) finishes. If the copy fails, the hash remains and the desktop file was already marked in knownFiles, so that screenshot cannot be imported later.
Reviewed by Cursor Bugbot for commit 62f102b. Configure here.
| self?.check() | ||
| self?.checkPasteboard() | ||
| self?.checkWatchDir() | ||
| } |
There was a problem hiding this comment.
Dedup race at startup
Low Severity
ScreenshotWatcher.start() loads existing image hashes on a background queue while the one-second timer begins polling the pasteboard immediately. A clipboard capture in that window can pass dedup before those hashes are merged on the main thread, creating duplicate sidebar entries for the same image.
Reviewed by Cursor Bugbot for commit 62f102b. Configure here.


Fixes and UX polish on the toggle lists + screenshot sidebar feature:
Full root-cause trail in docs/FAILURE_LOG.md (2026-07-21).
Note
Medium Risk
Touches core NSTextView layout (no-wrap), toggle rendering/hit-testing, and screenshot import/dedup; regressions could break editing UX or miss captures, but changes are localized AppKit UI with documented mitigations.
Overview
Fixes a timing-dependent no-wrap regression where
widthTracksTextViewhad to be turned off before setting infinitecontainerSize; otherwise the text container collapsed to ~10pt and every line wrapped at one character. Adds a self-healing guard inupdateWidth()and documents the root cause indocs/FAILURE_LOG.md.Toggle lists now treat the selection as the body with the line above as title (or insert
Toggle), start expanded, enable Toggle List for any non-empty selection, and add aMarkerGutterViewchevron gutter in the container (not insideNSScrollView) so collapse clicks actually hit-test.Screenshot sidebar defaults hidden, reloads when the popover opens, watches pasteboard + macOS screenshot folder with stable-file import, FNV-1a dedup, path labels under thumbs, single-click copies file path (not image), double-click inserts markdown, 4px drag threshold so clicks aren’t swallowed, and click count from
mouseUpinstead ofNSApp.currentEvent.Reviewed by Cursor Bugbot for commit 62f102b. Bugbot is set up for automated code reviews on this repo. Configure here.