67 Commits

Author SHA1 Message Date
9593a43cc0 make-homepage-testable (#42)
Some checks failed
Run unit tests / run-unit-tests (push) Has been cancelled
Add logging and tests for the homepage and settings page. Make both support dependency injection.

Reviewed-on: https://gitea.subcultureofone.org/greg/tkr/pulls/42
Co-authored-by: Greg Sarjeant <greg@subcultureofone.org>
Co-committed-by: Greg Sarjeant <greg@subcultureofone.org>
2025-08-02 01:43:48 +00:00
879bd9ff9f Move route logging to router and log missing routes as warnings. 2025-08-01 14:21:28 -04:00
a7e79796fa Add log viewer and tests for the logs and the viewer (#41)
Now that I'm adding more logging, I wanted to add a log viewer so people don't have to ssh to their servers to inspect logs. Also added tests around logging and the viewer.

Reviewed-on: https://gitea.subcultureofone.org/greg/tkr/pulls/41
Co-authored-by: Greg Sarjeant <greg@subcultureofone.org>
Co-committed-by: Greg Sarjeant <greg@subcultureofone.org>
2025-08-01 01:52:45 +00:00
dc0abf8c7c Add debug logging to feeds. Add route info to all debug logs. (#39)
Reviewed-on: https://gitea.subcultureofone.org/greg/tkr/pulls/39
Co-authored-by: Greg Sarjeant <greg@subcultureofone.org>
Co-committed-by: Greg Sarjeant <greg@subcultureofone.org>
2025-07-31 13:19:35 +00:00
8b5a249450 Make URL building more resilient and add tests. (#38)
Some checks failed
Run unit tests / run-unit-tests (push) Has been cancelled
Since the base URL and base path are user inputs, I'd like tkr to be resilient to any combination of leading and trailing slashes so people don't have to worry about that. This adds some helper functions to normalize URLs and adds tests to confirm that all combinations are handled correctly.

Reviewed-on: https://gitea.subcultureofone.org/greg/tkr/pulls/38
Co-authored-by: Greg Sarjeant <greg@subcultureofone.org>
Co-committed-by: Greg Sarjeant <greg@subcultureofone.org>
2025-07-31 02:39:09 +00:00
a9f610fc60 Make home page similar to feeds. Simplify tick retrieval. (#37)
Reviewed-on: https://gitea.subcultureofone.org/greg/tkr/pulls/37
Co-authored-by: Greg Sarjeant <greg@subcultureofone.org>
Co-committed-by: Greg Sarjeant <greg@subcultureofone.org>
2025-07-31 01:30:25 +00:00
dc63d70944 Refactor feeds to be more testable and to remove templates. (#36)
Some checks are pending
Run unit tests / run-unit-tests (push) Waiting to run
Move feed generation into generator classes and out of templates. Remove feed templates, since they don't have any UI elements.

Reviewed-on: https://gitea.subcultureofone.org/greg/tkr/pulls/36
Co-authored-by: Greg Sarjeant <greg@subcultureofone.org>
Co-committed-by: Greg Sarjeant <greg@subcultureofone.org>
2025-07-31 00:05:46 +00:00
bb58e09cbf add-runtime-logging (#35)
Some checks failed
Run unit tests / run-unit-tests (push) Waiting to run
Prerequisites Testing / test-php-version-requirements (7.4) (push) Has been cancelled
Prerequisites Testing / test-php-version-requirements (8.1) (push) Has been cancelled
Prerequisites Testing / test-php-version-requirements (8.2) (push) Has been cancelled
Prerequisites Testing / test-php-version-requirements (8.3) (push) Has been cancelled
Prerequisites Testing / test-extension-progression (alpine:latest, 8.2) (push) Has been cancelled
Prerequisites Testing / test-extension-progression (alpine:latest, 8.3) (push) Has been cancelled
Prerequisites Testing / test-extension-progression (debian:bookworm, 8.2) (push) Has been cancelled
Prerequisites Testing / test-extension-progression (debian:bookworm, 8.3) (push) Has been cancelled
Prerequisites Testing / test-extension-progression (fedora:39, 8.2) (push) Has been cancelled
Prerequisites Testing / test-extension-progression (fedora:39, 8.3) (push) Has been cancelled
Prerequisites Testing / test-permission-scenarios (push) Has been cancelled
Set up logging framework and add runtime logging to foundational operations (database, sessions, auth).

Reviewed-on: https://gitea.subcultureofone.org/greg/tkr/pulls/35
Co-authored-by: Greg Sarjeant <greg@subcultureofone.org>
Co-committed-by: Greg Sarjeant <greg@subcultureofone.org>
2025-07-29 22:45:17 +00:00
dc44d51479 Add posix_getuid detection to the right place.
Some checks are pending
Prerequisites Testing / test-php-version-requirements (7.4) (push) Waiting to run
Prerequisites Testing / test-php-version-requirements (8.1) (push) Waiting to run
Prerequisites Testing / test-php-version-requirements (8.2) (push) Waiting to run
Prerequisites Testing / test-php-version-requirements (8.3) (push) Waiting to run
Prerequisites Testing / test-extension-progression (alpine:latest, 8.2) (push) Waiting to run
Prerequisites Testing / test-extension-progression (alpine:latest, 8.3) (push) Waiting to run
Prerequisites Testing / test-extension-progression (debian:bookworm, 8.2) (push) Waiting to run
Prerequisites Testing / test-extension-progression (debian:bookworm, 8.3) (push) Waiting to run
Prerequisites Testing / test-extension-progression (fedora:39, 8.2) (push) Waiting to run
Prerequisites Testing / test-extension-progression (fedora:39, 8.3) (push) Waiting to run
Prerequisites Testing / test-permission-scenarios (push) Waiting to run
Run unit tests / run-unit-tests (push) Waiting to run
2025-07-27 15:33:15 -04:00
3c0f2a2ca5 Skip root test if POSIX PHP extension not installed (e.g. alpine) 2025-07-27 15:14:34 -04:00
64e2ff56da add instructions for setting permissions when CLI is run as root. 2025-07-27 14:50:42 -04:00
fb0b58dcbf Don't recomment curl php extension. 2025-07-27 14:20:32 -04:00
6337fa2dfb Add Prerequisite class and cli script to confirm prereqs. (#30)
Add a Prerequisite class to manage all initilaization prerequisites. Invoke before each request. Provide a CLI script to allow checking Prereqs from command line. Add CI  workflow to confirm prereq validation behavior.

Reviewed-on: https://gitea.subcultureofone.org/greg/tkr/pulls/30
Co-authored-by: Greg Sarjeant <greg@subcultureofone.org>
Co-committed-by: Greg Sarjeant <greg@subcultureofone.org>
2025-07-27 16:43:09 +00:00
4255f46fc7 Fix database migrations for first-time setup. (#29)
Some checks failed
Run unit tests / run-unit-tests (push) Has been cancelled
The database initialization had a number of bugs for the first-time setup. This PR fixes them.

Reviewed-on: https://gitea.subcultureofone.org/greg/tkr/pulls/29
Co-authored-by: Greg Sarjeant <greg@subcultureofone.org>
Co-committed-by: Greg Sarjeant <greg@subcultureofone.org>
2025-07-26 15:46:06 +00:00
edd7f6effe Closes #24 (#27)
Some checks failed
Run unit tests / run-unit-tests (push) Has been cancelled
Build and publish artifacts / build-and-publish (push) Has been cancelled
Remove all references to `storage/ticks`, including code that migrates those files.

Reviewed-on: https://gitea.subcultureofone.org/greg/tkr/pulls/27
Co-authored-by: Greg Sarjeant <greg@subcultureofone.org>
Co-committed-by: Greg Sarjeant <greg@subcultureofone.org>
2025-07-24 19:53:12 +00:00
3867bc36cf Closes #25 (#26)
Some checks failed
Build and publish artifacts / build-and-publish (push) Has been cancelled
Run unit tests / run-unit-tests (push) Has been cancelled
Co-authored-by: Greg Sarjeant <1686767+gsarjeant@users.noreply.github.com>
Reviewed-on: https://gitea.subcultureofone.org/greg/tkr/pulls/26
2025-07-24 18:49:32 +00:00
b40a4dce18 Remove no-longer-used settings (#23)
Some checks are pending
Run unit tests / run-unit-tests (push) Waiting to run
Simplifying the app.

The "about" profile field is somewhat redundant. There's already a site title and description.
I'm removing mood emoji from the ticks and just using the user-level mood. That toggle is no longer necessary.

Co-authored-by: Greg Sarjeant <1686767+gsarjeant@users.noreply.github.com>
Reviewed-on: https://gitea.subcultureofone.org/greg/tkr/pulls/23
2025-07-24 13:28:47 +00:00
Greg Sarjeant
c7acca6bb3 Fix validation error and bootstrap order of operations issue.
Some checks are pending
Run unit tests / run-unit-tests (push) Waiting to run
2025-07-23 23:27:02 -04:00
9338332536 refactor-storage (#19)
Move ticks from filesystem into database.

I'm going to preserve the filesystem and just delete it manually. I'll add a login warning, but I'm pretty sure I'm the only person who'll ever be affected by this.

Co-authored-by: Greg Sarjeant <1686767+gsarjeant@users.noreply.github.com>
Reviewed-on: https://gitea.subcultureofone.org/greg/tkr/pulls/19
2025-07-24 02:12:31 +00:00
Greg Sarjeant
7b7f8d205d Convert test to use DataProvider. Add cleanup TODO to relativeTime 2025-07-07 08:48:29 -04:00
Greg Sarjeant
81123945f4 remove unused fuction 2025-07-04 21:42:35 -04:00
Greg Sarjeant
5998e7f7d3 simplify bootstrap. move validation to classes. 2025-06-30 08:43:45 -04:00
Greg Sarjeant
0e34bd3119 Fix invalid HTML on CSS page. Fix ConfigModel. 2025-06-23 14:32:41 -04:00
Greg Sarjeant
4712aa8da6 Make mood picker tab-navigable. Other cleanup. 2025-06-23 11:33:37 -04:00
Greg Sarjeant
d4f6b16756 Enable strict accessibility toggle on navbar and homepage. 2025-06-23 09:21:51 -04:00
Greg Sarjeant
35033e50a6 Add tick mood display. 2025-06-23 09:06:55 -04:00
Greg Sarjeant
efe9688289 Add database migration. Add accessibility and mood settings. Add mood to tick format. 2025-06-23 08:17:38 -04:00
Greg Sarjeant
4ce938e7bc Fix frontpage keyboard navigation. More cleanup. 2025-06-20 22:37:54 -04:00
Greg Sarjeant
9eafadde2f Accessibility improvements and simplification. Fix ticks. 2025-06-20 20:31:42 -04:00
Greg Sarjeant
d94bf1e3b9 Simplify default css. 2025-06-19 22:27:35 -04:00
Greg Sarjeant
a3a6471ced Remove a bunch of trailing whitespace. 2025-06-17 22:08:50 -04:00
Greg Sarjeant
f72896892b cleanup. Improve homepage semantics. Add .htaccess files to blocked directories. 2025-06-17 16:25:31 -04:00
Greg Sarjeant
b59526c590 Clean up escaping, linking, and feeds. 2025-06-16 19:36:36 -04:00
Greg Sarjeant
856677659e Add flash messages. 2025-06-16 16:47:35 -04:00
Greg Sarjeant
0b4348f14b Fix setup 2025-06-15 22:48:43 -04:00
Greg Sarjeant
bc483294ce consolidate POST session validation. 2025-06-15 15:10:03 -04:00
Greg Sarjeant
083250adc0 Restore atom feed to last working version. Escape late. 2025-06-14 15:35:43 -04:00
Greg Sarjeant
0f0cfb5b22 Some feed fixes. Think atom is still broken. 2025-06-14 14:17:49 -04:00
Greg Sarjeant
427558bd8c Clean up emoji model and sidebar. Fix some validation errors. Allow mood to be cleared. 2025-06-14 13:05:18 -04:00
Greg Sarjeant
3b8d54460c Single column delete view, test for mbstring extension 2025-06-14 00:23:59 -04:00
Greg Sarjeant
8f2534568d custom emoji 2025-06-13 23:46:33 -04:00
Greg Sarjeant
52a77a3dc2 Convert config and user to globals. 2025-06-12 22:09:26 -04:00
Greg Sarjeant
2aecc934f2 Clean up setup validation. 2025-06-12 21:54:18 -04:00
Greg Sarjeant
80b2b647c9 More commenting. 2025-06-12 17:09:27 -04:00
Greg Sarjeant
093ece581c Move router to class. Fix CSS uploads. 2025-06-12 17:06:18 -04:00
Greg Sarjeant
2c330efc64 Missed a file. 2025-06-12 16:50:25 -04:00
Greg Sarjeant
3fbeaf87e3 Refactor bootstrap. Use global database. 2025-06-12 16:47:03 -04:00
Greg Sarjeant
10357f78ff Initialize css reference properly. 2025-06-10 20:26:11 -04:00
Greg Sarjeant
4f5ea22dfd Add CSS upload. Refactor templates. General cleanup. 2025-06-10 20:00:18 -04:00
Greg Sarjeant
3690317206 Refactor models. Handle empty ticks. Prep for CSS upload. 2025-06-09 14:12:59 -04:00