Commit Graph

145 Commits

Author SHA1 Message Date
mixeme 29d2ffed8f fix: complete code review follow-ups for queue, stats, and docs
Replace overlap Pending flag with PendingRuns counter, match seed stats
by job_id, align average duration with TimedRunCount, and tidy docs.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-29 21:54:44 +03:00
mixeme e9fc9eaba0 fix: harden run persistence and error surfacing from code review
Snapshot store paths under lock before async runs, roll back failed
start/save state, emit UI events only after successful persistence,
surface log write failures, and sync stale YAML docs to JSON.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-29 21:33:50 +03:00
mixeme 09c5edc993 docs: document disadvantages of platform-specific maximized detection
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-25 23:28:40 +03:00
mixeme 76c8ac92d1 freeze window size persistence until maximized detection is available
Saving w.Canvas().Size() when the window is maximized persists the maximized
dimensions, corrupting the stored size for the next launch. Commented out the
save calls until per-OS maximized detection (IsZoomed / _NET_WM_STATE /
NSWindow.isZoomed) is implemented. Roadmap entry updated to reflect frozen
status.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-25 23:26:35 +03:00
mixeme dccb598b8c docs: add roadmap item for window size not saved when maximized
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-25 23:22:22 +03:00
mixeme 0c1ab8dd7e Update README.md 2026-06-25 23:00:58 +03:00
mixeme dda128ff85 Update README.md 2026-06-25 22:59:29 +03:00
mixeme 7ef00a1139 Update README.md 2026-06-25 22:58:14 +03:00
mixeme 34a702bc42 docs: add screenshots to README
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-25 22:56:04 +03:00
mixeme 74e9e93bd7 Add screenshots 2026-06-25 22:55:06 +03:00
mixeme 882fcfe65d chore: release 0.11.2 with window persistence, appID update, and doc fixes
- Persist window size on quit/close and restore it on next launch
- Update appID from ru.mixdep.gosentry.desktop to ru.mixeme.gosentry.desktop
- Use markdown headers for Build sections in DEVELOPMENT.md
- Remove stale go.yaml.in/yaml/v4 dependency from DEVELOPMENT.md

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-25 22:50:28 +03:00
mixeme 8cfa16a2bd docs: add History column filters to roadmap (pending Fyne support)
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-25 22:36:03 +03:00
mixeme 5f36c7a0e1 feat(ui): rename pause/resume all to Disable/Enable auto with pause icon
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-25 22:30:30 +03:00
mixeme fb2f9b6e30 fix(ui): restore History column sort after Fyne 2.7 header-tap change
Fyne 2.7.4 made Table.Select() reject cells with Row < 0, so OnSelected
was never fired for header clicks and the Time sort toggle stopped working.
Replace the plain Label header with a custom historyHeader widget that
implements fyne.Tappable; UpdateHeader wires OnTapped for col 0 directly.
Also swap "asc"/"desc" text for ▲/▼ glyphs.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-25 22:24:59 +03:00
mixeme 0e258979d9 chore: release 0.11.1 with settings spacing, label, and Save-button fixes
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-25 08:50:10 +03:00
mixeme f53447d3e8 feat(ui): align settings spacing, fix label clipping, gate Save button
- Give the Queue selects the same default spacing as the Storage fields
- Widen the settings caption column so "Default overlap policy" fits
- Disable Save until a field differs from the saved config, re-enabling on
  change and re-disabling after a successful save

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-25 08:49:03 +03:00
mixeme 24a8140e26 chore: release 0.11.0 with paused manual runs and two-column layouts
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-25 07:52:10 +03:00
mixeme 9ecb8b61f8 feat(ui): two-column settings/details, compact job list, manual run while paused
- Allow manual "Run now" while the scheduler is paused: pause now stops only
  automatic scheduled runs (RunDue), not the user's explicit action. Drop the
  paused guard in Service.RunNow and the UI pause dialog; update tests.
- Cap the details metadata caption width via a new captionValueLayout so a wider
  window feeds extra space to the value column instead of the short caption.
- Reorganize the Settings tab into two columns (Application+Queue / Storage+About)
  with Save spanning the full width; move the Autostart status onto its own line.
