Commit graph

19 commits

Author SHA1 Message Date
Troll (Hermes Agent)
4b48e0a44f Fix TypeError when revision_count is stored as TEXT
The previous schema migration added revision_count as TEXT. SQLite stores
the default as TEXT, but the app does integer arithmetic on it, causing:

  TypeError: unsupported operand type(s) for -: 'int' and 'str'

- init_db() now adds revision_count as INTEGER.
- app.py casts revision_count to int in play() and revise() and when
  incrementing in revise(), so existing TEXT values also work.

Bump version 0.4.2 -> 0.4.3.
2026-08-05 14:25:07 +00:00
Troll (Hermes Agent)
f5d3d487af Fix 500 on /play/<token>/revise for missing revision_count column
Deployed DBs persisted without the revision_count column / revision_history
table, causing customer revision requests to 500.

- init_db() now migrates existing tables by adding missing columns.
- log_revision() falls back to init_db() on missing table for full repair.
- Bump version 0.4.1 -> 0.4.2.
2026-08-05 13:51:53 +00:00
Troll (Hermes Agent)
3f9de1449c Fix 500 on customer revision when revision_history table is missing
Deployed databases can persist without the revision_history table,
causing /play/<token>/revise to crash with sqlite3.OperationalError.

- log_revision() now creates the table on the fly if it is missing.
- app.py runs init_db() at import time (safe CREATE TABLE IF NOT EXISTS)
  so new deployments auto-create missing tables on startup.

Bump patch version 0.4.0 -> 0.4.1.
2026-08-05 13:42:10 +00:00
Troll (Hermes Agent)
51f7ffd5ab Add revision prompt copy button for Hermes on admin request page
When a request has revision_note set, the operator now sees a
'Copy revision prompt for Hermes' button in the revision note box.
It copies a prompt that includes:
- the original customer brief,
- the previously generated title/style/lyrics,
- the customer's revision request,
- the signed callback URL and expected JSON shape.

Minor version bump: 0.3.0 → 0.4.0.
2026-08-05 03:25:34 +00:00
Troll (Hermes Agent)
da6df64fbf Update README with current version v0.3.0 2026-08-05 03:19:00 +00:00
Troll (Hermes Agent)
b8ddff9afe Update README and REVIEW with all new features (kiosk, pricing, cancelled status, revision history, stems, sales, backups) 2026-08-04 20:46:47 +00:00
Troll (Hermes Agent)
6a60aa686c feat: Hermes prompt callback endpoint + API key management
- Add /api/prompt/<rid> callback endpoint with dual auth:
  per-request signed URL token + Bearer API key.
- Add HERMES_API_KEY config and runtime key helpers in app.py.
- Update admin request page to copy request details + callback URL.
- Add API key management to admin settings: regenerate, mask, show-once.
- Update .env.example, docker-compose.yml, README, REVIEW docs.
2026-08-03 17:16:56 +00:00
Troll (Hermes Agent)
3e25c3638b feat: add operator-only notes field per request 2026-08-02 22:10:42 +00:00
Troll (Hermes Agent)
2ac99fde8b feat: add /status order lookup page linked from request form 2026-08-02 22:00:27 +00:00
Troll (Hermes Agent)
5e26650b90 feat: add booth open/closed toggle on settings page 2026-08-02 18:17:59 +00:00
Troll (Hermes Agent)
023b4fade7 feat: add /faq page and link from request form 2026-08-02 17:31:08 +00:00
Troll (Hermes Agent)
bf9f9e09fd feat: editable customer email in admin + email validation on public form 2026-08-02 16:51:32 +00:00
Troll (Hermes Agent)
4af9322c9d docs: update comments and README to reflect current feature set
- Refresh app.py module and route docstrings for runtime settings,
  MP3 tagging, rate limiting, revision workflow, and admin actions.
- Clarify config.py and models.py comments.
- Update template comments/CSS for dashboard filters, request detail,
  player page, and settings page.
- Rewrite README.md with current features, status flow, file layout,
  deployment variables, and troubleshooting.
- Refresh REVIEW.md quick-reference.
- Add MAX_REVISIONS to docker-compose.yml environment list.
- Expand requirements.txt comment coverage.

No version history or changelog included.
2026-08-02 00:07:24 +00:00
Troll (Hermes Agent)
b4f0222bd5 Add comprehensive comments to all source files and expand documentation 2026-07-31 22:23:40 +00:00
Troll (Hermes Agent)
1ad02023c2 Remove env_file from docker-compose; use Portainer environment variables directly 2026-07-31 20:50:14 +00:00
Troll (Hermes Agent)
3ef8aaf45a Make internal and host ports configurable via env vars 2026-07-31 20:43:36 +00:00
Troll (Hermes Agent)
fa01ac0f32 Use plain admin password and remove operator email alerts; admin dashboard is the queue 2026-07-31 20:27:14 +00:00
Troll (Hermes Agent)
7acf7bcca9 Switch deployment target from Unraid to Portainer; update docker-compose and docs 2026-07-31 19:51:38 +00:00
Troll (Hermes Agent)
c16d48ee32 Initial prototype for theme song booth 2026-07-31 19:47:52 +00:00