Skip to content

Every analytics tool wants a subscription. And your data. I built Twiligent instead. YouTube stats. Instagram stats. One dashboard. Runs locally on your machine.

docs: record scheduling guidance, atomic claims and admin contact

spacesdrive2640cb2d6e5c
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 9a2c4ce..bfecfc5 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -20,8 +20,13 @@ Format follows [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
- UI copy in sentence case, without exclamation marks; error messages say what to do next
- Charts use the brand data-visualisation series in both themes
+### Fixed
+
+- The Worker cron and the GitHub Actions workflow could both publish the same scheduled post; posts are now claimed atomically
+
### Removed
+- The unused GitHub personal access token field and its guide in Settings (nothing used the token)
- Legacy root `public/` dashboard, unmounted `trackedPosts.js` route, unused Redis OAuth helpers, unused shadcn block templates and the unused Geist font package
- Duplicated helpers merged: platform badges and avatars, account paths, chart styling, filter tiers, pagination, Reddit post table, `safeAccount()`, Instagram publishing parameters
@@ -36,6 +41,11 @@ Format follows [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
### Added
**Redesign additions**
+- Scheduled publishing guide in Settings: how it works for users, and administrator setup for the server cron and the optional GitHub Actions backup, with direct links to the repository's secrets and workflow pages
+- Publish explains when scheduled posts go out and warns when posts are overdue, with the administrator contact
+- Instagram tester guide wherever Instagram is connected: email the administrator, accept the invite, then connect
+- `VITE_ADMIN_EMAIL` sets the administrator contact shown in the app
+- Theme changes cross-fade the whole page in one step
- Command palette (Ctrl+K or Cmd+K) for pages, accounts, categories, theme and actions
- Hold-to-confirm for removing accounts, untracking content and deleting scheduled posts
- `/accounts?add=1` opens the add-account flow directly
diff --git a/DECISIONS.md b/DECISIONS.md
index 3444cc3..6a3c057 100644
--- a/DECISIONS.md
+++ b/DECISIONS.md
@@ -542,3 +542,18 @@ Records every significant architectural decision, the alternatives considered, a
**Trade-offs:**
- `scripts/publish-scheduled.js` still has its own copy of the publishing logic. It runs in GitHub Actions with zero npm dependencies and cannot import Worker modules.
- The root `package.json` (an Express setup with no server file) is left in place because it also pins the shadcn CLI used from the repository root.
+
+---
+
+## ADR-025: Scheduling guidance in the app, atomic post claims, configurable administrator contact
+
+**Date:** 2026-10-13
+**Status:** Accepted
+
+**Decision:** Settings explains scheduled publishing for users and gives administrators exact setup steps for the Worker cron and the optional GitHub Actions backup. The GitHub personal access token field is removed because no code reads it; only the repository owner and name are kept, to build direct links. Both schedulers claim a post with an update filtered on `status = 'pending'` and skip it when no row changes. The administrator contact shown for Instagram tester requests and overdue posts comes from `VITE_ADMIN_EMAIL`, defaulting to [email protected].
+
+**Context:** The previous guide asked people to create a token with write access to repository secrets, which nothing used. The scheduling doc described an atomic claim that the code did not implement, so the two schedulers could double-publish. Instagram tester access in development mode had no path for people who are not the app owner.
+
+**Trade-offs:**
+- Saving the GitHub section now clears any previously stored token. That token was never used.
+- The default contact address is specific to the original deployment; other self-hosters should set `VITE_ADMIN_EMAIL`.