Compare commits

...

2 Commits

Author SHA1 Message Date
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
4 changed files with 42 additions and 351 deletions
+38
View File
@@ -30,6 +30,44 @@ All notable GoSentry changes are recorded in this file.
(`N runs, M failed, last X ms, avg Y ms, max X ms`) that refreshes after
each run and is pre-populated from log files after a restart.
**Per-job overlap policy:**
- Added an `OverlapPolicy` field to `domain.Job`; a job can now override the
global skip/queue default. `RunDue` resolves the effective policy per job
(the job's value if set, otherwise `Config.OverlapPolicy`).
- The job dialog gains an overlap-policy selector with a
"(Use global default)" option that saves empty so the job inherits the
global setting. The details panel reflects the effective policy.
**Persisted global pause:**
- Added `Paused` to the config so the global "Pause all" state survives a
restart. `SetGlobalPause` persists the new value, and the service initializes
its paused state from config at startup — a paused install now relaunches
paused instead of silently resuming the scheduler.
- The Pause-all/Resume-all button and scheduler-state label initialize from the
persisted state.
**Window sizing (720p-safe):**
- Lowered the default window size to `1024×660` with a sensible `MinSize` so the
window opens fully visible on a 1366×768 / 720p screen. Layout minimums in the
Jobs view were tightened to match.
**Packaging:**
- Added portable-distribution helpers: `scripts\package-windows.bat` builds and
bundles `gosentry.exe`, `README.md`, and `CHANGELOG.md` into a versioned
`.zip`; `scripts/package-linux.sh` does the same for `linux-amd64` and
`linux-arm64` into `.tar.gz` archives.
**Internal cleanup:**
- Split `ui/jobs_view.go` into focused files (`jobs_view_details.go`,
`jobs_view_helpers.go`) to bring it back under the file-size guideline.
- Removed the one-time YAML→JSON import path (shadow structs, `importYAML*`,
legacy path names) now that the 0.9.0 transition window has passed;
`go.yaml.in/yaml/v4` is dropped from `go.mod`.
- Post-field-test sweep of stale diagnostics, obsolete autostart-migration code,
and noisy README/ignore rules. The startup-timing History event is retained.
- Removed the completed release-milestone docs and trimmed `ROADMAP.md` to open
items only.
## 0.9.0 - 2026-06-24
**Storage migrated to JSON; queue execution modes; failure notifications; tray left-click; Fyne 2.7.4.**
-187
View File
@@ -1,187 +0,0 @@
# Release 0.10.0 — Milestone Plan
This milestone bundles the open [roadmap](ROADMAP.md) follow-ups with six
feature/bug-fix requests. It is a polish-and-fill release on top of 0.9.0: no new
storage format and no architectural rework, just per-job run control, run-time
statistics, UI compaction, persisted pause state, and screen-fit + packaging
groundwork.
Build/test note: the GUI needs CGO + MSYS2 UCRT64; the default Bash env has CGO
off. Use `scripts\test.bat` / `scripts\build-windows.bat` on Windows. Confirm the
Linux test build with `GOOS=linux go vet ./...`.
## 1. Selected Job Activity panel → one line per entry
Today the "Selected job activity" list (`src/ui/jobs_view.go`, `jobLogs`) renders
each record with `app.EventText`, which is wide and can wrap, making rows tall and
the panel noisy.
- `src/ui/jobs_view.go`: in the `jobLogs` update callback, set the row label's
`Wrapping = fyne.TextTruncate` so each record stays on exactly one line.
- `src/app/format.go`: add a compact `EventLine(e domain.RunRecord) string` (or a
`oneLine bool` variant) that drops the full log path and uses
`filepath.Base(e.LogFile)` — see §3. Keep the verbose `EventText` for the
History tab.
- Tests: `src/app/format_test.go` — cover the one-line formatter, including the
log-file-present and absent cases.
## 2. Job execution-time statistics
Capture how long each run takes and surface per-job aggregates.
- `src/domain/record.go`: add `DurationMS int64` to `RunRecord` (JSON/struct tag
consistent with the existing fields).
- `src/runner/runner.go`: measure wall-clock from command start to finish and set
the duration on the record. For `StartOnly` jobs (fire-and-forget) record `0`
or omit, since there is no completion to time.
- `src/runner/logfile.go`: write a `duration` line into the log header.
- `src/domain/runtime.go`: add an aggregate (`RunCount`, `FailCount`,
`LastDurationMS`, `AvgDurationMS`, `MaxDurationMS`) to `JobRuntime`, updated in
`executeRun` when a record is recorded.
- **Seed stats from log files on startup** so they survive restarts. Add a
`runner` helper that parses the `duration`/`state` headers of a job's existing
log files (matched by the `_<sanitized name>.log` suffix, bounded by
`MaxLogFiles`) and fold the results into the aggregate when `JobRuntime` is
built. Reuse the §2 log-header format as the parse source. Tolerate older logs
with no `duration` line (count the run, skip the timing).
- `src/app/format.go`: add `DisplayStats(rt)` returning a one-line summary
(e.g. `12 runs · 1 failed · last 3.2s · avg 2.8s`).
- `src/ui/jobs_view.go`: add a "Statistics" detail row (and refresh it in
`updateDetails`).
- Tests: `src/app/format_test.go` for the formatter; extend `src/app/run_test.go`
to assert the aggregate updates after fake runs; add a `runner` test that seeds
the aggregate from sample log files (including a duration-less legacy log).
## 3. Fix truncated log file name ("…lo")
The activity/History display shows the full log path and, when the cell is narrow,
truncates from the right so the visible text ends mid-extension (`…\20240101-..lo`).
- Show `filepath.Base(e.LogFile)` (just `20060102-150405_name.log`) instead of the
full path in the compact formatter from §1; the full path can stay in a tooltip
or the History row.
- Verify the History tab (`src/ui/history_view.go`) column/truncation so the
`.log` extension is never clipped to `..lo`.
- Tests: assert the compact formatter emits the base filename.
## 4. Per-job run policy
Currently `ExecutionMode` and `OverlapPolicy` live only on `Config`
(`src/domain/config.go`) and are read globally in `src/app/run.go`. Make the
**overlap policy** configurable per job, falling back to the global default; keep
execution mode global (sequential is inherently a cross-job, one-at-a-time
guarantee and does not have a clean per-job meaning).
- `src/domain/job.go`: add `OverlapPolicy domain.OverlapPolicy \`json:"overlap_policy,omitempty"\``.
Empty = inherit the global `Config.OverlapPolicy`.
- `src/app/run.go` `RunDue`: resolve the effective policy per job
(`job.OverlapPolicy` if set, else `s.store.Config.OverlapPolicy`) instead of
reading the global value once per tick.
- `src/app/operations.go` `normalizeJob` / `src/storage/store.go` `normalizeJobs`:
leave empty as "inherit" (do not force a default onto the job).
- `src/ui/job_dialog.go`: add an overlap-policy `widget.Select` with an
"(Use global default)" first option that saves empty.
- `src/ui/settings_view.go`: clarify the global control is the default for jobs
that don't override.
- `src/app/format.go`: `DisplayRunMode` (or a new helper) reflects the effective
overlap policy in the details panel.
- Tests: extend `src/app/run_test.go` — a job with `OverlapPolicyQueue` set
queues even when the global default is `skip`, and vice versa; empty inherits.
## 5. Adapt initial window size for 720p screens
`src/ui/run.go` resizes to `1120×720`. On a 1366×768 / 720p display the title bar
+ taskbar push the window off-screen.
- `src/ui/run.go`: lower the default to a 720p-safe size (e.g. `1024×660`) and set
a `w.SetFixedSize(false)` sensible `MinSize` on the content so it never demands
more than fits.
- Optionally persist the last window size via Fyne `Preferences` and restore it on
launch, clamped to something that fits the current screen.
- Re-check `commandOutputScroll.SetMinSize` (`520×160`) and
`minJobsSidebarWidth` (480) in `src/ui/jobs_view.go` so the smaller default
still lays out without forcing horizontal overflow.
- Manual verification on a 1366×768 display (or a forced-resolution VM).
## 6. Persist the global "Pause all" state
The global pause (`Service.paused`, flipped by `SetGlobalPause` in
`src/app/operations.go`) is in-memory only, so "Pause all" is forgotten on restart
and the scheduler silently resumes — surprising for a deliberate emergency stop.
- `src/domain/config.go`: add `Paused bool \`json:"paused,omitempty"\``.
- `src/app/operations.go` `SetGlobalPause`: persist the new value into
`s.store.Config` and `SaveConfig`, alongside the existing runtime updates and
`SchedulerStateChanged` emit.
- `src/app/service.go`: initialize `s.paused` from `store.Config.Paused` when the
Service is built, and apply the paused next-run text to runtimes at startup so a
restored-paused launch shows the right state before the first tick.
- `src/ui/jobs_view.go`: initialize the local `schedulerPaused` flag, the
"Pause all"/"Resume all" button, and the scheduler-state label from the
persisted state instead of hard-coding `false`.
- Tests: `src/app/operations_test.go``SetGlobalPause(true)` persists to config;
a Service rebuilt from that store starts paused and refuses `RunDue`/`RunNow`.
## 7. Roadmap follow-ups (carried from ROADMAP.md)
- **File-size soft limits.** `src/ui/jobs_view.go` (415) and
`src/app/operations_test.go` (536) exceed the ~250 UI / ~400 cap guideline.
This milestone adds rows to `jobs_view.go` (§1, §2, §4, §6) — split a clean seam
out (e.g. the details-panel construction or the toolbar/button wiring) while it
is already being edited.
- **Post-field-test cleanup.** Sweep for stale diagnostics, over-defensive checks,
obsolete autostart-migration code, and noisy README setup notes now that 0.9.0
has had field use. Recheck `.gitignore` / Docker / packaging ignore rules.
Keep the startup-timing instrumentation (the History "Started … in Xms" event)
so startup time can keep being measured across future changes.
- **Drop the one-time YAML→JSON migration.** The import shipped in 0.9.0, so the
transition window has passed. Remove the legacy import path:
- `src/storage/store.go`: delete the `yamlConfig` / `yamlJob` / `yamlJobsFile`
shadow structs, `importYAMLConfig` / `importYAMLJobs`, and the legacy-import
branches in `loadOrCreateConfig` / `loadOrCreateJobs`.
- `src/storage/paths.go`: remove `legacyYAMLConfigFileName` /
`legacyYAMLJobsFileName`.
- `go.mod` / `go.sum`: drop `go.yaml.in/yaml/v4` (now unused) via `go mod tidy`.
- `src/storage/store_test.go`: remove the YAML-import tests and the `writeYAML`
helper.
- `.gitignore` / `.dockerignore`: drop the `*.yaml` import-window ignores.
- **Architecture doc update.** Refresh `docs/ARCHITECTURE.md` for this milestone:
the per-job overlap policy on `domain.Job` (§4), the run-time statistics added to
`domain.JobRuntime` and seeded from log files (§2), the persisted global pause
flag (§6), and any `jobs_view.go` split (§7 file-size work).
## 8. Delivery and packaging (portable only)
This milestone targets only the portable distribution variants, matching the
ROADMAP delivery plan. Non-portable installer/package formats are out of scope and
have been dropped from the roadmap.
- Windows portable `.zip` bundling `gosentry.exe`, `README.md`, `CHANGELOG.md`
(a `scripts\package-windows.*` helper).
- Linux portable `.tar.gz` for `linux-amd64` and `linux-arm64` bundling the
binary, `README.md`, and `CHANGELOG.md` (a `scripts/package-linux.*` helper).
- Portable builds keep settings and jobs next to the executable — no per-user
data-path work is needed for this release.
## Implementation order
1. §3 log-name fix + §1 one-line activity (shared compact formatter).
2. §2 execution-time stats (record → runtime aggregate → details row).
3. §4 per-job overlap policy (domain → dispatch → dialog → tests).
4. §6 persist the global pause state (config → service → UI init).
5. §5 window sizing.
6. §7 jobs_view split + cleanup (after the §1/§2/§4/§6 edits land).
7. §8 portable archives (Windows `.zip`, Linux `.tar.gz`).
8. Docs: update `docs/ARCHITECTURE.md` (§7); version bump to `0.10.0`
(`src/app/version.go`), CHANGELOG, ROADMAP tick-offs.
## Verification
- `go vet ./...` clean; `go test ./...` green on Windows (CGO) and Linux.
- Activity panel: each entry is one line; log filename shows the base name with a
full `.log` extension (no `..lo`).
- Details panel shows live run-time statistics that update after runs.
- A per-job overlap policy overrides the global default; an unset job inherits it.
- "Pause all" survives a restart: a paused install relaunches paused.
- The window opens fully visible on a 1366×768 / 720p screen.
- Bump and document the release; append any startup re-measure to PERFORMANCE.md.
-139
View File
@@ -1,139 +0,0 @@
# Release 0.10.0 — Task List
Execution checklist for [RELEASE-0.10-PLAN.md](RELEASE-0.10-PLAN.md). Each task
names the recommended model and thinking depth. `Model`: haiku / sonnet / opus.
`Thinking`: low / medium / high. Section numbers (§) reference the plan.
Build/test note: the GUI needs CGO + MSYS2 UCRT64; the default Bash env has CGO
off. Use `scripts\test.bat` / `scripts\build-windows.bat` on Windows; confirm the
Linux test build with `GOOS=linux go vet ./...`.
## Phase 1 — Log-name fix + one-line activity (§3, §1)
Done first because both share a compact, single-line record formatter.
| Task | Description | Model | Thinking |
|------|-------------|-------|----------|
| T1.1 | `app/format.go`: add a compact one-line formatter (`EventLine`) that drops the full log path and uses `filepath.Base(e.LogFile)`; keep verbose `EventText` for History. | sonnet | low |
| T1.2 | `ui/jobs_view.go`: set the `jobLogs` row label `Wrapping = fyne.TextTruncate` and render via the compact formatter so each entry is one line. | sonnet | low |
| T1.3 | `ui/history_view.go`: verify column width/truncation never clips `.log` to `..lo`; keep the full path available (tooltip/row). | sonnet | low |
| T1.4 | `app/format_test.go`: cover the compact formatter (log-file present/absent, base-name output). | haiku | low |
## Phase 2 — Job execution-time statistics (§2)
| Task | Description | Model | Thinking |
|------|-------------|-------|----------|
| T2.1 | `domain/record.go`: add `DurationMS int64` (tag consistent with existing fields). | haiku | low |
| T2.2 | `runner/runner.go`: measure wall-clock start→finish and set duration on the record; `StartOnly` jobs record `0`. | sonnet | medium |
| T2.3 | `runner/logfile.go`: write a `duration` line into the log header. | haiku | low |
| T2.4 | `domain/runtime.go` + `app/run.go`: add the aggregate (`RunCount`, `FailCount`, `LastDurationMS`, `AvgDurationMS`, `MaxDurationMS`); update it in `executeRun`. | sonnet | medium |
| T2.5 | Seed stats from existing log files on startup: a `runner` helper that parses `duration`/`state` headers (suffix-matched, bounded by `MaxLogFiles`, tolerant of duration-less logs), folded into `JobRuntime` at build time. | opus | high |
| T2.6 | `app/format.go` `DisplayStats(rt)` one-line summary + `ui/jobs_view.go` "Statistics" detail row (refreshed in `updateDetails`). | sonnet | medium |
| T2.7 | Tests: `format_test.go` (DisplayStats), `app/run_test.go` (aggregate updates after fake runs), `runner` seed test incl. a duration-less legacy log. | sonnet | medium |
## Phase 3 — Per-job run policy (§4)
| Task | Description | Model | Thinking |
|------|-------------|-------|----------|
| T3.1 | `domain/job.go`: add `OverlapPolicy` (`json:"overlap_policy,omitempty"`); empty = inherit global. | haiku | low |
| T3.2 | `app/run.go` `RunDue`: resolve the effective policy per job (job value else `Config.OverlapPolicy`); `normalizeJob`/`normalizeJobs` leave empty as inherit. | opus | high |
| T3.3 | `ui/job_dialog.go`: overlap-policy `widget.Select` with "(Use global default)" → empty; `settings_view.go` wording; `app/format.go` reflects effective policy in details. | sonnet | medium |
| T3.4 | `app/run_test.go`: per-job `queue` overrides global `skip` (and vice versa); empty inherits. | opus | high |
## Phase 4 — Persist global pause state (§6)
| Task | Description | Model | Thinking |
|------|-------------|-------|----------|
| T4.1 | `domain/config.go`: add `Paused bool` (`json:"paused,omitempty"`). | haiku | low |
| T4.2 | `app/operations.go` `SetGlobalPause`: persist into `s.store.Config` + `SaveConfig`. `app/service.go`: init `s.paused` from `Config.Paused` and apply paused next-run text at startup. | sonnet | medium |
| T4.3 | `ui/jobs_view.go`: init `schedulerPaused`, the Pause-all/Resume-all button, and the scheduler-state label from the persisted state. | sonnet | low |
| T4.4 | `app/operations_test.go`: `SetGlobalPause(true)` persists; a Service rebuilt from that store starts paused and refuses `RunDue`/`RunNow`. | sonnet | medium |
## Phase 5 — Window sizing (§5)
| Task | Description | Model | Thinking |
|------|-------------|-------|----------|
| T5.1 | `ui/run.go`: lower default to a 720p-safe size (~`1024×660`) + sensible `MinSize`; re-check `commandOutputScroll` min size and `minJobsSidebarWidth` in `jobs_view.go`. Manual check on 1366×768. | sonnet | medium |
## Phase 6 — Refactor + cleanup (§7)
| Task | Description | Model | Thinking |
|------|-------------|-------|----------|
| T6.1 | `ui/jobs_view.go`: split a clean seam (details-panel build or toolbar/button wiring) to bring it back under the size guideline after the §1/§2/§4/§6 edits. | sonnet | medium |
| T6.2 | Post-field-test cleanup sweep: stale diagnostics, over-defensive checks, obsolete autostart-migration code, noisy README notes, ignore rules. **Keep** the startup-timing History event. | sonnet | medium |
| T6.3 | Drop the one-time YAML→JSON import: shadow structs + `importYAML*` + legacy branches in `storage/store.go`; legacy names in `paths.go`; `go.yaml.in/yaml/v4` via `go mod tidy`; YAML-import tests + `writeYAML` helper; `*.yaml` ignore rules. | sonnet | medium |
| T6.4 | `docs/ARCHITECTURE.md`: document per-job overlap policy, run-time statistics (incl. log-file seeding), the persisted pause flag, and the `jobs_view.go` split. | sonnet | medium |
## Phase 7 — Portable packaging (§8)
| Task | Description | Model | Thinking |
|------|-------------|-------|----------|
| T7.1 | `scripts\package-windows.*`: build + bundle `gosentry.exe`, `README.md`, `CHANGELOG.md` into a portable `.zip`. | sonnet | medium |
| T7.2 | `scripts/package-linux.*`: build + bundle binary, `README.md`, `CHANGELOG.md` into `.tar.gz` for `linux-amd64` and `linux-arm64`. | sonnet | medium |
## Phase 8 — Release docs + version
| Task | Description | Model | Thinking |
|------|-------------|-------|----------|
| T8.1 | Bump `src/app/version.go` to `0.10.0`; update `docs/CHANGELOG.md`; tick the addressed `docs/ROADMAP.md` items; append any startup re-measure to `docs/PERFORMANCE.md`. | haiku | low |
---
## Completion checklist
### Phase 1 — Log-name + one-line activity
- [x] T1.1 — compact one-line formatter
- [x] T1.2 — `jobLogs` single-line rows
- [x] T1.3 — History `.log` truncation verified
- [x] T1.4 — formatter tests
### Phase 2 — Execution-time statistics
- [x] T2.1 — `DurationMS` on `RunRecord`
- [x] T2.2 — measure duration in runner
- [x] T2.3 — `duration` log header
- [x] T2.4 — runtime aggregate + `executeRun` update
- [x] T2.5 — seed stats from log files
- [x] T2.6 — `DisplayStats` + Statistics row
- [x] T2.7 — stats tests
### Phase 3 — Per-job run policy
- [x] T3.1 — `Job.OverlapPolicy` field
- [x] T3.2 — effective-policy dispatch + inherit
- [x] T3.3 — dialog select + settings/format wording
- [x] T3.4 — per-job override tests
### Phase 4 — Persist global pause state
- [x] T4.1 — `Config.Paused` field
- [x] T4.2 — persist in `SetGlobalPause` + init from config
- [x] T4.3 — UI inits from persisted state
- [x] T4.4 — persistence + restored-paused tests
### Phase 5 — Window sizing
- [x] T5.1 — 720p-safe default + MinSize
### Phase 6 — Refactor + cleanup
- [x] T6.1 — `jobs_view.go` split
- [x] T6.2 — post-field-test cleanup (keep startup timing)
- [x] T6.3 — drop YAML→JSON migration
- [x] T6.4 — ARCHITECTURE.md update
### Phase 7 — Portable packaging
- [x] T7.1 — Windows `.zip`
- [x] T7.2 — Linux `.tar.gz` (amd64 + arm64)
### Phase 8 — Release docs + version
- [x] T8.1 — version bump + CHANGELOG + ROADMAP + PERFORMANCE
## Definition of done
- `go vet ./...` clean; `go test ./...` green on Windows (CGO) and Linux.
- Activity panel entries are one line; log file names show the base name with a
full `.log` extension (no `..lo`).
- Details panel shows run-time statistics that update after runs and survive a
restart (seeded from log files).
- A per-job overlap policy overrides the global default; an unset job inherits it.
- "Pause all" survives a restart: a paused install relaunches paused.
- The window opens fully visible on a 1366×768 / 720p screen.
- No YAML→JSON import code remains; `go.yaml.in/yaml/v4` is gone from `go.mod`.
- Portable `.zip` and `.tar.gz` artifacts build; ARCHITECTURE.md, CHANGELOG, and
ROADMAP reflect the release; version is `0.10.0`.
+4 -25
View File
@@ -1,30 +1,9 @@
# Roadmap
This file tracks planned GoSentry work that is larger than a single bug fix.
Completed work is recorded in [CHANGELOG.md](CHANGELOG.md), not here.
## Completed: Release 0.10.0
## Open Items
**Refactoring Follow-Ups (T6.1)**
File-size guidelines have been addressed:
- `src/ui/jobs_view.go` split into `jobs_view.go` + `jobs_toolbar.go` and
`jobs_details.go` to bring it under the ~250 UI file guideline.
- `src/app/operations_test.go` remains at 536 lines (soft limit); revisit when
next editing if file size becomes a barrier.
**Post-Field-Test Cleanup (T6.2)**
Stale diagnostics and obsolete compatibility code removed:
- Removed autostart-migration code.
- Cleaned `.gitignore` and `.dockerignore` of YAML import rules.
- Kept startup-timing History instrumentation for future performance tracking.
**Delivery And Packaging (T7.1, T7.2)**
Portable distribution variants complete:
- Windows portable `.zip`: `scripts\package-windows.bat` builds and bundles
`gosentry.exe`, `README.md`, and `CHANGELOG.md`.
- Linux portable `.tar.gz`: `scripts/package-linux.sh` builds `linux-amd64`
natively and `linux-arm64` via cross-compilation.
Both formats bundle files at the archive root for direct extraction and use.
_No open roadmap items. Release 0.10.0 closed out the refactoring follow-ups,
post-field-test cleanup, and portable packaging work._