Commit graph

351 commits

Author SHA1 Message Date
636d2dc517
test get scheduled nodes endpoint 2026-05-01 09:58:28 +03:00
0c76773ef0
opencode config 2026-05-01 09:57:20 +03:00
7ec91e3869
reformat ai files 2026-05-01 09:56:25 +03:00
669bcf8d5e
style 2026-05-01 09:56:14 +03:00
e04931ac08
test that todays schedule only returns uncompleted nodes 2026-05-01 09:06:13 +03:00
8eeff2c4fe
add update method to fake scheduled node repo 2026-05-01 09:05:55 +03:00
1b2e44389c
add completed bool to scheduled node 2026-05-01 09:04:18 +03:00
f2840a3eb1
add find by user method in json scheduled node repo 2026-05-01 09:03:52 +03:00
07e34ffd46
add find by user method in plan repo 2026-05-01 09:02:34 +03:00
ec4dca87a6
test that all nodes up until given date are returned 2026-04-28 22:48:25 +03:00
2047cd72e7
test get todays schedule and use case with request 2026-04-28 22:38:43 +03:00
0ea300f4d2
add find by user method for scheduled nodes 2026-04-28 22:37:28 +03:00
a9265abeae
add node to scheduled node 2026-04-27 09:28:43 +03:00
d47a0235d2
add node to scheduled node entity and dto 2026-04-27 09:10:40 +03:00
46d01aa813
test today page lists scheduled nodes 2026-04-26 21:24:56 +03:00
6314f1c38c
add link to today page on home 2026-04-26 21:24:55 +03:00
bfacb5b62c
add today view route and template 2026-04-26 21:24:35 +03:00
0b4d7238af
add today page cypress spec 2026-04-26 20:50:52 +03:00
8eb0f2366b
remove missed default value 2026-04-26 20:43:27 +03:00
041590da15
Merge branch 'auth-and-admin' 2026-04-26 20:05:31 +03:00
b41652af71
remove default value in fake token generator 2026-04-26 10:51:03 +03:00
cd40483cd4
remove default values from user constructors
Forcing every call site to be explicit about admin status and
password eliminates a class of bugs where an unintended
isAdmin=false or empty passwordHash could silently slip through.
The CreateUserTest case that asserted the isAdmin default is
dropped since the default no longer exists.
2026-04-26 10:46:07 +03:00
f95adddaaf
fix code style in test files 2026-04-26 10:45:57 +03:00
13da7c311a
return utc from clock 2026-04-26 10:32:08 +03:00
2fe41a5fe7
no need to test concrete implementations 2026-04-26 10:23:57 +03:00
a65c9259fa
dont cast email to string, use new value method 2026-04-26 10:19:38 +03:00
099883a13d
change em dashes to hyphen and add rule outlawing emdashes 2026-04-26 10:15:03 +03:00
40726c3984
loosen commit granularity rule in prompts
Replace the strict "one commit per file" guidance with grouping by
related changes, while keeping the small-and-focused intent. Add
explicit guidance on when to include a commit body and how to format
it (blank line separator, ~72 col wrap).

Applied to both backend and frontend prompt templates.
2026-04-26 10:11:23 +03:00
bb6bd7cbb3
use FakePasswordHasher in tests to eliminate bcrypt cost
Add a trivial prefix-based PasswordHasher fake and inject it into the
three test files that exercise CreateUser or AuthenticateUser. Drops
the full phpunit suite from ~7.4s to ~30ms (about 224x) without
losing coverage: the round-trip through hash/verify still validates
that CreateUser stores something other than the plaintext and that
AuthenticateUser only succeeds on a matching hash.

CreateUserTest is also refactored to use a setUp method, matching
the pattern already used in AuthenticateUserTest and AuthControllerTest.
2026-04-26 09:06:26 +03:00
632085f5b6
inject PasswordHasher into CreateUser and AuthenticateUser
Replace direct password_hash and password_verify calls with the
injected PasswordHasher so the bcrypt cost can be substituted out
in tests. Production wiring is handled by the container's autowiring
of BcryptPasswordHasher.

This commit alone breaks the test suite because the existing tests
construct these use cases without the new dependency; the next
commit restores green by introducing FakePasswordHasher.
2026-04-26 09:06:21 +03:00
b1247d2fa1
add PasswordHasher interface with bcrypt implementation
Introduce an injectable abstraction over password_hash and
password_verify so callers can be swapped for a fast fake in tests
without paying bcrypt's CPU cost. The bcrypt implementation is a
direct passthrough using PASSWORD_DEFAULT, matching the prior inline
behavior, so existing stored hashes continue to verify.

Wired into the DI container alongside the other auth primitives
(Clock, TokenGenerator). No callers reference it yet, so production
behavior is unchanged.
2026-04-26 09:06:17 +03:00
d93b668d5a
add session entity 2026-04-25 22:08:25 +03:00
4975da19be
test auth flows in cypress 2026-04-24 16:08:32 +03:00
4c393e813a
login as admin in admin text bulk add cypress spec 2026-04-24 16:08:14 +03:00
e8fcac654b
login as admin in admin text toggle cypress spec 2026-04-24 16:08:03 +03:00
3ee6057978
login as admin in admin text cypress spec 2026-04-24 16:07:53 +03:00
5f2bba070c
login as admin in admin cypress spec 2026-04-24 16:07:44 +03:00
6e93bd3872
update create plan body assertion 2026-04-24 16:07:36 +03:00
8bfc110ed3
login as user in home create plan cypress spec 2026-04-24 16:07:25 +03:00
cddc72e6cf
login as user in home cypress spec 2026-04-24 16:07:16 +03:00
49c5ed49b0
add cypress login commands 2026-04-24 16:07:07 +03:00
95f7f1cb78
seed regular user for cypress 2026-04-24 16:06:59 +03:00
5a24f5bde4
read user from request in plan controller 2026-04-24 13:32:04 +03:00
05374991c5
update plan controller tests for auth 2026-04-24 13:31:44 +03:00
c649dbbcc2
include credentials on fetch calls 2026-04-24 13:30:54 +03:00
4e039fb583
add logout button to admin 2026-04-24 13:30:14 +03:00
e4494a0577
add logout button to home 2026-04-24 13:30:04 +03:00
8c52294b10
remove hardcoded user id from home 2026-04-24 13:29:49 +03:00
cb697daa03
add auth javascript 2026-04-24 13:29:38 +03:00
ce029fafa2
add register template 2026-04-24 13:29:25 +03:00