Commit graph

26 commits

Author SHA1 Message Date
SW
68911b3af4 chore: rename module path to git.janvete.com/seth/caddyview
All checks were successful
Release / release (push) Successful in 1m4s
The repo lives on Forgejo; the github.com module path was a leftover
identifier. No functional change.
2026-10-17 22:42:21 +02:00
SW
b229cfe264 feat: support aes256-gcm@openssh.com encrypted private keys
x/crypto/ssh only supports aes256-ctr/cbc for private key encryption,
so keys exported from 1Password (aes256-gcm) could not be decrypted even
with the correct passphrase. Decrypt the openssh-key-v1 blob ourselves
(bcrypt_pbkdf ported from x/crypto's internal package, AES-256-GCM via
stdlib, auth tag stored as raw bytes after the encrypted block) and
re-marshal it as an unencrypted key for ssh.ParsePrivateKey.
2026-10-17 22:42:21 +02:00
SW
b3ba967353 fix: prompt for passphrase on encrypted SSH keys
All checks were successful
Release / release (push) Successful in 1m20s
ParsePrivateKey failures were silently skipped, so a passphrase-protected
~/.ssh/id_ed25519 was reported as 'no key files found' on hosts without
an SSH agent. Detect PassphraseMissingError and ask for the passphrase
interactively (up to 3 attempts) before the TUI starts; make the final
error distinguish missing files from unloadable ones.
2026-10-17 21:56:11 +02:00
SW
4acdfeaa87 feat: mouse wheel scrolling in errors tab
All checks were successful
Release / release (push) Successful in 47s
2026-09-10 13:52:55 +02:00
SW
9991f887b0 fix: parse error timestamps as float
All checks were successful
Release / release (push) Successful in 47s
2026-09-10 13:45:28 +02:00
088024ad9c ci: mount deploy key from /opt/runner/keys instead of /root/.ssh
All checks were successful
Release / release (push) Successful in 56s
Runner mel valid_volumes: [], takze mount /root/.ssh se tise zahazoval
a job container klic nikdy nedostal. Klic presunut do vyhrazeneho
adresare /opt/runner/keys, ktery je jako jediny povoleny v runner configu.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-09-10 13:26:42 +02:00
SW
3643430798 ci: mount runner .ssh into container
Some checks failed
Release / release (push) Failing after 6s
2026-09-10 13:10:22 +02:00
SW
383d14e155 ci: add SSH debug, use HOME path for key
Some checks failed
Release / release (push) Failing after 15s
2026-09-10 12:53:47 +02:00
SW
30d6cd26d6 ci: run directly on runner using its SSH key
Some checks failed
Release / release (push) Failing after 13s
2026-09-10 12:34:29 +02:00
SW
71f752c46e ci: use SSH key for tap and apt push
Some checks failed
Release / release (push) Failing after 5s
2026-09-10 11:27:04 +02:00
SW
5abee4c3bb ci: use username seth in HTTPS git URLs
Some checks failed
Release / release (push) Failing after 45s
2026-09-10 11:14:37 +02:00
SW
164c562f9f ci: handle existing release in workflow
Some checks failed
Release / release (push) Failing after 45s
2026-09-10 10:29:20 +02:00
SW
6d01888c85 ci: build .deb, update Forgejo tap and APT repo\n\n- Add .deb build for linux/amd64 and upload as release asset.\n- Update Homebrew tap on Forgejo (seth/homebrew-tools).\n- Update APT repository on Forgejo (seth/apt).\n- Update README with new install instructions.
Some checks failed
Release / release (push) Failing after 44s
2026-09-10 10:06:17 +02:00
SW
06b90d94a4 ci: fix GitHub PAT URL format for tap update 2026-09-10 09:20:06 +02:00
SW
8d60e9c745 feat: incremental history cache, errors tab, Forgejo migration
Some checks failed
Release / release (push) Failing after 53s
- Cache current log file incrementally by line count/inode to avoid
  re-processing the whole file every refresh.
