docs: correct the claims that no longer match the code
Four documents asserted things the code contradicts. ARCHITECTURE's component diagram had the UI calling the autostart Manager directly. It does not, and must not: src/ui holds no reference to the package at all — Settings reads svc.AutostartStatus(), like everything else it reads. The edge is folded into the existing ui→Service one, so the diagram no longer draws the exception to the project's own rule. platform/desktop was described in both ARCHITECTURE and DEVELOPMENT as a "display-scale helper". It installs the .desktop entry and icon under XDG data home; there is no scale helper in it. The ~250-line file guideline was written as though the jobs_view and settings_view splits had settled it. Both files are over it again and history_view.go has never been split, so the guideline is now stated as the target it is, with the current state named rather than implied. STANDARDS pointed at a "CI coverage gate" item that ROADMAP does not have, while omitting the two it does. README's gosentry.json sample was three keys short of what the app writes on first run — default_timeout_seconds, theme and job_list_view — which made the one file the user is invited to hand-edit the least accurate thing in the document. The sample is now the real default (verified by marshalling DefaultConfig), with the keys explained, including why a zero timeout is written out and an unset one is not. The per-job overrides for overlap policy and timeout were undocumented despite being in the job dialog, and the feature list had not caught up with the timeout, the theme, or the compact job list. Version numbers in example output paths are now <version>, matching how the CI section already wrote them, so they cannot go stale again. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
@@ -25,13 +25,15 @@ creating, grouping, pausing, running, and monitoring scheduled shell commands.
|
|||||||
- Job definitions stored in a clean, hand-editable `jobs.json`.
|
- Job definitions stored in a clean, hand-editable `jobs.json`.
|
||||||
- `@every` intervals and standard 5-field cron expressions.
|
- `@every` intervals and standard 5-field cron expressions.
|
||||||
- Manual and scheduled command runs.
|
- Manual and scheduled command runs.
|
||||||
- Parallel or sequential execution mode; configurable overlap policy (skip or queue).
|
- Parallel or sequential execution mode; overlap policy (skip or queue) set globally or per job.
|
||||||
|
- Run timeout, off by default, set globally or per job.
|
||||||
- Per-run `.log` files with stdout/stderr capture.
|
- Per-run `.log` files with stdout/stderr capture.
|
||||||
- Log cleanup by maximum file count and maximum age.
|
- Log cleanup by maximum file count and maximum age.
|
||||||
- Global pause/resume for scheduled job execution (manual runs remain available).
|
- Global pause/resume for scheduled job execution (manual runs remain available).
|
||||||
- Desktop notifications on job failure.
|
- Desktop notifications on job failure.
|
||||||
- Windows tray icon: left-click to show the window, right-click for the menu.
|
- Windows tray icon: left-click to show the window, right-click for the menu.
|
||||||
- Autostart on login (Windows shortcut; Linux XDG desktop entry).
|
- Autostart on login (Windows shortcut; Linux XDG desktop entry).
|
||||||
|
- Detailed or compact job list, and a default or branded theme; both are remembered.
|
||||||
|
|
||||||
## Platforms
|
## Platforms
|
||||||
|
|
||||||
@@ -70,10 +72,22 @@ portable application: moving the program folder also moves its configuration.
|
|||||||
"keep_running_in_tray": true,
|
"keep_running_in_tray": true,
|
||||||
"notify_on_failure": true,
|
"notify_on_failure": true,
|
||||||
"execution_mode": "parallel",
|
"execution_mode": "parallel",
|
||||||
"overlap_policy": "skip"
|
"overlap_policy": "skip",
|
||||||
|
"default_timeout_seconds": 0,
|
||||||
|
"theme": "default",
|
||||||
|
"job_list_view": "detailed"
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
|
That is the file GoSentry writes on first run. `default_timeout_seconds` is the
|
||||||
|
run timeout applied to jobs that do not set their own; `0` means no timeout, and
|
||||||
|
it is written out even though it is zero, because a missing value and a
|
||||||
|
deliberate "no timeout" have to stay distinguishable in a hand-edited file.
|
||||||
|
`theme` is `default` or `gosentry` (the branded teal/amber look), and
|
||||||
|
`job_list_view` is `detailed` or `compact` — both are remembered from the
|
||||||
|
choices made in the app. Keys left at their off value (`start_on_login`,
|
||||||
|
`paused`) are omitted until they are turned on.
|
||||||
|
|
||||||
`jobs.json` stores job definitions:
|
`jobs.json` stores job definitions:
|
||||||
|
|
||||||
```json
|
```json
|
||||||
@@ -159,8 +173,8 @@ without opening the main window.
|
|||||||
|
|
||||||
## Queue Settings
|
## Queue Settings
|
||||||
|
|
||||||
Two settings in the **Queue** group of the Settings tab control how simultaneous
|
Three settings in the **Queue** group of the Settings tab control how
|
||||||
and overlapping runs are handled.
|
simultaneous, overlapping, and over-long runs are handled.
|
||||||
|
|
||||||
**Execution mode** — applies when multiple jobs become due at the same tick:
|
**Execution mode** — applies when multiple jobs become due at the same tick:
|
||||||
|
|
||||||
@@ -169,14 +183,25 @@ and overlapping runs are handled.
|
|||||||
| `parallel` (default) | All due jobs start at the same time. |
|
| `parallel` (default) | All due jobs start at the same time. |
|
||||||
| `sequential` | Due jobs are started one after another, in the order they appear in the list. |
|
| `sequential` | Due jobs are started one after another, in the order they appear in the list. |
|
||||||
|
|
||||||
**Overlap policy** — applies when a job's next scheduled run fires while its
|
**Default overlap policy** — applies when a job's next scheduled run fires while
|
||||||
previous run is still active:
|
its previous run is still active:
|
||||||
|
|
||||||
| Value | Behaviour |
|
| Value | Behaviour |
|
||||||
|-------|-----------|
|
|-------|-----------|
|
||||||
| `skip` (default) | The new run is discarded; the running instance continues. |
|
| `skip` (default) | The new run is discarded; the running instance continues. |
|
||||||
| `queue` | The new run is held and starts immediately after the current run finishes. |
|
| `queue` | The new run is held and starts immediately after the current run finishes. |
|
||||||
|
|
||||||
|
**Default timeout (s)** — how long a run may take before it is killed. `0` (the
|
||||||
|
default) means no limit.
|
||||||
|
|
||||||
|
The last two are defaults: a job's own dialog has an **Overlap policy** and a
|
||||||
|
**Timeout (s)** field that override them. A job that overrides nothing follows
|
||||||
|
whatever the Settings tab says, so changing a default moves every such job with
|
||||||
|
it. In `jobs.json` an override is an `overlap_policy` or `timeout_seconds` key
|
||||||
|
on the job; absent means inherit. A `"timeout_seconds": 0` on a job is an
|
||||||
|
override too — it means that job has no timeout even when the global default
|
||||||
|
sets one.
|
||||||
|
|
||||||
## Notifications
|
## Notifications
|
||||||
|
|
||||||
When **Notify on failure** is enabled in Settings, GoSentry sends a desktop
|
When **Notify on failure** is enabled in Settings, GoSentry sends a desktop
|
||||||
@@ -197,7 +222,7 @@ Linux:
|
|||||||
[Desktop Entry]
|
[Desktop Entry]
|
||||||
Type=Application
|
Type=Application
|
||||||
Name=GoSentry
|
Name=GoSentry
|
||||||
Exec=/opt/gosentry/gosentry-0.9.0-linux-amd64 --start-in-tray
|
Exec=/opt/gosentry/gosentry-<version>-linux-amd64 --start-in-tray
|
||||||
Terminal=false
|
Terminal=false
|
||||||
```
|
```
|
||||||
|
|
||||||
@@ -238,7 +263,7 @@ Known workaround:
|
|||||||
|
|
||||||
```text
|
```text
|
||||||
dist\windows\
|
dist\windows\
|
||||||
gosentry-0.9.0-windows-amd64.exe
|
gosentry-<version>-windows-amd64.exe
|
||||||
opengl32.dll
|
opengl32.dll
|
||||||
...
|
...
|
||||||
```
|
```
|
||||||
|
|||||||
@@ -17,7 +17,7 @@ src/
|
|||||||
storage/ JSON persistence (gosentry.json, jobs.json)
|
storage/ JSON persistence (gosentry.json, jobs.json)
|
||||||
platform/
|
platform/
|
||||||
autostart/ Manager interface + Windows (shortcut) and Linux (XDG) impls
|
autostart/ Manager interface + Windows (shortcut) and Linux (XDG) impls
|
||||||
desktop/ display-scale helper (Linux only)
|
desktop/ desktop entry + icon under XDG data home (Linux only)
|
||||||
filemanager/ open a folder in the desktop file manager
|
filemanager/ open a folder in the desktop file manager
|
||||||
winproc/ hidden-window startup flags (Windows only)
|
winproc/ hidden-window startup flags (Windows only)
|
||||||
ui/ Fyne windows, tabs, and dialogs; reads service via Events
|
ui/ Fyne windows, tabs, and dialogs; reads service via Events
|
||||||
@@ -40,7 +40,7 @@ flowchart LR
|
|||||||
shell["Platform shell - cmd.exe /C or sh -c"]
|
shell["Platform shell - cmd.exe /C or sh -c"]
|
||||||
|
|
||||||
user -->|"edits jobs, settings, runs commands"| ui
|
user -->|"edits jobs, settings, runs commands"| ui
|
||||||
ui -->|"CreateJob, UpdateJob, DeleteJob, RunNow, UpdateSettings, …"| svc
|
ui -->|"CreateJob, UpdateJob, DeleteJob, RunNow, UpdateSettings, AutostartStatus, …"| svc
|
||||||
svc -->|"SaveJobs, SaveConfig, LoadJobs, LoadConfig"| store
|
svc -->|"SaveJobs, SaveConfig, LoadJobs, LoadConfig"| store
|
||||||
store -->|"read/write"| config
|
store -->|"read/write"| config
|
||||||
store -->|"read/write"| jobs
|
store -->|"read/write"| jobs
|
||||||
@@ -54,7 +54,6 @@ flowchart LR
|
|||||||
svc -->|"emit JobChanged / RunRecorded / JobsLoaded / ErrorOccurred"| ui
|
svc -->|"emit JobChanged / RunRecorded / JobsLoaded / ErrorOccurred"| ui
|
||||||
ui -->|"display jobs, history, status"| user
|
ui -->|"display jobs, history, status"| user
|
||||||
|
|
||||||
ui -->|"SetAutostart, AutostartStatus"| autostart
|
|
||||||
svc -->|"Set / Status via Manager"| autostart
|
svc -->|"Set / Status via Manager"| autostart
|
||||||
```
|
```
|
||||||
|
|
||||||
@@ -64,7 +63,7 @@ flowchart LR
|
|||||||
`cmd/gosentry` calls `ui.Run`, which creates an `app.Service`, opens the
|
`cmd/gosentry` calls `ui.Run`, which creates an `app.Service`, opens the
|
||||||
store, loads `gosentry.json` and `jobs.json`, subscribes the UI to service
|
store, loads `gosentry.json` and `jobs.json`, subscribes the UI to service
|
||||||
events, builds the main window, and calls `Service.Start` to begin the
|
events, builds the main window, and calls `Service.Start` to begin the
|
||||||
scheduler loop. On first launch the service seeds per-job run-time statistics
|
scheduler loop. On every launch the service seeds per-job run-time statistics
|
||||||
from existing log files so the details panel reflects accumulated history
|
from existing log files so the details panel reflects accumulated history
|
||||||
immediately (see §Statistics below).
|
immediately (see §Statistics below).
|
||||||
|
|
||||||
@@ -205,8 +204,9 @@ the moment the window opens.
|
|||||||
|
|
||||||
### `jobs_view.go` file structure
|
### `jobs_view.go` file structure
|
||||||
|
|
||||||
`src/ui/jobs_view.go` is split across three files to stay within the ~250-line
|
The size guideline for a file in this project is ~250 lines. `src/ui/jobs_view.go`
|
||||||
size guideline:
|
is split across three files along these seams; the view file itself has grown
|
||||||
|
back over the guideline since, and is the next candidate if it grows further:
|
||||||
|
|
||||||
| File | Contents |
|
| File | Contents |
|
||||||
|------|----------|
|
|------|----------|
|
||||||
@@ -217,7 +217,8 @@ size guideline:
|
|||||||
### `settings_view.go` file structure
|
### `settings_view.go` file structure
|
||||||
|
|
||||||
`src/ui/settings_view.go` is split across three files the same way, once its
|
`src/ui/settings_view.go` is split across three files the same way, once its
|
||||||
own size passed the ~250-line guideline:
|
own size passed the guideline. `src/ui/history_view.go` is over it too and has
|
||||||
|
not been split:
|
||||||
|
|
||||||
| File | Contents |
|
| File | Contents |
|
||||||
|------|----------|
|
|------|----------|
|
||||||
|
|||||||
+7
-7
@@ -64,7 +64,7 @@ The Windows build is created as a GUI application, so it does not open a termina
|
|||||||
The binary is written to:
|
The binary is written to:
|
||||||
|
|
||||||
```text
|
```text
|
||||||
dist\windows\gosentry-0.9.0-windows-amd64.exe
|
dist\windows\gosentry-<version>-windows-amd64.exe
|
||||||
```
|
```
|
||||||
|
|
||||||
### Linux
|
### Linux
|
||||||
@@ -78,7 +78,7 @@ chmod +x ./scripts/build-linux.sh
|
|||||||
The binary is written to:
|
The binary is written to:
|
||||||
|
|
||||||
```text
|
```text
|
||||||
dist/linux/gosentry-0.9.0-linux-amd64
|
dist/linux/gosentry-<version>-linux-amd64
|
||||||
```
|
```
|
||||||
|
|
||||||
### Linux using Docker
|
### Linux using Docker
|
||||||
@@ -94,7 +94,7 @@ chmod +x ./scripts/build-linux-docker.sh
|
|||||||
The binary is copied to:
|
The binary is copied to:
|
||||||
|
|
||||||
```text
|
```text
|
||||||
dist/linux/gosentry-0.9.0-linux-amd64
|
dist/linux/gosentry-<version>-linux-amd64
|
||||||
```
|
```
|
||||||
|
|
||||||
### Release build from Linux
|
### Release build from Linux
|
||||||
@@ -118,9 +118,9 @@ Non-interactive release builds can pass target names:
|
|||||||
The binaries are copied to:
|
The binaries are copied to:
|
||||||
|
|
||||||
```text
|
```text
|
||||||
dist/linux/gosentry-0.9.0-linux-amd64
|
dist/linux/gosentry-<version>-linux-amd64
|
||||||
dist/linux/gosentry-0.9.0-linux-arm64
|
dist/linux/gosentry-<version>-linux-arm64
|
||||||
dist/windows/gosentry-0.9.0-windows-amd64.exe
|
dist/windows/gosentry-<version>-windows-amd64.exe
|
||||||
```
|
```
|
||||||
|
|
||||||
### Automated release builds (CI)
|
### Automated release builds (CI)
|
||||||
@@ -195,7 +195,7 @@ CGO_ENABLED=1 go run ./cmd/gosentry
|
|||||||
- `src/runner` — shell command execution, log file writing, and log cleanup.
|
- `src/runner` — shell command execution, log file writing, and log cleanup.
|
||||||
- `src/storage` — JSON persistence (`gosentry.json`, `jobs.json`).
|
- `src/storage` — JSON persistence (`gosentry.json`, `jobs.json`).
|
||||||
- `src/platform/autostart` — `Manager` interface with Windows (shortcut) and Linux (XDG) implementations.
|
- `src/platform/autostart` — `Manager` interface with Windows (shortcut) and Linux (XDG) implementations.
|
||||||
- `src/platform/desktop` — display-scale helper (Linux only).
|
- `src/platform/desktop` — desktop entry and icon under XDG data home (Linux only).
|
||||||
- `src/platform/winproc` — hidden-window startup flags (Windows only).
|
- `src/platform/winproc` — hidden-window startup flags (Windows only).
|
||||||
- `src/ui` — Fyne windows, tabs, and dialogs; reads service state through events.
|
- `src/ui` — Fyne windows, tabs, and dialogs; reads service state through events.
|
||||||
- `assets` — app icons embedded into the application binary.
|
- `assets` — app icons embedded into the application binary.
|
||||||
|
|||||||
+3
-2
@@ -69,5 +69,6 @@ change to their shape has to stay compatible on its own.
|
|||||||
|
|
||||||
## Out of scope
|
## Out of scope
|
||||||
|
|
||||||
Larger or blocked work is tracked in [ROADMAP.md](ROADMAP.md) (window size
|
Larger or blocked work is tracked in [ROADMAP.md](ROADMAP.md) (update check from
|
||||||
persistence, History column filters, CI coverage gate).
|
GitHub releases, cron-table import/export, window size persistence, History
|
||||||
|
column filters).
|
||||||
|
|||||||
Reference in New Issue
Block a user