- Condense the Jobs list rows with compactVBoxLayout to fit more jobs.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-25 07:51:03 +03:00
mixeme 43809e5076 fix(ui): refresh activity panel when switching selected job
The "Selected job activity" list kept showing the previous job's entries
when a different job was selected. dp.update() reassigned the backing
slice but never refreshed the widget.List, and only the refreshView path
appended an explicit refresh. Move d.logs.Refresh() into update()/clear()
so every caller redraws the panel.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-25 07:34:19 +03:00
mixeme 8b81180c92 chore: release 0.10.2 with condensed panels and settings spacing fix
Bump version to 0.10.2 and document the UI density/resizing work in the
changelog. Also restructure the settings form into sections so separators
and the editable Storage fields keep normal spacing (dividers no longer
crowd the row above, entry boxes stay visibly separated) while the
label-only sections remain condensed.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-25 01:41:02 +03:00
mixeme 21d78ea010 feat(ui): condense panels and let the window shrink to 720p
Make the job details and settings views more compact and remove the tall
minimum that prevented resizing the window shorter:

- Lay job metadata out in two columns and stack rows with a negative-gap
  compactVBoxLayout, roughly halving the block height.
- Wrap the settings form in a vertical scroll so it no longer dictates
  the window minimum (AppTabs sizes to the tallest tab), and tighten its
  rows with the same compact layout.
- Shrink the command-output scroll minimum height so the details pane can
  get shorter; long output still scrolls.
- Size the "Selected job activity" panel to exactly maxJobActivityRows
  using widget.List's own content-height formula, so all three rows show
  without a scrollbar regardless of theme or DPI.

Together these drop the minimum window height from ~891px to ~570px.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-25 01:34:47 +03:00
mixeme 5cdb9414b2 docs: update changelog for 0.10.1 build script improvements
Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
2026-06-24 23:05:22 +03:00
mixeme 9394bd66b8 chore: add informative messages to Windows build script
Add echo statements at key build steps to indicate progress:
- Build start and version info
- Output path
- Environment setup
- Icon resource embedding (or warning if windres not found)
- Go compilation
- Success completion message

Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
2026-06-24 23:04:42 +03:00
mixeme ec19ab3884 chore: bump version to 0.10.1 and update changelog
Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
2026-06-24 23:02:45 +03:00
mixeme 999ccb7300 refactor: unify icon asset naming to use size-based scheme
Rename icon files from mixed naming (big/16x16) to consistent size-based
names (large/small) for clarity. Update Go functions and variables to
reference the new asset names. This makes the icon pipeline easier to
understand and maintain.

File changes:
- gosentry-icon-big.png → gosentry-icon-large.png
- gosentry-icon-16x16.png → gosentry-icon-small.png
- gosentry-icon-16x16.ico → gosentry-icon-small.ico
- Embedded variable: iconBytes → iconLargeBytes for clarity

Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
2026-06-24 23:02:06 +03:00
mixeme 88989b143b docs/CHANGELOG: complete the 0.10.0 entry
Document the shipped work missing from the entry: per-job overlap
policy, persisted global pause, 720p-safe window sizing, portable
packaging helpers, and the internal cleanup (jobs_view split, dropped
YAML migration, planning-doc removal).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-24 22:59:00 +03:00
mixeme 03cba5b5aa docs: drop completed release-milestone docs; trim roadmap
Remove RELEASE-0.10-PLAN.md and RELEASE-0.10-TASKS.md now that the
0.10.0 milestone work is finished (history preserved in git). Trim
ROADMAP.md to open items only; completed work lives in CHANGELOG.md.
Version stays 0.10.0 — this release is not yet tagged/shipped.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-24 22:57:15 +03:00
mixeme 74cd7485ee docs: mark Release 0.10.0 complete; update roadmap (T8.1)
ROADMAP.md now documents that T6.1 (jobs_view split), T6.2 (cleanup),
and T7.1–T7.2 (Windows zip + Linux tar.gz packaging) are complete.
Version 0.10.0 and CHANGELOG.md were already finalized.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-24 22:51:03 +03:00
mixeme 1085667d7b scripts: add portable packaging helpers for Windows and Linux (T7.1-T7.2)
package-windows.bat builds gosentry.exe then bundles it with README and
CHANGELOG into a versioned .zip via PowerShell Compress-Archive.
package-linux.sh does the same for linux-amd64 and linux-arm64 (arm64
cross-compiles via aarch64-linux-gnu-gcc; skips gracefully if absent),
producing .tar.gz archives with files at the archive root.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-24 22:50:06 +03:00
mixeme 13f2779e1f refactor: split jobs_view, drop YAML migration, update docs (T6.1-T6.4)
T6.1: split jobs_view.go into three files — jobs_view_helpers.go (pure
helpers) and jobs_view_details.go (detailsPanel struct with widget
creation, update, clear, and container methods) — bringing jobs_view.go
from 459 to ~200 lines.