- Collect 4xx/5xx errors during aggregation and add [4] ERRORS tab.
- Update README URLs and brew tap to point to git.janvete.com.
- Replace GitHub Actions workflow with Forgejo Actions release workflow.
2026-09-10 09:10:14 +02:00
edc48c2953
Add README.md for Caddyview installation and usage 2026-06-13 19:48:54 +02:00
378ccc1a28 ci: push formula to shared homebrew-tools tap
Tap was renamed from homebrew-caddyview to homebrew-tools and now
hosts formulae for multiple tools. Workflow URL updated.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-06-13 16:20:02 +02:00
SW
7c6adbc17e fix: rework history aggregation, live streaming and visual refresh
History was effectively frozen: the find pattern 'access.log*' never
matched Caddy's native rotation naming (access-<ts>.log.gz), so rotated
files were invisible and the server-side cache - invalidated only by new
.gz files - never refreshed after the first load.

- match both Caddy native (access-*.log.gz) and logrotate (access.log.N)
  rotation naming
- cache aggregation per rotated file (immutable, scanned exactly once);
  always scan the current log fresh, so history never goes stale
- always bucket hourly on the server, re-bucket client-side so all tabs
  share the same caches
- cap IPs at top 50 per file so output stays small on busy servers
- aggregate request duration so history shows real avg response time
- tail -F instead of -f: Caddy rotates by rename, which silently killed
  the live stream at every rotation on high-traffic servers
- process live lines in batches instead of one Update cycle per line
- fetch CPU/MEM stats every 5s instead of every second
- stable sort in topN: equal counts no longer flicker and swap rows
- drop the 1 Month tab (Live / 1 Day / 1 Week remain)
- retro green-phosphor CRT look: double borders, ▓░ bars, amber accents

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-06-12 21:30:38 +02:00
SW
fb09f6e028 perf: server-side result caching for history aggregation
Cache awk output in /tmp on the remote server, keyed by log path and
bucket size. Cache is invalidated only when a new rotated .gz file
appears, making repeated loads instant (0.001s vs 4s cold run).

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-11 21:09:12 +02:00
SW
2be12c24cd perf: server-side awk aggregation for history views
High-traffic servers (100+ req/s) generated millions of log lines
per day. Transferring raw lines over SSH was impractical (GB of data).

Instead, run an awk script on the server that aggregates all matching
log files (including .gz rotated ones) into time buckets and returns
only a ~50-line summary. For a server doing 180 req/s this reduces
SSH transfer from ~7GB to <1KB per history request.

The awk script filters by timestamp, groups by bucket, and outputs:
- per-bucket request counts, bytes, and status code groups
- top hosts and IPs with counts
- overall totals

Files are pre-filtered with find -mtime to skip archives older than
the requested window.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-11 14:50:51 +02:00
SW
da6a128882 fix: auto-refresh history tabs every 5 minutes
History tabs were loaded once at first visit and never updated,
causing 1 Day/Week/Month to show fewer requests than the live view.

- Silent background refresh every 5 min for the active history tab
- Re-check on tab switch: reload if data is older than 5 min
- Spinner only on first load; subsequent refreshes keep old data visible
- Chart title shows "updated X ago" so freshness is always visible

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-11 14:26:08 +02:00
SW
1501b15a9d fix: use SSH agent for authentication
Try SSH_AUTH_SOCK agent first (handles macOS Keychain, ssh-add, and
custom key paths configured in the shell). Fall back to common key
file names (id_ed25519, id_ecdsa, id_rsa) if no agent is available.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-11 10:16:28 +02:00
SW
c6657daa96 ci: add automated release workflow
On git tag v*, builds darwin-arm64/amd64 and linux-amd64 binaries,
creates GitHub Release, and auto-updates homebrew-caddyview formula.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-11 10:10:04 +02:00
SW
006c6b4cfc chore: add MIT license 2026-06-11 10:01:07 +02:00
SW
b25badb5c8 feat: add history views with bar chart and tab navigation
Tabs 1-4 switch between Live, 1 Day, 1 Week, 1 Month views.
History loads on demand via SSH by reading rotated log files
(access.log, access.log.1, access.log.2.gz, ...) filtered by
timestamp on the remote side using awk.

Bar chart shows requests per time bucket (1h/6h/24h depending
on window). Bottom panels show period stats, top hosts, top IPs,
and status codes — consistent across all views.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-11 09:59:27 +02:00
SW
0c57089abf feat: initial caddyview implementation
SSH-connected TUI monitor for Caddy web server logs.
Live view with 1s refresh, request stats, top hosts/IPs,
status codes, transfer speed, CPU and RAM from /proc.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-11 09:50:09 +02:00