Changelog
features
- Add note history
- This will need to be enabled from Admin Settings -> Editor (I didn't want to risk suddenly pushing something that may conflict with an already present git folder in your local environments)
- Each user will have a
git init .within the./data/notes/usersfolders - Each note MANUAL save is tracked (autosave won't be tracked or your file system will seriously cry out) and committed locally, on revert the file gets reverted to a specific commit hash, it's pretty powerful in its simplicity
- The application technically tracks rename/delete but I have not implemented a UI for it yet, not sure if I will, for now it's nice to have proper content history
- Added full on git diff look in each revision, so you can easily see what's different and what you are reverting into
- Encrypted note WON'T be committed on save, the only way to create history for an encrypted note is to decrypt it first, this is by design, I purposely disabled it, feel free to come argue in the issues if needed, but I'm fairly confident having a local history of changes for encrypted note is kinda dumb
- Create an animated SVG to replace the pulsing logo on page loads, because why not, feels more... Jotty now
- Add callout blocks to rich editor using the
[!INFO] | [!WARNING]...syntax (see the markdown page in the help section for more info) #346 - Add visual indicators of theme colours in the theme dropdown because I saw it in another project and I thought it was a good idea, I obviously gave it a Jotty twist 😆
bugfixes
- Fix issue where PWA icon doesn't center nicely on some devices, you'll need to uninstall your PWA, clear cache/storage and re-install it for the change to apply #341
- Fix theme bug where the sakura themes were showing up on top of the custom ones (whops)
- Fix theme editor to look a bit more up to Jotty standards
- Fixed functionality around slash commands and
@bylateral note linking, it now should work so much more fluidly, you can type/and just select with arrows, OR start typing and enter to select the only available option straight away, no more mouse needed. sorry it took this long. - Tweaked mobile sidebar swipe in to be slightly less responsive, also it won't trigger while dragging of checklist items
tests
- As promised I started working on unit testing and e2e tests. The e2e stuff is not ready yet, I am getting the grasp of playwright, it's a powerful tool and it has a lot of nuances, I don't want to rush it and do half assed work. However I have now started implementing unit testing on important server actions and security testing to make sure data never leaks and user sessions are protected.
- Setup a new pipeline on pr creation that checks new pull requests from contributors are pointing at
developand runs linting/type checks and unit tests. This should ensure at the very least contributions will have some structure finally.
Full disclosure, I have set up the tests myself, configured it all myself, wrote the first two dozens for the most important part of the site and fed it to AI to copy-paste my work and speed up the process 10x. If you have issues with that please feel free to message me and we can discuss why you're wrong and I'm right 😆
Anyhow, everything should make sense, I went through them all individually and double check the logic, I'm not a tester tho, so if you are an automation tester and you have opinions/ideas PLEASE open a pr, i'm out of my depth a little with tests.
This is what will be pushed with this release:
Test results
# yarn test:run --reporter=verbose
yarn run v1.22.22
$ vitest run --reporter=verbose
RUN v4.0.17
✓ tests/security/auth-required.test.ts > Security: Authentication Required > Note Actions > createNote should reject unauthenticated requests 316ms
✓ tests/security/auth-required.test.ts > Security: Authentication Required > Note Actions > deleteNote should reject unauthenticated requests 0ms
✓ tests/security/auth-required.test.ts > Security: Authentication Required > Note Actions > getUserNotes should reject unauthenticated requests 0ms
✓ tests/security/auth-required.test.ts > Security: Authentication Required > Checklist Actions > createList should reject unauthenticated requests 22ms
✓ tests/security/auth-required.test.ts > Security: Authentication Required > Checklist Actions > deleteList should reject unauthenticated requests 0ms
✓ tests/security/auth-required.test.ts > Security: Authentication Required > Checklist Actions > getUserChecklists should reject unauthenticated requests 0ms
✓ tests/security/auth-required.test.ts > Security: Authentication Required > User Actions > deleteUser should reject non-admin requests 0ms
✓ tests/security/auth-required.test.ts > Security: Authentication Required > User Actions > updateUser should reject non-admin requests 0ms
✓ tests/security/auth-required.test.ts > Security: Authentication Required > User Actions > updateProfile should reject unauthenticated requests 0ms
✓ tests/security/auth-required.test.ts > Security: Authentication Required > User Actions > updateUserSettings should reject unauthenticated requests 0ms
✓ tests/security/auth-required.test.ts > Security: Authentication Required > User Actions > deleteAccount should reject unauthenticated requests 0ms
✓ tests/security/auth-required.test.ts > Security: Authentication Required > Category Actions > createCategory should fail for unauthenticated users 12ms
✓ tests/security/auth-required.test.ts > Security: Authentication Required > Category Actions > deleteCategory should fail for unauthenticated users 0ms
✓ tests/server-actions/checklist-item.test.ts > Checklist Item Actions - Comprehensive Tests > updateItem > should update item text 13ms
✓ tests/server-actions/checklist-item.test.ts > Checklist Item Actions - Comprehensive Tests > updateItem > should mark item as completed 0ms
✓ tests/server-actions/checklist-item.test.ts > Checklist Item Actions - Comprehensive Tests > updateItem > should update item description 0ms
✓ tests/server-actions/checklist-item.test.ts > Checklist Item Actions - Comprehensive Tests > updateItem > should return error when permission denied 4ms
✓ tests/server-actions/checklist-item.test.ts > Checklist Item Actions - Comprehensive Tests > updateItem > should skip revalidation when flag is set 0ms
✓ tests/server-actions/checklist-item.test.ts > Checklist Item Actions - Comprehensive Tests > updateItem > should update child items when parent is completed 0ms
✓ tests/server-actions/checklist-item.test.ts > Checklist Item Actions - Comprehensive Tests > updateItem > should update due date for task items 0ms
✓ tests/server-actions/checklist-item.test.ts > Checklist Item Actions - Comprehensive Tests > createItem > should create a new item 0ms
✓ tests/server-actions/checklist-item.test.ts > Checklist Item Actions - Comprehensive Tests > createItem > should create item with description 0ms
✓ tests/server-actions/checklist-item.test.ts > Checklist Item Actions - Comprehensive Tests > createItem > should return error when permission denied 0ms
✓ tests/server-actions/checklist-item.test.ts > Checklist Item Actions - Comprehensive Tests > createItem > should create task item with status for task checklists 0ms
✓ tests/server-actions/checklist-item.test.ts > Checklist Item Actions - Comprehensive Tests > createItem > should create item with custom status for task checklists 0ms
✓ tests/server-actions/checklist-item.test.ts > Checklist Item Actions - Comprehensive Tests > createItem > should create item with due date 0ms
✓ tests/server-actions/checklist-item.test.ts > Checklist Item Actions - Comprehensive Tests > deleteItem > should delete an item 0ms
✓ tests/server-actions/checklist-item.test.ts > Checklist Item Actions - Comprehensive Tests > deleteItem > should return success when item does not exist 0ms
✓ tests/server-actions/checklist-item.test.ts > Checklist Item Actions - Comprehensive Tests > deleteItem > should handle list not found 0ms
✓ tests/server-actions/checklist-item.test.ts > Checklist Item Actions - Comprehensive Tests > deleteItem > should delete item with children recursively 0ms
✓ tests/server-actions/checklist-item.test.ts > Checklist Item Actions - Comprehensive Tests > updateItemStatus (Task/Kanban) > should return error when listId or itemId missing 0ms
✓ tests/server-actions/checklist-item.test.ts > Checklist Item Actions - Comprehensive Tests > updateItemStatus (Task/Kanban) > should return error when neither status nor timeEntries provided 0ms
✓ tests/server-actions/checklist-item.test.ts > Checklist Item Actions - Comprehensive Tests > updateItemStatus (Task/Kanban) > should update item status 0ms
✓ tests/server-actions/checklist-item.test.ts > Checklist Item Actions - Comprehensive Tests > updateItemStatus (Task/Kanban) > should update to completed status and mark item completed 0ms
✓ tests/server-actions/checklist-item.test.ts > Checklist Item Actions - Comprehensive Tests > updateItemStatus (Task/Kanban) > should return error when permission denied 0ms
✓ tests/server-actions/checklist-item.test.ts > Checklist Item Actions - Comprehensive Tests > updateItemStatus (Task/Kanban) > should return error when list not found 0ms
✓ tests/server-actions/checklist-item.test.ts > Checklist Item Actions - Comprehensive Tests > updateItemStatus (Task/Kanban) > should update time entries for task tracking 0ms
✓ tests/server-actions/checklist-item.test.ts > Checklist Item Actions - Comprehensive Tests > updateItemStatus (Task/Kanban) > should update child items when parent status changes 0ms
✓ tests/server-actions/checklist-item.test.ts > Checklist Item Actions - Comprehensive Tests > createBulkItems > should create multiple items from text 0ms
✓ tests/server-actions/checklist-item.test.ts > Checklist Item Actions - Comprehensive Tests > createBulkItems > should filter empty lines 0ms
✓ tests/server-actions/checklist-item.test.ts > Checklist Item Actions - Comprehensive Tests > createBulkItems > should handle list not found 0ms
✓ tests/server-actions/checklist-item.test.ts > Checklist Item Actions - Comprehensive Tests > createBulkItems > should trim whitespace from items 0ms
✓ tests/server-actions/checklist-item.test.ts > Checklist Item Actions - Comprehensive Tests > bulkToggleItems > should toggle multiple items completed state 0ms
✓ tests/server-actions/checklist-item.test.ts > Checklist Item Actions - Comprehensive Tests > bulkToggleItems > should toggle all items when no specific ids provided 0ms
✓ tests/server-actions/checklist-item.test.ts > Checklist Item Actions - Comprehensive Tests > bulkToggleItems > should handle list not found gracefully 0ms
✓ tests/server-actions/checklist-item.test.ts > Checklist Item Actions - Comprehensive Tests > bulkDeleteItems > should delete multiple items 0ms
✓ tests/server-actions/checklist-item.test.ts > Checklist Item Actions - Comprehensive Tests > bulkDeleteItems > should handle missing listId by returning no-op 0ms
✓ tests/server-actions/checklist-item.test.ts > Checklist Item Actions - Comprehensive Tests > bulkDeleteItems > should succeed with empty itemIds (no-op) 0ms
✓ tests/server-actions/checklist-item.test.ts > Checklist Item Actions - Comprehensive Tests > bulkDeleteItems > should delete items and their children 0ms
✓ tests/server-actions/checklist-item.test.ts > Checklist Item Actions - Comprehensive Tests > reorderItems > should reorder items within same level 101ms
✓ tests/server-actions/checklist-item.test.ts > Checklist Item Actions - Comprehensive Tests > reorderItems > should move item to different position 101ms
✓ tests/server-actions/checklist-item.test.ts > Checklist Item Actions - Comprehensive Tests > reorderItems > should return error when list not found 1ms
✓ tests/server-actions/checklist-item.test.ts > Checklist Item Actions - Comprehensive Tests > reorderItems > should return generic error when permission denied 0ms
✓ tests/server-actions/checklist-item.test.ts > Checklist Item Actions - Comprehensive Tests > reorderItems > should prevent moving item under its own descendant 0ms
✓ tests/server-actions/checklist-item.test.ts > Checklist Item Actions - Comprehensive Tests > createSubItem > should create a sub-item under parent 1ms
✓ tests/server-actions/checklist-item.test.ts > Checklist Item Actions - Comprehensive Tests > createSubItem > should return error when parent not found 0ms
✓ tests/server-actions/checklist-item.test.ts > Checklist Item Actions - Comprehensive Tests > createSubItem > should handle list not found 0ms
✓ tests/server-actions/checklist-item.test.ts > Checklist Item Actions - Comprehensive Tests > createSubItem > should create sub-item with proper order 0ms
✓ tests/security/data-leakage.test.ts > Security: Data Leakage Prevention > Password Hash Protection > getUsers should never return passwordHash 114ms
✓ tests/security/data-leakage.test.ts > Security: Data Leakage Prevention > Password Hash Protection > createUser should not return passwordHash in response 11ms
✓ tests/security/data-leakage.test.ts > Security: Data Leakage Prevention > Password Hash Protection > updateUser should not return passwordHash in response 1ms
✓ tests/security/data-leakage.test.ts > Security: Data Leakage Prevention > Session Data Protection > session IDs should not be exposed in responses 0ms
✓ tests/security/data-leakage.test.ts > Security: Data Leakage Prevention > Sensitive Field Filtering > user list should only contain safe fields 0ms
✓ tests/security/data-leakage.test.ts > Security: Data Leakage Prevention > Cross-User Data Protection > should not expose other users data in error messages 0ms
✓ tests/security/data-leakage.test.ts > Security: Data Leakage Prevention > Error Message Safety > login errors should not reveal if username exists 11ms
✓ tests/api/tasks.test.ts > Tasks API > GET /api/tasks > should return tasks array 6ms
✓ tests/api/tasks.test.ts > Tasks API > GET /api/tasks > should filter by category 1ms
✓ tests/api/tasks.test.ts > Tasks API > GET /api/tasks > should return 401 for unauthorized requests 1ms
✓ tests/api/tasks.test.ts > Tasks API > POST /api/tasks > should create a task 1ms
✓ tests/api/tasks.test.ts > Tasks API > POST /api/tasks > should return 400 when title is missing 1ms
✓ tests/api/tasks.test.ts > Tasks API > POST /api/tasks > should return 401 for unauthorized requests 1ms
✓ tests/api/tasks.test.ts > Tasks API > GET /api/tasks/:taskId > should return a task 1ms
✓ tests/api/tasks.test.ts > Tasks API > GET /api/tasks/:taskId > should return 404 for non-existent task 0ms
✓ tests/api/tasks.test.ts > Tasks API > GET /api/tasks/:taskId > should return 400 for non-task checklist 1ms
✓ tests/api/tasks.test.ts > Tasks API > GET /api/tasks/:taskId > should return 401 for unauthorized requests 0ms
✓ tests/api/tasks.test.ts > Tasks API > PUT /api/tasks/:taskId > should update a task 1ms
✓ tests/api/tasks.test.ts > Tasks API > PUT /api/tasks/:taskId > should return 404 for non-existent task 1ms
✓ tests/api/tasks.test.ts > Tasks API > PUT /api/tasks/:taskId > should return 401 for unauthorized requests 0ms
✓ tests/api/tasks.test.ts > Tasks API > DELETE /api/tasks/:taskId > should delete a task 1ms
✓ tests/api/tasks.test.ts > Tasks API > DELETE /api/tasks/:taskId > should return 404 for non-existent task 0ms
✓ tests/api/tasks.test.ts > Tasks API > DELETE /api/tasks/:taskId > should return 401 for unauthorized requests 0ms
✓ tests/api/tasks.test.ts > Tasks API > GET /api/tasks/:taskId/statuses > should return statuses 0ms
✓ tests/api/tasks.test.ts > Tasks API > GET /api/tasks/:taskId/statuses > should return 404 for non-existent task 0ms
✓ tests/api/tasks.test.ts > Tasks API > GET /api/tasks/:taskId/statuses > should return 401 for unauthorized requests 0ms
✓ tests/api/tasks.test.ts > Tasks API > POST /api/tasks/:taskId/statuses > should create a status 1ms
✓ tests/api/tasks.test.ts > Tasks API > POST /api/tasks/:taskId/statuses > should return 400 when id or label is missing 0ms
✓ tests/api/tasks.test.ts > Tasks API > POST /api/tasks/:taskId/statuses > should return 400 for duplicate status id 0ms
✓ tests/api/tasks.test.ts > Tasks API > POST /api/tasks/:taskId/statuses > should return 401 for unauthorized requests 0ms
✓ tests/api/tasks.test.ts > Tasks API > PUT /api/tasks/:taskId/statuses/:statusId > should update a status 1ms
✓ tests/api/tasks.test.ts > Tasks API > PUT /api/tasks/:taskId/statuses/:statusId > should return 404 for non-existent status 0ms
✓ tests/api/tasks.test.ts > Tasks API > PUT /api/tasks/:taskId/statuses/:statusId > should return 401 for unauthorized requests 0ms
✓ tests/api/tasks.test.ts > Tasks API > DELETE /api/tasks/:taskId/statuses/:statusId > should delete a status 0ms
✓ tests/api/tasks.test.ts > Tasks API > DELETE /api/tasks/:taskId/statuses/:statusId > should return 404 for non-existent status 0ms
✓ tests/api/tasks.test.ts > Tasks API > DELETE /api/tasks/:taskId/statuses/:statusId > should return 401 for unauthorized requests 0ms
✓ tests/api/tasks.test.ts > Tasks API > POST /api/tasks/:taskId/items > should create a task item 1ms
✓ tests/api/tasks.test.ts > Tasks API > POST /api/tasks/:taskId/items > should create a nested task item 0ms
✓ tests/api/tasks.test.ts > Tasks API > POST /api/tasks/:taskId/items > should return 400 when text is missing 0ms
✓ tests/api/tasks.test.ts > Tasks API > POST /api/tasks/:taskId/items > should return 401 for unauthorized requests 0ms
✓ tests/api/tasks.test.ts > Tasks API > PUT /api/tasks/:taskId/items/:itemIndex/status > should update item status 0ms
✓ tests/api/tasks.test.ts > Tasks API > PUT /api/tasks/:taskId/items/:itemIndex/status > should update nested item status 0ms
✓ tests/api/tasks.test.ts > Tasks API > PUT /api/tasks/:taskId/items/:itemIndex/status > should return 400 when status is missing 0ms
✓ tests/api/tasks.test.ts > Tasks API > PUT /api/tasks/:taskId/items/:itemIndex/status > should return 400 for item index out of range 0ms
✓ tests/api/tasks.test.ts > Tasks API > PUT /api/tasks/:taskId/items/:itemIndex/status > should return 401 for unauthorized requests 0ms
✓ tests/api/tasks.test.ts > Tasks API > DELETE /api/tasks/:taskId/items/:itemIndex > should delete a task item 0ms
✓ tests/api/tasks.test.ts > Tasks API > DELETE /api/tasks/:taskId/items/:itemIndex > should delete a nested task item 0ms
✓ tests/api/tasks.test.ts > Tasks API > DELETE /api/tasks/:taskId/items/:itemIndex > should return 404 for non-existent task 0ms
✓ tests/api/tasks.test.ts > Tasks API > DELETE /api/tasks/:taskId/items/:itemIndex > should return 401 for unauthorized requests 0ms
✓ tests/server-actions/dashboard.test.ts > Dashboard Actions > togglePin > should return error when not authenticated 1ms
✓ tests/server-actions/dashboard.test.ts > Dashboard Actions > togglePin > should pin a checklist 2ms
✓ tests/server-actions/dashboard.test.ts > Dashboard Actions > togglePin > should unpin a checklist that is already pinned 1ms
✓ tests/server-actions/dashboard.test.ts > Dashboard Actions > togglePin > should pin a note 1ms
✓ tests/server-actions/dashboard.test.ts > Dashboard Actions > togglePin > should unpin a note that is already pinned 0ms
✓ tests/server-actions/dashboard.test.ts > Dashboard Actions > togglePin > should handle errors gracefully 0ms
✓ tests/server-actions/dashboard.test.ts > Dashboard Actions > updatePinnedOrder > should return error when not authenticated 0ms
✓ tests/server-actions/dashboard.test.ts > Dashboard Actions > updatePinnedOrder > should update pinned checklist order 0ms
✓ tests/server-actions/dashboard.test.ts > Dashboard Actions > updatePinnedOrder > should update pinned note order 0ms
✓ tests/server-actions/dashboard.test.ts > Dashboard Actions > updatePinnedOrder > should handle errors gracefully 0ms
✓ tests/server-actions/dashboard.test.ts > Dashboard Actions > toggleArchive > should archive a checklist 12ms
✓ tests/server-actions/dashboard.test.ts > Dashboard Actions > toggleArchive > should archive a note 0ms
✓ tests/server-actions/dashboard.test.ts > Dashboard Actions > toggleArchive > should return success when update succeeds 0ms
✓ tests/server-actions/dashboard.test.ts > Dashboard Actions > toggleArchive > should return error when update fails 0ms
✓ tests/server-actions/dashboard.test.ts > Dashboard Actions > toggleArchive > should restore to specified category 0ms
✓ tests/server-actions/note.test.ts > Note Actions > createNote > should create a new note successfully 14ms
✓ tests/server-actions/note.test.ts > Note Actions > createNote > should return error when not authenticated 0ms
✓ tests/server-actions/note.test.ts > Note Actions > createNote > should log content event on creation 1ms
✓ tests/server-actions/note.test.ts > Note Actions > createNote > should update link index after creation 0ms
✓ tests/server-actions/note.test.ts > Note Actions > createNote > should commit note to history 0ms
✓ tests/server-actions/note.test.ts > Note Actions > createNote > should handle creation errors gracefully 0ms
✓ tests/server-actions/note.test.ts > Note Actions > createNote > should use user from formData when provided 0ms
✓ tests/server-actions/note.test.ts > Note Actions > deleteNote > should return error when not authenticated 1ms
✓ tests/server-actions/note.test.ts > Note Actions > deleteNote > should return error when permission denied 2ms
✓ tests/server-actions/checklist.test.ts > Checklist Actions > createList > should create a new checklist successfully 13ms
✓ tests/server-actions/checklist.test.ts > Checklist Actions > createList > should default to Uncategorized when no category provided 0ms
✓ tests/server-actions/checklist.test.ts > Checklist Actions > createList > should create a task checklist 0ms
✓ tests/server-actions/checklist.test.ts > Checklist Actions > createList > should log content event on creation 1ms
✓ tests/server-actions/checklist.test.ts > Checklist Actions > createList > should update link index after creation 0ms
✓ tests/server-actions/checklist.test.ts > Checklist Actions > createList > should handle creation errors gracefully 0ms
✓ tests/server-actions/checklist.test.ts > Checklist Actions > deleteList > should return error when not authenticated 1ms
✓ tests/server-actions/checklist.test.ts > Checklist Actions > deleteList > should return error when permission denied 3ms
✓ tests/server-actions/category.test.ts > Category Actions > createCategory > should create a category successfully 13ms
✓ tests/server-actions/category.test.ts > Category Actions > createCategory > should create a nested category with parent 1ms
✓ tests/server-actions/category.test.ts > Category Actions > createCategory > should handle errors and log them 1ms
✓ tests/server-actions/category.test.ts > Category Actions > deleteCategory > should delete a category successfully 1ms
✓ tests/server-actions/category.test.ts > Category Actions > deleteCategory > should revalidate path after deletion 0ms
✓ tests/server-actions/category.test.ts > Category Actions > deleteCategory > should handle deletion errors 0ms
✓ tests/server-actions/category.test.ts > Category Actions > renameCategory > should return error when parameters are missing 0ms
✓ tests/server-actions/category.test.ts > Category Actions > renameCategory > should return error when category not found 0ms
✓ tests/server-actions/category.test.ts > Category Actions > renameCategory > should return error when new name already exists 0ms
✓ tests/server-actions/category.test.ts > Category Actions > renameCategory > should rename category successfully 0ms
✓ tests/server-actions/category.test.ts > Category Actions > getCategories > should return categories successfully 0ms
✓ tests/server-actions/category.test.ts > Category Actions > getCategories > should ensure directory exists 0ms
✓ tests/server-actions/category.test.ts > Category Actions > getCategories > should handle errors gracefully 0ms
✓ tests/server-actions/category.test.ts > Category Actions > setCategoryOrder > should set category order successfully 0ms
✓ tests/server-actions/category.test.ts > Category Actions > setCategoryOrder > should preserve existing item order 1ms
✓ tests/server-actions/category.test.ts > Category Actions > setCategoryOrder > should handle write errors 0ms
✓ tests/server-actions/users.test.ts > Users Actions > createUser > should return error when fields are missing 11ms
✓ tests/server-actions/users.test.ts > Users Actions > createUser > should return error when username is too short 0ms
✓ tests/server-actions/users.test.ts > Users Actions > createUser > should return error when password is too short 0ms
✓ tests/server-actions/users.test.ts > Users Actions > createUser > should return error when passwords do not match 0ms
✓ tests/server-actions/users.test.ts > Users Actions > createUser > should return error when username already exists 0ms
✓ tests/server-actions/users.test.ts > Users Actions > createUser > should create user successfully 2ms
✓ tests/server-actions/users.test.ts > Users Actions > createUser > should create admin user when specified 0ms
✓ tests/server-actions/users.test.ts > Users Actions > getUserByUsername > should return null when user not found 0ms
✓ tests/server-actions/users.test.ts > Users Actions > getUserByUsername > should return user when found 0ms
✓ tests/server-actions/users.test.ts > Users Actions > hasUsers > should return false when no users exist 0ms
✓ tests/server-actions/users.test.ts > Users Actions > hasUsers > should return true when users exist 0ms
✓ tests/server-actions/users.test.ts > Users Actions > hasUsers > should return false on error 0ms
✓ tests/server-actions/users.test.ts > Users Actions > getUsers > should return empty array when no users 0ms
✓ tests/server-actions/users.test.ts > Users Actions > getUsers > should return users without password hash 0ms
✓ tests/server-actions/users.test.ts > Users Actions > deleteUser > should return error when not admin 0ms
✓ tests/server-actions/users.test.ts > Users Actions > deleteUser > should return error when username not provided 0ms
✓ tests/server-actions/users.test.ts > Users Actions > deleteUser > should not delete super admin 0ms
✓ tests/server-actions/users.test.ts > Users Actions > updateUserSettings > should return error when not authenticated 0ms
✓ tests/server-actions/users.test.ts > Users Actions > updateUserSettings > should update settings successfully 1ms
✓ tests/server-actions/session.test.ts > Session Actions > readSessionData > should return empty object when no sessions 1ms
✓ tests/server-actions/session.test.ts > Session Actions > readSessionData > should return existing session data 0ms
✓ tests/server-actions/session.test.ts > Session Actions > readSessions > should return empty object when no sessions 0ms
✓ tests/server-actions/session.test.ts > Session Actions > readSessions > should return existing sessions 0ms
✓ tests/server-actions/session.test.ts > Session Actions > createSession > should create a new session 2ms
✓ tests/server-actions/session.test.ts > Session Actions > removeSession > should remove a session 0ms
✓ tests/server-actions/session.test.ts > Session Actions > getSessionsForUser > should return sessions for a specific user 1ms
✓ tests/server-actions/session.test.ts > Session Actions > getSessionsForUser > should return empty array when user has no sessions 0ms
✓ tests/server-actions/session.test.ts > Session Actions > getSessionId > should return session ID from cookie 0ms
✓ tests/server-actions/session.test.ts > Session Actions > getSessionId > should return empty string when no cookie 0ms
✓ tests/server-actions/session.test.ts > Session Actions > removeAllSessionsForUser > should remove all sessions for a user 0ms
✓ tests/server-actions/session.test.ts > Session Actions > removeAllSessionsForUser > should keep excepted session when specified 0ms
✓ tests/server-actions/session.test.ts > Session Actions > clearAllSessions > should clear all sessions 0ms
✓ tests/server-actions/session.test.ts > Session Actions > clearAllSessions > should handle errors 0ms
✓ tests/server-actions/session.test.ts > Session Actions > terminateSession > should return error when not authenticated 12ms
✓ tests/server-actions/session.test.ts > Session Actions > terminateSession > should return error when session ID not provided 0ms
✓ tests/server-actions/session.test.ts > Session Actions > terminateSession > should terminate session successfully 0ms
✓ tests/server-actions/session.test.ts > Session Actions > terminateAllOtherSessions > should return error when not authenticated 0ms
✓ tests/server-actions/session.test.ts > Session Actions > terminateAllOtherSessions > should terminate all other sessions 0ms
✓ tests/server-actions/pgp.test.ts > PGP Actions > generateKeyPair > should return error when not authenticated 12ms
✓ tests/server-actions/pgp.test.ts > PGP Actions > generateKeyPair > should return error when passphrase is missing 0ms
✓ tests/server-actions/pgp.test.ts > PGP Actions > generateKeyPair > should generate key pair and save to files 2ms
✓ tests/server-actions/pgp.test.ts > PGP Actions > importKeys > should return error when not authenticated 0ms
✓ tests/server-actions/pgp.test.ts > PGP Actions > importKeys > should return error when keys are missing 0ms
✓ tests/server-actions/pgp.test.ts > PGP Actions > importKeys > should import valid keys 0ms
✓ tests/server-actions/pgp.test.ts > PGP Actions > exportKeys > should return error when not authenticated 0ms
✓ tests/server-actions/pgp.test.ts > PGP Actions > exportKeys > should return public key 0ms
✓ tests/server-actions/pgp.test.ts > PGP Actions > exportKeys > should return private key 0ms
✓ tests/server-actions/pgp.test.ts > PGP Actions > exportKeys > should return error when key not found 0ms
✓ tests/server-actions/pgp.test.ts > PGP Actions > getStoredKeys > should return error when not authenticated 0ms
✓ tests/server-actions/pgp.test.ts > PGP Actions > getStoredKeys > should return hasKeys false when no keys stored 0ms
✓ tests/server-actions/pgp.test.ts > PGP Actions > getStoredKeys > should return key metadata when keys exist 0ms
✓ tests/server-actions/pgp.test.ts > PGP Actions > encryptNoteContent > should return error when not authenticated 0ms
✓ tests/server-actions/pgp.test.ts > PGP Actions > encryptNoteContent > should return error when content is missing 0ms
✓ tests/server-actions/pgp.test.ts > PGP Actions > encryptNoteContent > should encrypt content with stored key 0ms
✓ tests/server-actions/pgp.test.ts > PGP Actions > encryptNoteContent > should return error when no stored key found 0ms
✓ tests/server-actions/pgp.test.ts > PGP Actions > decryptNoteContent > should return error when not authenticated 0ms
✓ tests/server-actions/pgp.test.ts > PGP Actions > decryptNoteContent > should return error when encrypted content is missing 0ms
✓ tests/server-actions/pgp.test.ts > PGP Actions > decryptNoteContent > should return error when passphrase is missing 0ms
✓ tests/server-actions/pgp.test.ts > PGP Actions > decryptNoteContent > should decrypt content with stored key 0ms
✓ tests/server-actions/pgp.test.ts > PGP Actions > deleteKeys > should return error when not authenticated 0ms
✓ tests/server-actions/pgp.test.ts > PGP Actions > deleteKeys > should delete keys and update settings 0ms
✓ tests/server-actions/config.test.ts > Config Actions > getSettings > should return default settings when no config files exist 2ms
✓ tests/server-actions/config.test.ts > Config Actions > getSettings > should merge editor settings with defaults 0ms
✓ tests/server-actions/config.test.ts > Config Actions > getAppSettings > should return error when not admin 0ms
✓ tests/server-actions/config.test.ts > Config Actions > getAppSettings > should return settings when admin 0ms
✓ tests/server-actions/config.test.ts > Config Actions > getAppSettings > should return default settings when files not found 0ms
✓ tests/server-actions/config.test.ts > Config Actions > updateAppSettings > should return error when not admin 13ms
✓ tests/server-actions/config.test.ts > Config Actions > updateAppSettings > should return error when not super admin 0ms
✓ tests/server-actions/config.test.ts > Config Actions > updateAppSettings > should update settings when super admin 1ms
✓ tests/server-actions/config.test.ts > Config Actions > saveCustomCSS > should return error when not admin 0ms
✓ tests/server-actions/config.test.ts > Config Actions > saveCustomCSS > should save CSS when admin 0ms
✓ tests/server-actions/config.test.ts > Config Actions > loadCustomCSS > should return empty string when file not found 0ms
✓ tests/server-actions/config.test.ts > Config Actions > loadCustomCSS > should return CSS content when file exists 0ms
✓ tests/server-actions/config.test.ts > Config Actions > readPackageVersion > should return version from package.json 0ms
✓ tests/server-actions/config.test.ts > Config Actions > readPackageVersion > should return error when package.json not found 0ms
✓ tests/api/items.test.ts > Checklist Items API > POST /api/checklists/:id/items > should create a regular item 5ms
✓ tests/api/items.test.ts > Checklist Items API > POST /api/checklists/:id/items > should create a task item with status 1ms
✓ tests/api/items.test.ts > Checklist Items API > POST /api/checklists/:id/items > should create a nested item 1ms
✓ tests/api/items.test.ts > Checklist Items API > POST /api/checklists/:id/items > should create a deeply nested item 1ms
✓ tests/api/items.test.ts > Checklist Items API > POST /api/checklists/:id/items > should return 400 when text is missing 1ms
✓ tests/api/items.test.ts > Checklist Items API > POST /api/checklists/:id/items > should return 404 for non-existent list 0ms
✓ tests/api/items.test.ts > Checklist Items API > POST /api/checklists/:id/items > should return 404 for non-existent parent item 0ms
✓ tests/api/items.test.ts > Checklist Items API > POST /api/checklists/:id/items > should return 401 for unauthorized requests 0ms
✓ tests/api/items.test.ts > Checklist Items API > PUT /api/checklists/:id/items/:index/check > should check an item 1ms
✓ tests/api/items.test.ts > Checklist Items API > PUT /api/checklists/:id/items/:index/check > should check a nested item 0ms
✓ tests/api/items.test.ts > Checklist Items API > PUT /api/checklists/:id/items/:index/check > should return 404 for non-existent list 0ms
✓ tests/api/items.test.ts > Checklist Items API > PUT /api/checklists/:id/items/:index/check > should return 400 for item index out of range 0ms
✓ tests/api/items.test.ts > Checklist Items API > PUT /api/checklists/:id/items/:index/check > should return 401 for unauthorized requests 0ms
✓ tests/api/items.test.ts > Checklist Items API > PUT /api/checklists/:id/items/:index/uncheck > should uncheck an item 1ms
✓ tests/api/items.test.ts > Checklist Items API > PUT /api/checklists/:id/items/:index/uncheck > should uncheck a nested item 0ms
✓ tests/api/items.test.ts > Checklist Items API > PUT /api/checklists/:id/items/:index/uncheck > should return 404 for non-existent list 0ms
✓ tests/api/items.test.ts > Checklist Items API > PUT /api/checklists/:id/items/:index/uncheck > should return 400 for item index out of range 1ms
✓ tests/api/items.test.ts > Checklist Items API > PUT /api/checklists/:id/items/:index/uncheck > should return 401 for unauthorized requests 0ms
✓ tests/api/items.test.ts > Checklist Items API > DELETE /api/checklists/:id/items/:index > should delete an item 0ms
✓ tests/api/items.test.ts > Checklist Items API > DELETE /api/checklists/:id/items/:index > should delete a nested item 0ms
✓ tests/api/items.test.ts > Checklist Items API > DELETE /api/checklists/:id/items/:index > should delete a deeply nested item 0ms
✓ tests/api/items.test.ts > Checklist Items API > DELETE /api/checklists/:id/items/:index > should return 404 for non-existent list 0ms
✓ tests/api/items.test.ts > Checklist Items API > DELETE /api/checklists/:id/items/:index > should return 400 for item index out of range 0ms
✓ tests/api/items.test.ts > Checklist Items API > DELETE /api/checklists/:id/items/:index > should return 401 for unauthorized requests 0ms
✓ tests/server-actions/auth.test.ts > Auth Actions > register > should return error when fields are missing 11ms
✓ tests/server-actions/auth.test.ts > Auth Actions > register > should return error when passwords do not match 0ms
✓ tests/server-actions/auth.test.ts > Auth Actions > register > should return error when username already exists 0ms
✓ tests/server-actions/auth.test.ts > Auth Actions > register > should create first user as admin and super admin 2ms
✓ tests/server-actions/auth.test.ts > Auth Actions > register > should create subsequent users as non-admin 0ms
✓ tests/server-actions/auth.test.ts > Auth Actions > register > should set session cookie on successful registration 0ms
✓ tests/server-actions/auth.test.ts > Auth Actions > login > should return error when fields are missing 0ms
✓ tests/server-actions/auth.test.ts > Auth Actions > login > should return error for invalid credentials 0ms
✓ tests/server-actions/auth.test.ts > Auth Actions > login > should return error for non-existent user 0ms
✓ tests/server-actions/auth.test.ts > Auth Actions > login > should acquire and release lock during login 0ms
✓ tests/server-actions/auth.test.ts > Auth Actions > logout > should delete session cookie 0ms
✓ tests/server-actions/auth.test.ts > Auth Actions > logout > should redirect to login page 0ms
✓ tests/server-actions/xchacha.test.ts > XChaCha Actions > encryptXChaCha > should return error when content is missing 12ms
✓ tests/server-actions/xchacha.test.ts > XChaCha Actions > encryptXChaCha > should return error when passphrase is missing 0ms
✓ tests/server-actions/xchacha.test.ts > XChaCha Actions > encryptXChaCha > should encrypt content successfully 1ms
✓ tests/server-actions/xchacha.test.ts > XChaCha Actions > encryptXChaCha > should log encryption event 2ms
✓ tests/server-actions/xchacha.test.ts > XChaCha Actions > encryptXChaCha > should skip audit log when flag is set 0ms
✓ tests/server-actions/xchacha.test.ts > XChaCha Actions > decryptXChaCha > should return error when encrypted content is missing 0ms
✓ tests/server-actions/xchacha.test.ts > XChaCha Actions > decryptXChaCha > should return error when passphrase is missing 0ms
✓ tests/server-actions/xchacha.test.ts > XChaCha Actions > decryptXChaCha > should return error for invalid JSON format 0ms
✓ tests/server-actions/xchacha.test.ts > XChaCha Actions > decryptXChaCha > should return error for algorithm mismatch 0ms
✓ tests/server-actions/xchacha.test.ts > XChaCha Actions > decryptXChaCha > should decrypt content successfully 0ms
✓ tests/server-actions/xchacha.test.ts > XChaCha Actions > Encryption/Decryption integration > should produce valid encrypted format 0ms
✓ tests/api/checklists.test.ts > Checklists API > GET /api/checklists > should return checklists array 5ms
✓ tests/api/checklists.test.ts > Checklists API > GET /api/checklists > should filter checklists by category 1ms
✓ tests/api/checklists.test.ts > Checklists API > GET /api/checklists > should filter checklists by type 1ms
✓ tests/api/checklists.test.ts > Checklists API > GET /api/checklists > should search checklists 1ms
✓ tests/api/checklists.test.ts > Checklists API > GET /api/checklists > should return 401 for unauthorized requests 1ms
✓ tests/api/checklists.test.ts > Checklists API > POST /api/checklists > should create a checklist 1ms
✓ tests/api/checklists.test.ts > Checklists API > POST /api/checklists > should return 400 when title is missing 1ms
✓ tests/api/checklists.test.ts > Checklists API > POST /api/checklists > should return 400 for invalid type 1ms
✓ tests/api/checklists.test.ts > Checklists API > POST /api/checklists > should return 401 for unauthorized requests 1ms
✓ tests/api/checklists.test.ts > Checklists API > PUT /api/checklists/:id > should update a checklist 1ms
✓ tests/api/checklists.test.ts > Checklists API > PUT /api/checklists/:id > should return 404 for non-existent checklist 0ms
✓ tests/api/checklists.test.ts > Checklists API > PUT /api/checklists/:id > should return 401 for unauthorized requests 0ms
✓ tests/api/checklists.test.ts > Checklists API > DELETE /api/checklists/:id > should delete a checklist 0ms
✓ tests/api/checklists.test.ts > Checklists API > DELETE /api/checklists/:id > should return 404 for non-existent checklist 0ms
✓ tests/api/checklists.test.ts > Checklists API > DELETE /api/checklists/:id > should return 401 for unauthorized requests 0ms
✓ tests/api/notes.test.ts > Notes API > GET /api/notes > should return notes array 5ms
✓ tests/api/notes.test.ts > Notes API > GET /api/notes > should filter notes by category 1ms
✓ tests/api/notes.test.ts > Notes API > GET /api/notes > should return 401 for unauthorized requests 1ms
✓ tests/api/notes.test.ts > Notes API > POST /api/notes > should create a note 1ms
✓ tests/api/notes.test.ts > Notes API > POST /api/notes > should return 400 when title is missing 1ms
✓ tests/api/notes.test.ts > Notes API > POST /api/notes > should return 401 for unauthorized requests 1ms
✓ tests/api/notes.test.ts > Notes API > PUT /api/notes/:id > should update a note 1ms
✓ tests/api/notes.test.ts > Notes API > PUT /api/notes/:id > should handle partial updates 1ms
✓ tests/api/notes.test.ts > Notes API > PUT /api/notes/:id > should return 404 for non-existent note 1ms
✓ tests/api/notes.test.ts > Notes API > PUT /api/notes/:id > should return 401 for unauthorized requests 0ms
✓ tests/api/notes.test.ts > Notes API > DELETE /api/notes/:id > should delete a note 0ms
✓ tests/api/notes.test.ts > Notes API > DELETE /api/notes/:id > should return 404 for non-existent note 0ms
✓ tests/api/notes.test.ts > Notes API > DELETE /api/notes/:id > should return 401 for unauthorized requests 0ms
✓ tests/api/exports.test.ts > Exports API > POST /api/exports (all_checklists_notes) > should export all checklists and notes 5ms
✓ tests/api/exports.test.ts > Exports API > POST /api/exports (all_checklists_notes) > should return 401 for unauthorized requests 1ms
✓ tests/api/exports.test.ts > Exports API > POST /api/exports (user_checklists_notes) > should export user checklists and notes 1ms
✓ tests/api/exports.test.ts > Exports API > POST /api/exports (user_checklists_notes) > should return 400 when username is missing 1ms
✓ tests/api/exports.test.ts > Exports API > POST /api/exports (user_checklists_notes) > should return 401 for unauthorized requests 1ms
✓ tests/api/exports.test.ts > Exports API > POST /api/exports (all_users_data) > should export all users data 1ms
✓ tests/api/exports.test.ts > Exports API > POST /api/exports (all_users_data) > should return 401 for unauthorized requests 0ms
✓ tests/api/exports.test.ts > Exports API > POST /api/exports (whole_data_folder) > should export whole data folder 1ms
✓ tests/api/exports.test.ts > Exports API > POST /api/exports (whole_data_folder) > should return 401 for unauthorized requests 1ms
✓ tests/api/exports.test.ts > Exports API > POST /api/exports (validation) > should return 400 when type is missing 1ms
✓ tests/api/exports.test.ts > Exports API > POST /api/exports (validation) > should return 400 for invalid export type 1ms
✓ tests/api/exports.test.ts > Exports API > POST /api/exports (error handling) > should handle export failures 0ms
✓ tests/api/exports.test.ts > Exports API > GET /api/exports (progress) > should return export progress 0ms
✓ tests/api/exports.test.ts > Exports API > GET /api/exports (progress) > should return 401 for unauthorized requests 0ms
✓ tests/api/user-summary.test.ts > User & Summary API > GET /api/user/:username > should return user info for own profile 5ms
✓ tests/api/user-summary.test.ts > User & Summary API > GET /api/user/:username > should return limited info for other users 1ms
✓ tests/api/user-summary.test.ts > User & Summary API > GET /api/user/:username > should return full info for admin viewing other users 1ms
✓ tests/api/user-summary.test.ts > User & Summary API > GET /api/user/:username > should return 404 for non-existent user 1ms
✓ tests/api/user-summary.test.ts > User & Summary API > GET /api/user/:username > should return 401 for unauthorized requests 1ms
✓ tests/api/user-summary.test.ts > User & Summary API > GET /api/summary > should return summary for current user 1ms
✓ tests/api/user-summary.test.ts > User & Summary API > GET /api/summary > should return summary for specific user when admin 1ms
✓ tests/api/user-summary.test.ts > User & Summary API > GET /api/summary > should return 403 when non-admin queries other users 0ms
✓ tests/api/user-summary.test.ts > User & Summary API > GET /api/summary > should return 401 for unauthorized requests 1ms
✓ tests/api/user-summary.test.ts > User & Summary API > GET /api/categories > should return categories for notes and checklists 1ms
✓ tests/api/user-summary.test.ts > User & Summary API > GET /api/categories > should filter out archived categories 0ms
✓ tests/api/user-summary.test.ts > User & Summary API > GET /api/categories > should return 401 for unauthorized requests 0ms
✓ tests/api/error-handling.test.ts > Error Handling > Authentication Errors > should return 401 for invalid API key 5ms
✓ tests/api/error-handling.test.ts > Error Handling > Authentication Errors > should return 401 for missing API key 1ms
✓ tests/api/error-handling.test.ts > Error Handling > Validation Errors > should return 400 for missing note title 1ms
✓ tests/api/error-handling.test.ts > Error Handling > Validation Errors > should return 400 for missing item text 1ms
✓ tests/api/error-handling.test.ts > Error Handling > Validation Errors > should return 400 for missing checklist title 1ms
✓ tests/api/error-handling.test.ts > Error Handling > Validation Errors > should return 400 for invalid checklist type 1ms
✓ tests/api/error-handling.test.ts > Error Handling > Not Found Errors > should return 404 for non-existent list 1ms
✓ tests/api/error-handling.test.ts > Error Handling > Range Errors > should return 400 for item index out of range 1ms
✓ tests/api/error-handling.test.ts > Error Handling > Range Errors > should return 400 for invalid item index format 1ms
✓ tests/api/error-handling.test.ts > Error Handling > Server Errors > should return 500 for internal server errors 1ms
✓ tests/server-actions/file.test.ts > File Actions > ensureDir > should not create directory if it exists 2ms
✓ tests/server-actions/file.test.ts > File Actions > ensureDir > should create directory if it does not exist 0ms
✓ tests/server-actions/file.test.ts > File Actions > ensureFile > should not create file if it exists 0ms
✓ tests/server-actions/file.test.ts > File Actions > ensureFile > should create empty file if it does not exist 0ms
✓ tests/server-actions/file.test.ts > File Actions > readJsonFile > should return parsed JSON content 0ms
✓ tests/server-actions/file.test.ts > File Actions > readJsonFile > should return null on error 0ms
✓ tests/server-actions/file.test.ts > File Actions > readJsonFile > should return null for invalid JSON 0ms
✓ tests/server-actions/file.test.ts > File Actions > writeJsonFile > should write formatted JSON to file 1ms
✓ tests/server-actions/file.test.ts > File Actions > writeJsonFile > should ensure directory exists before writing 0ms
✓ tests/server-actions/file.test.ts > File Actions > writeJsonFile > should throw on write error 1ms
✓ tests/server-actions/file.test.ts > File Actions > readFile > should return file content 0ms
✓ tests/server-actions/file.test.ts > File Actions > readFile > should return empty string on error 0ms
✓ tests/server-actions/file.test.ts > File Actions > getUserModeDir > should return path for provided username 0ms
✓ tests/server-actions/file.test.ts > File Actions > getUserModeDir > should use current user when username not provided 0ms
✓ tests/server-actions/file.test.ts > File Actions > getUserModeDir > should throw when not authenticated and no username provided 0ms
✓ tests/server-actions/file.test.ts > File Actions > serverReadFile > should return file content 0ms
✓ tests/server-actions/file.test.ts > File Actions > serverReadFile > should return empty string on error 0ms
✓ tests/server-actions/file.test.ts > File Actions > serverReadFile > should return custom value on error when provided 0ms
✓ tests/server-actions/file.test.ts > File Actions > serverWriteFile > should ensure directory and write file 0ms
✓ tests/server-actions/file.test.ts > File Actions > serverDeleteFile > should delete file 0ms
✓ tests/server-actions/file.test.ts > File Actions > serverDeleteFile > should log and not throw on error 1ms
✓ tests/server-actions/file.test.ts > File Actions > serverReadDir > should return directory contents 0ms
✓ tests/server-actions/file.test.ts > File Actions > serverReadDir > should return empty array on error 0ms
✓ tests/server-actions/file.test.ts > File Actions > serverDeleteDir > should delete directory recursively 0ms
✓ tests/server-actions/file.test.ts > File Actions > serverDeleteDir > should log and not throw on error 0ms
✓ tests/server-actions/file.test.ts > File Actions > readOrderFile > should return order data from .order.json 0ms
✓ tests/server-actions/file.test.ts > File Actions > readOrderFile > should return null when file not found 0ms
✓ tests/server-actions/file.test.ts > File Actions > readOrderFile > should handle missing arrays gracefully 0ms
✓ tests/server-actions/file.test.ts > File Actions > writeOrderFile > should write order data to .order.json 0ms
✓ tests/server-actions/file.test.ts > File Actions > writeOrderFile > should not write empty arrays 0ms
✓ tests/server-actions/file.test.ts > File Actions > writeOrderFile > should return failure on error 0ms
✓ tests/server-actions/sharing.test.ts > Sharing Actions > shareWith > should share item successfully 3ms
✓ tests/server-actions/sharing.test.ts > Sharing Actions > shareWith > should add to existing shares for user 0ms
✓ tests/server-actions/sharing.test.ts > Sharing Actions > shareWith > should update permissions for already shared item 0ms
✓ tests/server-actions/sharing.test.ts > Sharing Actions > shareWith > should return error when UUID cannot be found 0ms
✓ tests/server-actions/sharing.test.ts > Sharing Actions > isItemSharedWith > should return false when item not shared 0ms
✓ tests/server-actions/sharing.test.ts > Sharing Actions > isItemSharedWith > should find item by uuid (primary lookup) 0ms
✓ tests/server-actions/sharing.test.ts > Sharing Actions > isItemSharedWith > should find item by uuid even when category does not match 0ms
✓ tests/server-actions/sharing.test.ts > Sharing Actions > isItemSharedWith > should fallback to id+category only when uuid not found 0ms
✓ tests/server-actions/sharing.test.ts > Sharing Actions > isItemSharedWith > should not match by id alone without matching category 0ms
✓ tests/server-actions/sharing.test.ts > Sharing Actions > getItemPermissions > should return null when item not shared 0ms
✓ tests/server-actions/sharing.test.ts > Sharing Actions > getItemPermissions > should find permissions by uuid (primary lookup) 0ms
✓ tests/server-actions/sharing.test.ts > Sharing Actions > getItemPermissions > should fallback to id+category when uuid not found 0ms
✓ tests/server-actions/sharing.test.ts > Sharing Actions > canUserReadItem > should return false when not shared 0ms
✓ tests/server-actions/sharing.test.ts > Sharing Actions > canUserReadItem > should return true when canRead is true 0ms
✓ tests/server-actions/sharing.test.ts > Sharing Actions > canUserWriteItem > should return false when canEdit is false 0ms
✓ tests/server-actions/sharing.test.ts > Sharing Actions > canUserWriteItem > should return true when canEdit is true 0ms
✓ tests/server-actions/sharing.test.ts > Sharing Actions > canUserDeleteItem > should return false when canDelete is false 0ms
✓ tests/server-actions/sharing.test.ts > Sharing Actions > canUserDeleteItem > should return true when canDelete is true 0ms
✓ tests/server-actions/sharing.test.ts > Sharing Actions > unshareWith > should remove share entry 0ms
✓ tests/server-actions/sharing.test.ts > Sharing Actions > unshareWith > should remove user key when no shares left 0ms
✓ tests/server-actions/sharing.test.ts > Sharing Actions > getAllSharedItemsForUser > should return empty arrays when nothing shared 0ms
✓ tests/server-actions/sharing.test.ts > Sharing Actions > getAllSharedItemsForUser > should return shared items for user 1ms
✓ tests/server-actions/sharing.test.ts > Sharing Actions > updateItemPermissions > should return error when item not shared 0ms
✓ tests/server-actions/sharing.test.ts > Sharing Actions > updateItemPermissions > should update permissions successfully 0ms
stdout | tests/server-actions/mfa.test.ts > MFA Actions > generateMfaSecret > should generate MFA secret and QR code
Generated otpauth URL: otpauth://totp/Test%20App:testuser?secret=JBSWY3DPEHPK3PXP&issuer=Test%20App
✓ tests/server-actions/mfa.test.ts > MFA Actions > generateMfaSecret > should return error when not authenticated 1ms
✓ tests/server-actions/mfa.test.ts > MFA Actions > generateMfaSecret > should generate MFA secret and QR code 2ms
✓ tests/server-actions/mfa.test.ts > MFA Actions > verifyAndEnableMfa > should return error when not authenticated 0ms
✓ tests/server-actions/mfa.test.ts > MFA Actions > verifyAndEnableMfa > should return error when verification code is invalid 1ms
✓ tests/server-actions/mfa.test.ts > MFA Actions > verifyAndEnableMfa > should enable MFA and return recovery code when verified 1ms
✓ tests/server-actions/mfa.test.ts > MFA Actions > verifyMfaCode > should return error when not authenticated 0ms
✓ tests/server-actions/mfa.test.ts > MFA Actions > verifyMfaCode > should return error when MFA not enabled 0ms
✓ tests/server-actions/mfa.test.ts > MFA Actions > verifyMfaCode > should return error when code is invalid 0ms
✓ tests/server-actions/mfa.test.ts > MFA Actions > verifyRecoveryCode > should return error when not authenticated 0ms
✓ tests/server-actions/mfa.test.ts > MFA Actions > verifyRecoveryCode > should return error when MFA not enabled 0ms
✓ tests/server-actions/mfa.test.ts > MFA Actions > verifyRecoveryCode > should return error when recovery code is invalid 0ms
✓ tests/server-actions/mfa.test.ts > MFA Actions > getMfaStatus > should return error when not authenticated 0ms
✓ tests/server-actions/mfa.test.ts > MFA Actions > getMfaStatus > should return MFA disabled status 0ms
✓ tests/server-actions/mfa.test.ts > MFA Actions > getMfaStatus > should return MFA enabled status with enrollment date 0ms
✓ tests/server-actions/mfa.test.ts > MFA Actions > getMfaStatus > should return error when user not found 0ms
✓ tests/server-actions/mfa.test.ts > MFA Actions > adminDisableUserMfa > should return error when not admin 0ms
✓ tests/server-actions/mfa.test.ts > MFA Actions > adminDisableUserMfa > should return error when target user not found 0ms
✓ tests/server-actions/mfa.test.ts > MFA Actions > adminDisableUserMfa > should return error when MFA not enabled for user 0ms
✓ tests/server-actions/mfa.test.ts > MFA Actions > adminDisableUserMfa > should return error when recovery code is invalid 0ms
✓ tests/security/guards.test.ts > Security: Route Guards > redirectGuards > should redirect unauthenticated users to login 2ms
✓ tests/security/guards.test.ts > Security: Route Guards > redirectGuards > should not redirect for /auth paths 0ms
✓ tests/security/guards.test.ts > Security: Route Guards > redirectGuards > should not redirect for /migration paths 0ms
✓ tests/security/guards.test.ts > Security: Route Guards > redirectGuards > should not redirect for /public paths 0ms
✓ tests/security/guards.test.ts > Security: Route Guards > redirectGuards > should redirect authenticated users away from /auth 0ms
✓ tests/security/guards.test.ts > Security: Route Guards > redirectGuards > should allow authenticated users to access protected routes 0ms
✓ tests/security/guards.test.ts > Security: Route Guards > redirectGuards > should allow authenticated users to access notes 0ms
✓ tests/security/guards.test.ts > Security: Route Guards > redirectGuards > should allow authenticated users to access checklists 0ms
✓ tests/security/guards.test.ts > Security: Route Guards > redirectGuards > should handle missing pathname header by redirecting unauthenticated users 0ms
✓ tests/server-actions/archived.test.ts > Archived Actions > getArchivedItems > should return error when not authenticated 1ms
✓ tests/server-actions/archived.test.ts > Archived Actions > getArchivedItems > should return empty array when no archived items 1ms
✓ tests/server-actions/archived.test.ts > Archived Actions > getArchivedItems > should return archived checklists 1ms
✓ tests/server-actions/archived.test.ts > Archived Actions > getArchivedItems > should return archived notes 1ms
✓ tests/server-actions/archived.test.ts > Archived Actions > getArchivedItems > should return both archived checklists and notes 0ms
✓ tests/server-actions/archived.test.ts > Archived Actions > getArchivedItems > should sort archived items by updatedAt descending 0ms
✓ tests/server-actions/archived.test.ts > Archived Actions > getArchivedItems > should include isShared flag in archived items 0ms
✓ tests/server-actions/archived.test.ts > Archived Actions > getArchivedItems > should include full item data in archived items 0ms
✓ tests/server-actions/archived.test.ts > Archived Actions > getArchivedItems > should handle errors gracefully 0ms
Test Files 25 passed (25)
Tests 433 passed (433)
Start at 14:06:03
Duration 5.16s (transform 511ms, setup 210ms, import 1.96s, tests 1.08s, environment 2ms)
Done in 5.39s.