T6.2: remove stale YAML upgrade note from README; drop *.yaml from
.dockerignore.

T6.3: delete YAML shadow structs (yamlConfig/yamlJob/yamlJobsFile),
importYAMLConfig/importYAMLJobs, legacy path constants, and all
YAML-import tests; run go mod tidy to remove go.yaml.in/yaml/v4.

T6.4: refresh ARCHITECTURE.md — JSON storage references, new Key Domain
Concepts section (per-job overlap policy, run-time statistics + log
seeding, persisted pause flag, jobs_view split).

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-24 22:42:42 +03:00
mixeme d09b6e182c ui: 720p-safe default window size + tighter layout minimums (T5.1)
Lower default from 1120×720 to 1024×660 so the window opens fully
visible on 1366×768 / 720p screens. Reduce minJobsSidebarWidth (480→400)
and commandOutputScroll min size (520×160→460×120) to match; the layout
engine enforces these as the natural minimum, keeping the UI usable at
the smaller default.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-24 22:26:34 +03:00
mixeme 18dd9aeabb docs: mark Phase 4 tasks complete (T4.1–T4.4) 2026-06-24 22:23:24 +03:00
mixeme 80d13d0ac6 app/operations_test.go: persist-pause + rebuilt-service tests (T4.4)
TestSetGlobalPausePersistsToConfigFile reads gosentry.json back from disk
after each SetGlobalPause call and asserts the Paused flag is correctly
written and cleared. TestServiceRebuiltFromPausedStoreStartsPaused builds
a second Service from the already-updated store and confirms both RunDue
and RunNow are refused while the service is paused.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-24 22:21:24 +03:00
mixeme 7e868d6f5b ui/jobs_view: init pause controls from persisted state (T4.3)
schedulerPaused, the scheduler-state label, and the Pause-all/Resume-all
button now read Config.Paused at construction time so they correctly reflect
a paused install on restart instead of always starting in the running state.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-24 22:18:36 +03:00
mixeme b9505e83ab domain/config.go + app: persist global pause state across restarts (T4.1, T4.2)
Add Config.Paused bool so the scheduler's paused flag survives a restart.
SetGlobalPause now writes the flag into store.Config and calls SaveConfig;
NewService seeds s.paused from Config.Paused before computing first next-run
times, so jobs show "Scheduler paused" immediately at startup when paused.
Also add Paused to the yamlConfig shadow struct to keep the direct conversion
from domain.Config valid until the YAML import path is dropped in T6.3.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-24 22:16:43 +03:00
mixeme b0d9883627 app/run_test.go: per-job overlap policy override tests (T3.4)
Adds three tests for the effective-policy resolution:
- per-job "queue" overrides global "skip" (job marked Pending, re-runs)
- per-job "skip" overrides global "queue" (overlap dropped, no re-run)
- empty Job.OverlapPolicy inherits the global default

Also ticks Phase 3 complete in docs/RELEASE-0.10-TASKS.md.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-24 21:33:06 +03:00
mixeme 554ce2b93a ui/app: per-job overlap policy in job dialog and details panel
- job_dialog.go: add overlap-policy widget.Select with "(Use global
  default)" → empty, "skip", and "queue" options; pre-selects the job's
  current value; on save maps the inherit label back to empty string.
- app/format.go: add DisplayOverlapPolicy(job, globalPolicy) — returns
  the policy name when overridden, else "skip/queue (global default)".
- ui/jobs_view.go: add "Overlap policy" detail row updated in
  updateDetails using DisplayOverlapPolicy.
- settings_view.go: rename "Overlap policy" label to "Default overlap
  policy" to clarify it is the global default jobs can override.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-24 21:05:50 +03:00
