Skip to content

revert console to text - #220

Merged
cmsj merged 3 commits into
mainfrom
revert-console-to-text
Sep 12, 2026
Merged

cmsj merged 3 commits into
mainfrom
revert-console-to-text

Conversation

@cmsj

@cmsj cmsj commented Sep 12, 2026

Copy link
Copy Markdown
Owner
  • Explicitly mark our XPC helper as not being a UI app
  • Revert Console window to using a Text field

@cmsj cmsj self-assigned this Sep 12, 2026
@greptile-apps

greptile-apps Bot commented Sep 12, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

This PR marks the AppleScript XPC helper as a non-UI process and consolidates console output into one attributed text container so users can select text across log entries.

  • Adds LSUIElement to the helper’s Debug and Release configurations.
  • Replaces per-entry console text views with a cached, colorized AttributedString.
  • Rebuilds and scrolls the console when its displayed entries change.

Confidence Score: 4/5

The PR appears safe to merge, with a non-blocking issue where already-rendered timestamps can remain stale after system formatting settings change.

The helper configuration is consistently applied, and the new console rendering preserves log updates and bottom scrolling; the only accepted issue is incomplete cache invalidation for runtime locale, time-zone, or calendar changes.

Files Needing Attention: Hammerspoon 2/Windows/ConsoleView.swift

Important Files Changed

Filename Overview
Hammerspoon 2/Windows/ConsoleView.swift Consolidates console rows into cached selectable text, but cache invalidation omits runtime locale, time-zone, and calendar changes.
Hammerspoon 2.xcodeproj/project.pbxproj Marks the headless XPC helper as an LSUIElement agent in both of its build configurations.
Prompt To Fix All With AI
### Issue 1
Hammerspoon 2/Windows/ConsoleView.swift:208-209
**Cached timestamps become stale**

When the system locale, time zone, or calendar changes while the console remains open, `formatEntry` uses the updated setting but `displayedEntries` does not change. The cached attributed string is therefore not rebuilt, so existing timestamps continue to use the old formatting until the log entries change. Observe the relevant setting changes or include these formatting inputs in the cache invalidation.

---

For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.

Reviews (1): Last reviewed commit: "Revert Console window to using a Text fi..." | Re-trigger Greptile

Comment thread Hammerspoon 2/Windows/ConsoleView.swift
@cmsj
cmsj merged commit bb7423a into main Sep 12, 2026
2 checks passed
@cmsj
cmsj deleted the revert-console-to-text branch September 12, 2026 16:48
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