Commit Graph

12920 Commits

Author SHA1 Message Date
kolaente
a6bdeb67b0 feat: add jwtttlshort config key for session tokens
Adds ServiceJWTTTLShort (default 600s) to control the lifetime of
short-lived JWTs issued during token refresh. The existing jwtttl
and jwtttllong keys remain for session expiry and long sessions.
2026-02-25 10:30:25 +01:00
kolaente
04e60472b7 feat: add sessions table migration
Adds the `sessions` table for storing server-side session records.
Each row tracks a session ID (UUID), user ID, hashed refresh token,
device info, IP address, and timestamps.
2026-02-25 10:30:25 +01:00
kolaente
c8ea673653 docs: instruct agents to save test output instead of re-running tests
Adds guidance to always pipe expensive test commands (e2e, web, feature)
through tee to a log file, so agents can re-read the output for analysis
instead of re-running the full test suite with different grep/tail filters.
2026-02-25 09:22:14 +01:00
renovate[bot]
91e68168d0 chore(deps): update dependency electron to v40.6.1 2026-02-25 09:00:29 +01:00
kolaente
94edaefced chore(deps): update ajv to 6.14.0 2026-02-24 21:52:28 +01:00
kolaente
6de82db7e4 fix: decouple webhook dispatch from email/mailer config
The reminder and overdue crons now always run and dispatch webhook
events. Email notifications are only sent when both
ServiceEnableEmailReminders and MailerEnabled are true. Webhook
dispatch errors are logged but no longer abort the cron run.
2026-02-24 20:24:56 +01:00
kolaente
54aacd3707 feat: dispatch TaskOverdueEvent from overdue cron 2026-02-24 20:24:56 +01:00
kolaente
626e731ae4 feat: dispatch TaskReminderFiredEvent from reminder cron 2026-02-24 20:24:56 +01:00
kolaente
83dc7537c4 feat: register reminder and overdue events for webhooks 2026-02-24 20:24:56 +01:00
kolaente
e04c1a3d2e feat: add TaskReminderFiredEvent and TaskOverdueEvent types 2026-02-24 20:24:56 +01:00
kolaente
36af5345d2 chore(dev): add sample config to gitignore 2026-02-24 15:33:21 +01:00
kolaente
edae87f2a0 fix(release): skip upx compression for windows arm64 binaries
UPX 5.0.0 does not support win64/arm64, causing CantPackException
and failing the release build.
2026-02-24 14:40:40 +01:00
kolaente
4325eae4d4 fix(tasks): show drag handle icon on mobile devices (#2286)
Resolves https://github.com/go-vikunja/vikunja/issues/2228
2026-02-24 14:37:33 +01:00
kolaente
0c7c07b3b8 fix: preserve teams external_id type when renaming on mysql
Avoid using the generic renameColumn helper for this migration on MySQL because it renames columns as BIGINT. Handle the teams oidc_id -> external_id rename with a MySQL-specific CHANGE statement that keeps VARCHAR(250) and remains idempotent.
2026-02-24 14:29:49 +01:00
kolaente
3d6c527b64 fix: cast bucket_configuration to text in postgres catchup query
The new catchup migration compared the postgres JSON column with string literals using !=, which fails in migration smoke tests. Use a PostgreSQL-specific WHERE clause with ::text and cover it with unit tests.
2026-02-24 14:29:49 +01:00
kolaente
99ac3e65b8 fix: add comprehensive catchup for bucket and filter format migrations
Convert bucket_configuration filters regardless of bucket_configuration_mode and catch remaining view-level filter values still stored in the legacy string format. Includes focused tests for the bucket conversion helper logic.

Fixes #2172

Fixes #2188

Fixes #2202
2026-02-24 14:29:49 +01:00
kolaente
4acad97688 fix: make teams oidc_id rename migration idempotent
Use the shared renameColumn helper for non-SQLite databases and skip the SQLite table rebuild when oidc_id is already absent. This prevents failures after partial upgrades where the column was already renamed.

Refs #2172

Refs #2285
2026-02-24 14:29:49 +01:00
kolaente
b1534f1cc8 fix: replace tx.Sync() with explicit ALTER TABLE in webhooks migration
tx.Sync() fails on PostgreSQL because it tries to reconcile primary key constraints/indexes, causing index-drop errors. Use explicit ALTER TABLE ADD COLUMN with existence checks instead.

Fixes #2215
2026-02-24 14:29:49 +01:00
kolaente
7c04d44e2e fix: wait for router before dismissing loading screen
The loading screen was dismissed as soon as auth check completed, but
before Vue Router's initial navigation finished. This caused route.name
to be undefined momentarily, making showAuthLayout evaluate to false
and briefly flashing the NoAuthWrapper (login shell) before the
authenticated layout appeared.

Wait for router.isReady() before setting ready = true so the loading
screen stays visible until the route is fully resolved.
2026-02-24 13:13:30 +01:00
kolaente
f7a93e4ca3 fix: prevent cursor reset when typing in filter input (#2287)
Fixes #2268
2026-02-24 11:50:45 +00:00
kolaente
9e633b3e82 fix(task): disable Confirm button when no date is selected in absolute reminder picker
Prevents emitting a reminder with reminder=null/relativeTo=null when
the user clicks Confirm without selecting a date first.

Refs #2208
2026-02-24 11:57:39 +01:00
kolaente
5dcea199d2 fix(test): update existing reminder tests to click Confirm after date selection
The DatepickerInline quick-select buttons (Tomorrow, etc.) inside the
reminder popup no longer auto-save. Update existing tests to click
Confirm after selecting a date.

Refs #2208
2026-02-24 11:57:39 +01:00
kolaente
f6a35416e5 test(task): add e2e tests for reminder confirm-before-save behavior
- Test that clicking a date in the absolute reminder picker does not
  auto-save, only saves when Confirm is clicked
- Test that the Confirm button is visible when task has no due date
  (defaultRelativeTo is null)

Refs #2208
2026-02-24 11:57:39 +01:00
kolaente
b65773eb8f fix(task): require explicit confirmation before saving reminders
Prevent reminders from being saved to the API until the user clicks
Confirm, matching the behavior of the due/start/end date pickers.

- Remove @update:modelValue handler on DatepickerInline so date/time
  changes only update local state
- Change Confirm button condition from showFormSwitch to activeForm so
  it renders even when defaultRelativeTo is null
- Add confirmAndClose function that handles both absolute and relative
  reminder forms
- Remove debounce (useDebounceFn) since saves are now user-initiated

Refs #2208
2026-02-24 11:57:39 +01:00
kolaente
56eb5d3740 fix: show tasks spanning entire gantt date range
Tasks whose start date is before and end date is after the visible
gantt range were not shown because the API filter only checked whether
individual date fields fell within the range. Add a fourth filter
clause to match tasks that fully encompass the visible date range.

Fixes go-vikunja/vikunja#2269
2026-02-24 11:51:13 +01:00
kolaente
a13ecbd3cc fix: prevent browser from caching API responses
Without explicit Cache-Control headers, browsers may heuristically cache
API JSON responses. This causes stale data to be served on normal page
refresh (F5) — for example, projects newly shared with a team not
appearing until the user performs a hard refresh (Ctrl+Shift+R).

Add Cache-Control: no-store to all API responses via middleware and
configure the service worker's NetworkOnly strategy to explicitly bypass
the browser HTTP cache for API requests.

Ref: https://community.vikunja.io/t/team-members-cannot-see-project/1876
2026-02-24 10:37:49 +01:00
Frederick [Bot]
19ccc3cb8e chore(i18n): update translations via Crowdin 2026-02-24 01:13:27 +00:00
renovate[bot]
f362738e33 chore(deps): update dev-dependencies to v8.56.1 2026-02-23 20:50:07 +01:00
kolaente
249b651692 fix: treat archived TickTick tasks as done during import
TickTick uses status "2" (Archived) for completed tasks that were
subsequently archived. The import only checked for status "1"
(Completed), causing archived tasks to be imported as open despite
having a completion timestamp.

Closes go-vikunja/vikunja#2278
2026-02-23 14:52:20 +01:00
renovate[bot]
524d8f522d chore(deps): update dependency caniuse-lite to v1.0.30001774 2026-02-23 10:24:42 +01:00
renovate[bot]
5ff1596314 chore(deps): update dev-dependencies 2026-02-23 10:14:21 +01:00
kolaente
1ccc8dce3a fix: load file content before generating attachment preview
LoadFileByID() was called after the preview branch, so GetPreview()
received a nil io.Reader causing a panic in image.Decode.
2026-02-22 09:28:25 +01:00
kolaente
d222d4502a fix: escape attachment download filename 2026-02-22 00:00:11 +01:00
kolaente
c6370bb739 fix: fall back to application/octet-stream when the file has no mime type stored 2026-02-22 00:00:11 +01:00
kolaente
55c122fb42 feat: add repair-file-mime-types CLI command
Add a CLI command that finds all files in the database with no MIME type
set, detects it from the stored file content, and updates the database.
This is useful for backfilling MIME types on files created before MIME
detection was added on upload.
2026-02-22 00:00:11 +01:00
kolaente
4915f535d0 fix: add Content-Disposition attachment header to task attachment downloads
Set Content-Disposition to "attachment" instead of "inline" so browsers
trigger a file download with the correct filename. Also move shared
response headers (Content-Type, Content-Length, Last-Modified) out of
the S3-specific branch so they apply to both storage backends.
2026-02-22 00:00:11 +01:00
kolaente
519f66a51f fix: detect and store mime type when creating file attachments
Use mimetype.DetectReader in files.Create to automatically detect and
store the MIME type from file content. This fixes task attachment
previews, S3 Content-Type headers, and UI display for newly uploaded
files.
2026-02-22 00:00:11 +01:00
renovate[bot]
4babc477ef chore(deps): update dev-dependencies 2026-02-21 23:12:36 +01:00
kolaente
4cee2cf128 fix: reset throttle on logout so checkAuth clears auth state
logout() calls checkAuth() to clear the authenticated flag and user
info. But since checkAuth() likely ran within the last minute (on the
navigation that triggered logout), the now-working throttle would
return early, leaving authenticated=true in the store despite the
token being removed. This could cause Login.vue to redirect back
to home.

Resetting lastUserInfoRefresh to null before checkAuth() ensures
the logout flow always runs fully.
2026-02-21 23:08:24 +01:00
kolaente
65806df605 fix: keep token expiry in sync when skipping setUser from JWT
When the setUser call is skipped for an already-loaded user,
info.value.exp was never updated with the renewed token's expiry.
This caused useRenewTokenOnFocus to compute a stale expiresIn,
eventually forcing a logout even though the token was still valid.

Now we always update exp from the JWT, even when skipping the
full setUser call.
2026-02-21 23:08:24 +01:00
kolaente
1d420dd1dc fix: don't overwrite user info with incomplete JWT data on navigation
The JWT token only contains id, username, type, and exp — not the
display name. Previously, every route navigation called setUser() with
this incomplete data, causing the display name to flash to the username
before the API call completed and restored the full name.

Now we skip setUser() if a complete user object with the same ID is
already loaded.

Fixes https://github.com/go-vikunja/vikunja/issues/2270
2026-02-21 23:08:24 +01:00
kolaente
a11cde1afc fix: correct broken throttle in checkAuth that never triggered
The throttle checked `lastUserInfoRefresh > now + 1 minute` which is
never true since lastUserInfoRefresh is set to the current time.
Changed to `now - 1 minute` so the check actually prevents redundant
API calls within a one-minute window.
2026-02-21 23:08:24 +01:00
kolaente
1dc625f9e8 test: add unit tests for getDisplayName 2026-02-21 23:08:24 +01:00
kolaente
fec1c038ff fix: use in-memory SQLite and log temp directory cleanup in test:e2e
Switch from file-based SQLite to VIKUNJA_DATABASE_PATH=memory which uses
file::memory:?cache=shared. Also add a visible log line when cleaning up
the temp directory so the teardown sequence is clear.
2026-02-21 22:32:09 +01:00
kolaente
8f6f8f9e21 docs: document mage test:e2e in AGENTS.md 2026-02-21 22:32:09 +01:00
kolaente
d00851292d fix: use preview:dev for correct dist dir and kill process groups in test:e2e
- build:dev outputs to dist-dev/ but preview serves from dist/,
  so use preview:dev which serves from dist-dev/
- pnpm spawns child processes, so SIGINT only hits the wrapper;
  use setpgid + kill(-pgid) to terminate the entire process group
2026-02-21 22:32:09 +01:00
kolaente
51a9f9c9f8 fix: fix API_URL trailing slash and remove CORS env var overrides in test:e2e
The API_URL needs a trailing slash so Playwright resolves relative URLs
correctly (e.g. "test/users" → "/api/v1/test/users" instead of
"/api/test/users"). CORS env vars are removed because Viper parses
comma-separated env vars as a single string instead of a slice, breaking
origin matching. The defaults already include the correct patterns.
2026-02-21 22:32:09 +01:00
kolaente
c5ae7974e1 feat: add mage test:e2e for isolated end-to-end testing 2026-02-21 22:32:09 +01:00
kolaente
6a4401eb7c feat(frontend): make dev server port configurable via VIKUNJA_FRONTEND_PORT env var 2026-02-21 22:32:09 +01:00
Frederick [Bot]
05ff67b681 chore(i18n): update translations via Crowdin 2026-02-21 01:09:54 +00:00