1
0
Commit Graph

66 Commits

Author SHA1 Message Date
de0fc8c917
enable history navigation
The previous implementation only looked at the URL (and state) during
initialization. This allowed users to open a specific session via URL
(e.g. when reloading the page).

History navigation, however, was completely ignored. I.e. if the user
pressed the back button the URL would change, but the content would
remain the same.

This has now been corrected.
2026-03-01 02:28:47 +01:00
b5ead20f0b
only reinsert all sessions if necessary
The purpose of this is data safety. If there ever was a broken model
that corrupted data previously it would have ruined everything if it
coincided with a schema migration. Now this is much less likely.
2026-02-28 18:23:48 +01:00
53e3b2539a
switch UI to time ordered session list 2026-02-27 23:28:54 +01:00
3695902041
add time ordered session db accessor 2026-02-27 23:28:53 +01:00
0065514885
improve session reinsertion testing 2026-02-27 23:28:53 +01:00
570588f885
add db index for update timestamp 2026-02-27 23:24:41 +01:00
4f5f4fbb28
make it possible to reinsert all sessions at once
This will be needed for database upgrades going forward. For example, an
old session without an update timestamp will not be visible in the index
that will soon be added. But since the UI will switch to that index, it
is paramount that all sessions are part of that.

The session model was built with that in mind, and has the corresponding
"update" logic. However, for that to matter old records first need to be
readded to the database.
2026-02-27 23:24:35 +01:00
a7012657b3
refactor SessionRepo change tracking
It was gettig tedious to add the change tracking logic in all of the
methods. And since there likely will be many more such methods, I have
now extracted that bit into its own function.
2026-02-27 23:12:38 +01:00
ded78b09e2
test that session update timestamps actually change 2026-02-27 23:12:38 +01:00
78cf050a94
make database updating state trackable 2026-02-27 23:12:35 +01:00
5011354ddc
add a jsconfig file for better autocompletion
This makes editor help, such as autocomplete, much more usefull, while
still allowing me to use absolute paths for imports. The latter is
needed, so that I don't need an extra build step and also don't need to
wory too much about browser imports.

Does this violate the _browser based development_ principle? Yes, a tiny
little bit. However, using an editor is basically required, and making
it that much better seems worthwhile.

Did I waste too much time trying to make this perfect? Also yes. A
strong reminder why that principle is so important.
2026-02-27 20:20:39 +01:00
6ea9cfc803
add documentation to session id setter 2026-02-27 18:01:22 +01:00
ca2d388275
remove unneeded console log 2026-02-27 17:54:07 +01:00
5974e161a6
add timestamps to session model 2026-02-27 17:53:46 +01:00
80c65212ca
add 404 redirect to index.html 2026-02-27 01:33:33 +01:00
6e58e85d53
add line breaks to LICENSE 2026-02-27 00:41:41 +01:00
b1f5b3d85d
update and extend README 2026-02-27 00:38:19 +01:00
7bae909c60
restore full screen session view behaviour 2026-02-27 00:11:21 +01:00
4e9d35178a
make opening sessions by query param possible
Specific sessions can now be opened by setting a query param to their
id. This is needed to allow users to reload the page without being
kicked out to the session selection.
2026-02-27 00:08:18 +01:00
b9ed3ed37f
refactor to allow use of routing 2026-02-22 15:18:34 +01:00
36d6a9ed9b
switch language to bavarian 2026-02-22 12:54:22 +01:00
17612b2c6b
make test page easier to read on mobile 2026-02-22 12:52:33 +01:00
dbe20d548d
switch over to mithril fragment method 2026-02-22 12:51:44 +01:00
bb3ad61950
make import paths absolute 2026-02-22 12:51:28 +01:00
7df55afd1a
move game points into name cell 2026-02-18 19:21:14 +01:00
3a0db3c620
Create CNAME 2026-02-18 19:13:38 +01:00
63b7446528
prevent github pages from using jekyll 2026-02-18 19:09:06 +01:00
d5952bf83a
change name in license 2026-02-18 19:06:13 +01:00
eba36600b9
make session UI somewhat nice 2026-02-18 19:01:14 +01:00
0cc3c991e5
restructure basic UI for better semantics 2026-02-18 19:01:10 +01:00
979dfb9b08
make basic UI fully functional 2026-02-18 19:01:03 +01:00
674aad81fe
add event listener to game on session destructuring 2026-02-18 19:00:40 +01:00
a961c87e96
basic session selector 2026-02-17 21:31:33 +01:00
353c441722
add repo method to load specific session 2026-02-17 20:41:08 +01:00
ff04d19185
make basic ui remember one session 2026-02-17 00:38:53 +01:00
ad9f9035a1
update stored session when the model changes 2026-02-17 00:30:52 +01:00
ffd3529055
add a general change event to the session model 2026-02-17 00:25:31 +01:00
685359ebd9
switch game over to a general change event 2026-02-16 23:10:51 +01:00
3bf6cc52ab
switch round over to a general change event 2026-02-16 22:51:49 +01:00
624063b91e
implement very basic UI 2026-02-15 22:31:36 +01:00
bcb08a64d2
fix bug in tailor calculation
The tailor calculation did not go down to one point if the losing team
scored points only after the winning team reached the tailor goal. This
has been fixed.

This made me realize that I forgot to write tests for the `results`
property of the game and session models. Those will follow in a later
commit.
2026-02-15 22:29:03 +01:00
b89206f113
implement session repository 2026-02-15 18:09:50 +01:00
fb2fd76c6c
add a bit of documentation 2026-02-15 15:43:15 +01:00
f073129f38
test that invalid constructor forms throw 2026-02-15 04:41:40 +01:00
2a2472a052
test session id invalid fromStruct 2026-02-15 04:37:52 +01:00
a27f3ac3af
move db tests cleanup test behind actual test 2026-02-15 04:32:56 +01:00
2af6cb4f6a
test exception types and messages
As I noted in commit 85b9c2459c I noticed
that the testing of the invalidity of invalid struct "deserialization"
was not sound. That was because if one error was not actually thrown,
the test would still be satisfied by the following error. However, if
only that specific thing was wrong, no error would be thrown and an
invalid struct would be accepted.

Therefore I now changed those tests to also check the exception type and
its message. This means that if an exception is missing, it is
immediately picked up.

I also found out that one exception was actually wrong. I had mistyped
`TypeError` as `TypError`. Funnily enough that still causes an exception
to be thrown at that location, but a `ReferenceError` instead of the
`TypeError`. Such bugs should now be more easily noticable.
2026-02-15 04:27:08 +01:00
729d70c80f
reword principles in README 2026-02-15 03:45:32 +01:00
80b7203805
implement wrapper for single IndexedDB database 2026-02-15 03:34:25 +01:00
b2ab89a151
extend session with ID 2026-02-15 00:50:56 +01:00