Move Requirements, Build, Run From Source, Project Layout, and
Dependencies/mirroring out of README into docs/DEVELOPMENT.md. Update
version references to 0.9.0 and correct the storage description to JSON.
README retains user-facing sections and gains a Development link.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Tests touching SysProcAttr.HideWindow/CmdLine and windowsShellCommandLine
are guarded by //go:build windows; runner_test.go drops the winproc import.
Linux cross-compile and Windows test run both clean.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Warm-run average (runs 2-5 of 5) via env-gated phase timers in run.go:
after Fyne app + window + tray 193 ms (was 285 ms on Fyne 2.6.3)
after newMainView 249 ms
after SetContent 252 ms
after w.Show() [TOTAL] ~414 ms (was ~644 ms, -230 ms / -36%)
Instrumentation reverted before this commit; source is clean.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Previous commit used PowerShell process-launch timing instead of the
History tab metric. Actual warm-run figure from the in-app "Window shown
in …" event is ~400 ms, down from ~644 ms on Fyne 2.6.3 (~37% recovery).
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Measured warm-run startup (launch to window creation) via PowerShell Stopwatch
across 3 runs: ~1215 ms average. Added finding for 2026-06-23 noting the
measurement method and that Fyne 2.7.4 builds cleanly with no breaking changes.
For higher-precision measurement, the GOSENTRY_TIMING instrumentation pattern
from the previous finding can be reused.
Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
Calls desk.SetSystemTrayWindow(w) after SetSystemTrayMenu so a left-click
on the tray icon shows/focuses the window without opening the menu. The
explicit "Show" menu item is kept for right-click access.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
go.mod already pins fyne.io/fyne/v2 v2.7.4 (latest 2.7.x). Verified
go mod tidy is a no-op and rebuilt under MSYS2 UCRT64/CGO: build, vet,
and go test -race ./... all green with no code changes. 2.7 changelog
review found no breaking changes affecting GoSentry.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Tick P5.1 and P5.2 in the completion checklist and reword the P5.2 task line
to match what shipped in f533739: size-appropriate, transparent per-platform
icons (tray uses the small icon; Windows window/taskbar draws from the
multi-size gosentry.ico via the GLFW_ICON resource; Linux titlebar uses
IconSmall) rather than "window icon stays large".
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Give the window titlebar, taskbar, and tray a size-appropriate icon with a
transparent boundary on both Windows and Linux, instead of scaling one PNG to
every size.
Assets:
- Regenerate the PNGs and gosentry.ico with feathered color-to-alpha so the
rounded-tile boundary is transparent; a binary white-key had left an opaque
halo that read as a border on dark taskbars/trays.
- Rebuild gosentry.ico as multi-size (16 hand-tuned + 32/48/256 from big) and
add a single-frame 16x16 gosentry-icon-16x16.ico for the Windows tray.
- assets.go: add IconSmall() and IconSmallICO().
Wiring:
- Windows window/taskbar: embed gosentry.ico under the GLFW_ICON resource and
skip a.SetIcon so GLFW selects the right frame per size (hand-tuned 16 for the
titlebar, a larger frame for the taskbar).
- Windows tray: SetSystemTrayIcon(IconSmallICO()), a 16x16 ICO frame.
- Linux window titlebar: a.SetIcon(IconSmall()) for a crisp ~16px _NET_WM_ICON;
tray uses the big PNG since StatusNotifierItem renders larger.
Also bump Fyne 2.6.3 -> 2.7.4 (systray 1.11.0 -> 1.12.1) and document the full
cross-platform icon strategy in assets.go, gosentry.rc, run.go, and tray.go.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Add chooseFile helper (dialog.NewFileOpen) in settings_view.go and wrap
the Command entry in job_dialog.go with a Browse button so users can
pick an executable from a file picker instead of typing the path.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Add Service.ShouldNotifyOnFailure() (reads config under mu) and call
fyne.CurrentApp().SendNotification in the mainwindow subscriber when a
Manual/Schedule run completes with State == "Failed" and the setting is on.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Phase 3 complete: execution modes and overlap policies for job dispatch.
- Bumped version from 0.6.0 to 0.7.0 in src/app/version.go
- Added 0.7.0 entry to docs/CHANGELOG.md documenting parallel/sequential
execution modes and skip/queue overlap policies, and their interaction
with the Settings UI and manual runs.
Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
New src/app/run_test.go exercises the execution mode + overlap policy
dispatch paths added in P3.3, reusing the fake runJob seam:
- parallel mode starts all due jobs concurrently
- sequential mode serializes due jobs one at a time
- skip overlap policy drops a re-fire while running (no Pending)
- queue overlap policy marks Pending and re-runs after the run finishes
- RunNow refuses a manual run while another job runs in sequential mode
Helpers prime NextDue to the past and tick at the wall clock so a started
job (advanced an hour out) does not spuriously re-fire.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Add Execution mode and Overlap policy widget.Select controls in
ui/settings_view.go under a new Queue section group, between the
Application and Storage sections. Both selects are primed from the
current config on open and their selected values are written back into
the config struct on save, passing through the existing UpdateSettings
validation path.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Rework RunDue/startRunLocked/executeRun so the ExecutionMode and
OverlapPolicy config knobs take effect:
- startRunLocked advances NextDue to the next occurrence instead of
zeroing it, keeping the schedule marching during an in-flight run.
- RunDue scans all due jobs: parallel starts every due, non-running job;
sequential defers a due job while any other job runs. When a job comes
due again mid-run, skip drops it and queue marks it Pending; either way
NextDue is advanced past the fired occurrence.
- executeRun re-runs a Pending job once the current run finishes.
- RunNow gains a sequential-mode guard refusing a manual run while
another job is running.
- Add anyRunningLocked and advanceNextDueLocked helpers.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Extracts the four dispatch functions and their private helper
runningOutput into a dedicated file so operations.go stays focused on
CRUD and settings. No behaviour change; shared helpers (prependLog,
refreshNextRunLocked, etc.) remain in operations.go where other
operations already call them.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Introduces ExecutionMode (parallel/sequential) and OverlapPolicy
(skip/queue) types and constants in domain/config.go, wires defaults
(parallel/skip) into loadOrCreateConfig and the normalization pass, and
adds validation in validateConfig. Adds Pending bool to JobRuntime as
the flag P3.3 will use to re-run a queued overlap. Marks P3.1 done.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
The Linux build host reads these scripts from a shared mount of the
Windows working tree, where autocrlf produces CRLF line endings. bash
then failed on `set -o pipefail` (trailing CR in the option name), and
the version parsed from version.go carried a trailing CR into the Docker
tag ("...:0.6.0\r": invalid reference format).
- Add .gitattributes forcing LF on *.sh so Windows checkouts stay LF.
- Strip CR from the version extraction in all three Linux build scripts.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Phase 2 (PySentry legacy removal) complete: removed legacy autostart code
for Windows and Linux, updated ignore files for JSON storage.
Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
Drop pysentry.yaml references; add gosentry.json and jobs.json.
Keep *.yaml wildcard to ignore legacy files during import window.
Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
The legacy tests TestParseRegistryRunValue (Windows registry-based
autostart) and TestLinuxAutostartRemovesLegacyDesktopEntry (Linux systemd
cleanup) were already removed in P2.1 and P2.2. All remaining tests in
autostart_windows_test.go and autostart_linux_test.go test the current,
non-legacy implementation (Startup folder shortcuts and desktop files).
Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
Drop cleanupLegacySystemdAutostart, cleanupLegacyDesktopAutostart,
legacySystemdAutostartExists, legacyDesktopAutostartExists, and their
path helpers; remove calls from SetAutostart and AutostartStatus; drop
the os/exec import. Remove TestLinuxAutostartRemovesLegacyDesktopEntry
which referenced the deleted legacyAutostartDesktopPath function.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Drop legacyAutostartName, cleanupLegacyRegistryAutostart,
legacyRegistryAutostartExists, parseRegistryRunValue, and readShortcutTarget
from autostart_windows.go; remove the corresponding legacy registry checks
from SetAutostart and AutostartStatus; delete TestParseRegistryRunValue.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Phase 1 complete: JSON storage + exit-code removal (P1.1-P1.6).
Settings and jobs now persist as gosentry.json / jobs.json with
one-time YAML import for existing installs.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Remove the SuccessExitCodes field from domain.Job and every layer that
read or wrote it: runner/exitcodes.go (deleted), runner.go runStateDetail
simplified to 0=OK / non-zero=Failed, logfile.go, format.go, operations.go,
store.go, job_dialog.go, and jobs_view.go. Tests updated accordingly.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
When gosentry.json / jobs.json are absent, read a pre-migration
gosentry.yaml / jobs.yaml via private yaml-tagged shadow structs and
return the data unsaved; the existing SaveConfig/SaveJobs in OpenStore
then rewrite it as JSON. Replaces the placeholder that pointed configPath
at the legacy YAML file and tried to json.Unmarshal it.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
- ConfigFileName → "gosentry.json", JobsFileName → "jobs.json"
- Remove exported LegacyConfigFileName ("pysentry.yaml")
- Add unexported legacyYAMLConfigFileName / legacyYAMLJobsFileName for
the upcoming one-time YAML import (P1.4)
- Update store.go fallback path and comments to describe YAML→JSON
migration rather than the old PySentry→GoSentry rename
- Align store_test.go references and test comments
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Replace writeYAML with writeJSON (json.MarshalIndent, 2-space indent,
trailing newline) and switch the config and jobs Unmarshal calls to
encoding/json. Mark P1.2 done in the pre-release task list.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Replace yaml:"…" tags with json:"…" on Job, Config, and JobsFile.
Add omitempty to bool fields in Config that previously lacked it.
Update comments to reference .json filenames.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Break the pre-release plan into phased tasks (P1-P8) with a per-task model
and thinking-depth recommendation and a completion checklist, following the
existing REFACTORING.md convention.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Document the planned work to take GoSentry from the v0.4.0 architectural
milestone to a pre-release build: JSON storage with one-time YAML import,
task-queue execution settings (parallel/sequential + overlap policy),
failure notifications, Command browse button, small/large icons, the Fyne
2.7 upgrade with tray-click-to-show, dropping the per-job success-exit-codes
feature, PySentry legacy cleanup, and a README split.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
## Summary
Completed Phase 5 refactoring and reached the target architecture.
**Architectural milestone achieved:**
- Service layer owns all state and is the sole writer
- UI is a thin Fyne view, all widget updates marshaled via `fyne.Do`
- Core engines are stateless and injectable
- Domain types are pure (no `yaml:"-"` fields)
- Full module builds and `go vet ./...` clean
## Changes
- Bump version: 0.3.6 → 0.4.0
- Update CHANGELOG with Phase 5 summary
- Add ROADMAP "Refactoring Follow-Ups" section
## Known follow-up work
1. **Linux test build broken** — `runner_test.go` needs `//go:build windows` tag
2. **File-size limits exceeded** — `operations.go` (486 lines), `jobs_view.go` (415 lines)
See ROADMAP.md for details.
---------
Co-authored-by: mixeme <mix.public@ya.ru>
Reviewed-on: #1
readShortcut read the shortcut TargetPath via [Console]::Out.Write, which
uses the system OEM code page by default. On Russian Windows (CP866) this
encoded Cyrillic characters differently from UTF-8, so Go's string(output)
produced a garbled path that never matched os.Executable, causing
AutostartStatus to always report "shortcut points to another executable"
for any install directory that contained non-ASCII characters.
Fix: prepend [Console]::OutputEncoding = New-Object System.Text.UTF8Encoding($false)
to the readShortcut PowerShell script so the output is always UTF-8.
Also harden sameWindowsPath against NTFS 8.3 short names: when a directory
name contains spaces Windows assigns a short name (e.g. LOCALG~1 for
"Local Git"), and the OS may use that form when launching from a
Startup-folder shortcut. Add an os.SameFile fallback that compares paths
by volume serial number and file index, which is immune to 8.3 vs long
name differences as well as directory junction points.
Add normalizeWindowsPath helper that strips quotes and the \?\ extended-
length prefix before filepath.Clean so those variants compare equal to
the plain path.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Created docs/TESTS.md documenting all 25 tests across 5 test files:
- store_test.go: YAML serialization tests
- scheduler_test.go: Schedule parsing and invocation output tests
- runner_test.go: Command execution, exit codes, and Windows process tests
- autostart_windows_test.go: Windows startup folder shortcut creation tests
- autostart_linux_test.go: Linux XDG Desktop Entry autostart tests
Includes test descriptions, platform requirements, and usage instructions.
Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
Update the OpenGL workaround to suggest the mingw release of Mesa instead of
msvc, as it matches the MSYS2 GCC toolchain used to build GoSentry. Both
variants work at runtime, but mingw is the more consistent choice.
Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
Add explanatory comments around startup timing, single-instance focus handoff, config migration, and Windows/Linux autostart choices.
The new comments capture why these implementations were chosen, what alternatives were intentionally avoided, and which user-facing problems those tradeoffs solve.
Bump the version to 0.3.1 and record startup timing after the main window is actually shown.
Keep autostart launches distinct in History by recording a separate tray-start message when the UI intentionally starts hidden.
Rename the application, Go module path, command package, build artifacts, resource script, and embedded icon assets from PySentry/pysentry to GoSentry/gosentry.
Move portable settings to gosentry.yaml while reading legacy pysentry.yaml during the transition, then rewrite settings under the new name.
Update Windows and Linux autostart integration to use GoSentry names while cleaning up legacy PySentry registry, desktop-entry, and systemd artifacts.
Refresh README, architecture notes, roadmap, changelog, and release examples for version 0.3.0.
Bump the application version to 0.2.5 and update documented artifact names.
Document the Windows VirtualBox/RDP OpenGL startup failure and the Mesa software OpenGL workaround.
Record the tray-icon double-click limitation in the roadmap for future Fyne or platform-specific tray work.
Add a shared --start-in-tray argument that lets autostart start the scheduler and tray integration without opening the main window.
Write the argument into Windows Startup shortcuts and Linux XDG Autostart desktop entries, and verify existing autostart entries include it.
Keep manual launches unchanged and let a manual second launch reveal an already-running instance while duplicate autostart launches stay hidden.
Replace the HKCU Run autostart entry with a per-user Startup folder shortcut. A .lnk stores TargetPath separately, which avoids fragile quoting when the executable path contains spaces.
Remove legacy PySentry and GoSentry Run entries when saving autostart settings, and report shortcut status from the actual shortcut target.
Add Windows tests that create and read a temporary shortcut with spaces in the path so the PowerShell/COM invocation remains covered.
Wrap dynamic job detail labels so long names, schedules, commands, and status values no longer change the right panel minimum width when the selected job changes.
Point embedded and Windows resource icons at the current asset filenames so tests and Windows builds continue to work after the asset cleanup.