mixeme 3f3b977fb0 app/run.go: resolve effective overlap policy per job in RunDue
RunDue now resolves each job's effective overlap policy via
effectiveOverlapPolicy (job value when set, else Config.OverlapPolicy)
instead of reading the global policy once per tick. An empty
Job.OverlapPolicy inherits the global default, so normalizeJobs continues
to leave the field untouched rather than backfilling it.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-24 20:58:51 +03:00
mixeme 8f75318e8c domain/job.go: add OverlapPolicy field for per-job run policy
Adds OverlapPolicy field to Job struct with json:"overlap_policy,omitempty"
tag. When empty, the field signals that the job should inherit the global
overlap policy setting from Config. Also updates yamlJob shadow struct to
maintain field-layout equivalence for YAML→JSON import compatibility.

Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
2026-06-24 20:57:00 +03:00
mixeme ed81443d29 ui/history_view: size Log column to content so file names aren't truncated
The Log column was fixed at 240px with TextTruncate, clipping log file
names like 20260601-100000_<JobName>.log. Measure the widest value and
size the column to fit (bounded 240–520px), recomputing on refresh so
newly recorded events widen the column instead of being cut off.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-24 20:54:23 +03:00
mixeme cf276fc8ec ui/jobs_view: cap Selected job activity to 3 recent rows, anchor at bottom
Show only the latest 3 activity entries for the selected job instead of the
full in-memory list, and pin the panel to the bottom of the details pane via a
Border so the command output absorbs the remaining vertical space.

Adds fixedHeightLayout (mirroring minWidthLayout) to reserve a stable height
for the activity list. The full per-job history (maxJobLogs) is untouched and
still available in the History view.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-24 20:36:41 +03:00
mixeme 07c0995935 Update .gitignore 2026-06-24 08:32:18 +03:00
mixeme d13b90061c docs/RELEASE-0.10-TASKS: unmark T8.1 (ROADMAP + PERFORMANCE pending)
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-24 08:27:12 +03:00
mixeme 65281c3996 docs/RELEASE-0.10-TASKS: mark T2.5 and T8.1 complete
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-24 08:26:40 +03:00
mixeme b45ab654c2 app/version, docs/CHANGELOG: bump to 0.10.0 (T8.1)
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-24 08:26:03 +03:00
mixeme 886d0d9caa app/format, ui/jobs_view: DisplayStats summary + Statistics detail row (T2.6, T2.7)
Add DisplayStats to format.go: returns "No runs recorded" when RunCount is
zero, otherwise a one-line "N runs, M failed, last X ms, avg Y ms, max Z ms"
summary.  Wire a Statistics detail row into the jobs panel that refreshes via
updateDetails alongside the other runtime fields.

Tests: TestDisplayStats (nil/zero/normal/no-fail), TestUpdateStats (three
sequential fake runs through updateStats verifying all aggregate fields), and
five seed tests in runner/seed_test.go covering basic aggregation,
duration-less legacy logs, maxFiles capping, missing directory, and
unmatched log files.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-24 08:24:48 +03:00
mixeme 6c69f323bd runner/seed, app/service: seed run-time stats from log files (T2.5)
Add SeedStats, which reconstructs per-job execution-time aggregates from
existing log files: suffix-matched by sanitized job name, bounded by
MaxLogFiles, and tolerant of duration-less legacy logs (counted in
run/fail totals but excluded from last/avg/max). NewService folds the
seed into each JobRuntime at build time so stats survive a restart.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-24 08:16:47 +03:00
mixeme 7dafa82b21 domain/runtime, app/run: add execution-time statistics aggregate (T2.4)
Add RunCount, FailCount, LastDurationMS, AvgDurationMS, MaxDurationMS
to JobRuntime and fold each completed RunRecord into them via updateStats
called from executeRun.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-24 08:13:02 +03:00
mixeme 2b0cdb57f4 runner/logfile: write duration line to log header (T2.3)
Pass durationMS to writeRunLog and include it as 'duration' in the
log header for persistence.

Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
2026-06-24 08:11:05 +03:00
mixeme 42d73b9eb0 domain/record, runner: add DurationMS to RunRecord (T2.1, T2.2)
Add DurationMS int64 field to RunRecord and measure wall-clock
start→finish in RunJob; StartOnly jobs record 0.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-24 08:09:59 +03:00