Post-v1.14 polish: updater relaunch, sessions polling, widget toggle#69
Merged
Conversation
Updater bug: After a successful atomic swap to ~/Applications/StackNudge.app, the updater calls `launchctl kickstart -k gui/<uid>/com.stackonehq.stack-nudge` to restart. When no panel launchd agent is registered (users who never ran the Bootstrap install, or dev builds running outside ~/Applications), kickstart silently fails and scheduleAutoQuit then kills the panel with nothing to bring it back. User is stuck on the old binary in memory. Now: after kickstart, NSWorkspace.openApplication launches the new bundle explicitly with createsNewApplicationInstance=true so it starts even when an old-path process is still alive. Post-update render order: handlePostUpdateStatus set nav.mode = .postUpdate BEFORE nav.compactExpanded = true. The mode flip triggered a SwiftUI re-render that rendered PostUpdateView (or even the still-active Events page mid- transition) into the pill-sized 320×56 window — looked crushed. Resize the window first; then change the mode so SwiftUI sees both together in a full-panel-sized frame. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
The pill (CompactView) reads sessions.sessions for the busy-session headline and mascot state, but SessionStore.startPolling() was only called from Sessions.swift's .onAppear — so the pill displayed stale data until the user visited the Sessions tab once. Worse, Sessions .onDisappear called stopPolling, freezing the pill again on exit. Now: start polling in PanelController.applicationDidFinishLaunching and drop the Sessions .onDisappear stop. The Sessions .onAppear still calls startPolling as an idempotent safety. 3s interval, ps + filesystem scan only — cheap enough to run for the app's lifetime. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Pivot to UI-first documentation: every voice/sound/banner setting now has a Settings row, so README's "edit ~/.stack-nudge/config" blocks were stale. Replaced each with a "Settings → ..." breadcrumb, dropped config-key references, and added one line under Settings noting that the config file is the underlying persistence (not for direct editing). Also expanded the Settings-tab row inventory to include the Widget section (corner, mascot, pill opacity) and the new Usage "Show remaining" toggle. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Brings back the off-switch that was removed in PR #65. Users who don't want the pill can disable it and get classic show/hide-the-panel behavior; hotkey toggles the full panel like before, and the M shortcut + "Compact" footer hints no-op / disappear when widget is off. Persists as STACKNUDGE_COMPACT_MODE (default true). Widget corner, mascot, and pill opacity rows grey out while widget is off so the implication is obvious. Toggling off also clears compactExpanded so the window restores to its saved full-panel size cleanly. Release-As: 1.14.1 Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
- Settings → Widget → "Pill opacity" renamed to "Widget opacity" so the Widget section uses consistent terminology (Widget / Widget corner / Mascot / Widget opacity). - Toggling the Widget switch On from Settings used to immediately collapse the open panel into the 320×56 pill — but the CompactView rendered inside the still-large frame for a frame, looking like a giant pill. Set compactExpanded=true when toggling on so the user stays in the full panel; the pill takes effect on the next Esc / focus-loss instead. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Pinned to v1.14.1 via a
Release-As: 1.14.1trailer on the widget-toggle commit, so release-please cuts a patch rather than a minor despite thefeat:prefix.Summary
launchctl kickstart(which silently fails when no panel launchd agent is registered or the running process lives outside~/Applications), explicitly callNSWorkspace.openApplicationon the swapped bundle withcreatesNewApplicationInstance=true. The 2-second auto-quit then cleanly kills the old process, leaving only the new bundle. Fixes the "I clicked Update but the version still says old" bug.compactExpanded = trueand forceapplyCompactLayout()synchronously before flippingnav.mode = .postUpdate. Stops PostUpdateView (or a transient Events render) from being drawn into the still-pill-sized 320×56 window for one frame.SessionStore.startPolling()is now called inapplicationDidFinishLaunchinginstead of gated on the Sessions tab'sonAppear. Pill shows the correct busy session immediately without requiring the user to visit the Sessions tab first. Sessions.onDisappear { stopPolling }removed so leaving the tab doesn't freeze the pill again.STACKNUDGE_COMPACT_MODE.~/.stack-nudge/config" blocks were stale. Replaced each with a "Settings → ..." breadcrumb, dropped exposed config keys, added one line under Settings noting the config file is the underlying persistence (not for direct editing). Expanded the Settings-tab row inventory to include the Widget section + Show remaining.Test plan
🤖 Generated with Claude Code