Commit Graph

13112 Commits

Author SHA1 Message Date
kolaente
73c9d63ff3 fix(migration): use echo/v5 and fix handler patterns in CSV handler
The CSV handler imported echo/v4 instead of echo/v5 (which the project
uses), used value receiver echo.Context instead of pointer
*echo.Context, and called a non-existent handler.HandleHTTPError
function. Update to match existing handler patterns.
2026-03-05 11:49:48 +01:00
kolaente
b4513384ff chore: update devenv.lock 2026-03-05 11:23:25 +01:00
kolaente
befe9ba4b6 fix(migration): reset file input value on cancel
resetToUpload() cleared state but not the file input's value, so
re-selecting the same file after cancel would not trigger a change
event in the browser.
2026-03-05 11:23:17 +01:00
kolaente
0b71a7b921 fix(migration): show error messages during CSV mapping step
The error Message was only rendered inside the upload step div, so
preview/import failures during the mapping step were invisible to
users. Move it above the step-conditional sections and remove dead
preview-errors template code.
2026-03-05 11:23:07 +01:00
kolaente
1fa65a4f90 fix(migration): remove unused error fields from PreviewResult
ErrorCount and Errors fields were never populated by PreviewImport,
making the API contract misleading. Remove them from both the Go
struct and the TypeScript interface.
2026-03-05 11:22:35 +01:00
kolaente
2e677df0d8 fix(migration): propagate specific CSV parse errors
Previously all parseCSV errors were mapped to ErrNotACSVFile, hiding
the actual cause. Now ErrFileIsEmpty is propagated correctly instead
of being misreported as an invalid CSV file.
2026-03-05 11:22:11 +01:00
kolaente
067ed65e81 fix(migration): use quoteChar parameter in CSV parser
parseCSV previously ignored the quoteChar parameter (named _). Since
Go's csv.Reader only supports double-quote, we now pre-process the
data to replace alternative quote characters before parsing.
2026-03-05 11:21:53 +01:00
kolaente
c91316362a fix(migration): route CSV migrator to dedicated page
The migration list linked all migrators to the 'migrate.service' route
by name, which loads MigrationHandler.vue. For the CSV migrator this
would result in a 400 error since it requires the multi-step
MigrationCSV.vue flow with config. Now CSV migrators link to
'migrate.csv' instead.
2026-03-05 11:21:09 +01:00
kolaente
3025214a9c fix: lint 2026-03-05 11:18:29 +01:00
Claude
8238b5dea1 refactor(migration): simplify CSV service data structures
Remove labels from service structs and move them to the component.
The service now exports simple arrays of values, while the component
handles translation through mapping functions.
2026-03-05 11:18:29 +01:00
Claude
1fc23b81cd refactor(migration): reuse existing task attribute translations
Use existing task.attributes translations instead of duplicating them
in the CSV migration section. Only keep CSV-specific translations.
2026-03-05 11:18:29 +01:00
Claude
724203237f feat(migration): add generic CSV import with column mapping
Add a new CSV migration module that allows users to import tasks from
any CSV file with custom column mapping and parsing options.

Backend changes:
- New CSV migrator module with detection, preview, and import endpoints
- Auto-detection of delimiter, quote character, and date format
- Suggested column mappings based on column name patterns
- Transactional import using InsertFromStructure

Frontend changes:
- New CSV migration UI with two-step flow (upload -> mapping -> import)
- Column mapping selectors for all task attributes
- Live preview showing first 5 tasks with current mapping
- Parsing option controls for delimiter and date format

The CSV migrator creates a parent "Imported from CSV" project with
child projects based on the project column if provided, or a default
"Tasks" project for tasks without a specified project.
2026-03-05 11:18:29 +01:00
kolaente
f5595f0ed2 chore(deps): update tar to 7.5.10 and @tootallnate/once to 3.0.1 in desktop
Both are major version overrides for transitive dependencies of
electron-builder to address security advisories.
2026-03-05 11:05:32 +01:00
kolaente
b5d8576c2a chore(deps): update svgo to 3.3.3 2026-03-05 11:05:32 +01:00
kolaente
5f0f3cc820 chore(deps): update immutable to 5.1.5 2026-03-05 11:05:32 +01:00
Frederick [Bot]
74aec78701 chore(i18n): update translations via Crowdin 2026-03-05 01:13:59 +00:00
kolaente
f9cb0a2de1 fix: include remote IP address in HTTP request logs 2026-03-04 23:47:40 +01:00
kolaente
7288483879 fix: handle deleted user in saved filter view event listener
Use a separate error variable for the user lookup in
UpdateTaskInSavedFilterViews so that ErrUserDoesNotExist does not
pollute the named return `err`. The `:=` inside the for loop shadowed
the outer `err`, leaving it set to the stale user-not-found error,
which caused the handler to be poisoned.

Closes #2359
2026-03-04 22:05:01 +01:00
Frederick [Bot]
ff70fa1369 [skip ci] Updated swagger docs 2026-03-04 19:40:40 +00:00
kolaente
b5086febc7 docs: update user search endpoint description for external team bypass 2026-03-04 20:32:11 +01:00
kolaente
54c7c4aef2 refactor: move ListUsers tests from pkg/user to pkg/models
The ListUsers function now references team_members and teams tables
via a subquery for external team discoverability. The pkg/user test
environment only syncs user tables, so these tests need to run in
pkg/models which has the full schema and all fixtures.

Also adds new tests for the external team discoverability bypass
directly in the models package alongside the moved tests.
2026-03-04 20:32:11 +01:00
kolaente
06617891fa test: verify email masking for external team name search 2026-03-04 20:32:11 +01:00
kolaente
28b913f29f feat: bypass discoverability settings for external team members 2026-03-04 20:32:11 +01:00
kolaente
3a730165bc test: add tests for external team user discoverability bypass 2026-03-04 20:32:11 +01:00
kolaente
64e455a613 test: add user 11 to external team 14 for discoverability tests 2026-03-04 20:32:11 +01:00
renovate[bot]
fd2001851d chore(deps): update dependency electron to v40.7.0 2026-03-04 18:42:22 +01:00
Weijie Zhao
54d977532e fix: allow browser caching for file downloads (#2349) 2026-03-04 17:43:03 +01:00
Frederick [Bot]
740ec183d9 [skip ci] Updated swagger docs 2026-03-04 16:29:06 +00:00
kolaente
9c23e19644 fix: preserve cover image when duplicating task
Track old-to-new attachment ID mapping during duplication and
re-set CoverImageAttachmentID on the new task if the original
had a cover image configured.
2026-03-04 17:20:26 +01:00
kolaente
7aad96b199 fix: close source file handle when duplicating attachments
Save the source file handle before calling NewAttachment (which
overwrites attachment.File) and use defer to ensure it gets closed.
This prevents file descriptor leaks on both success and error paths.
2026-03-04 17:20:26 +01:00
kolaente
692357a648 refactor: use TaskRelation.Create for copy relation
Use the TaskRelation Create method instead of raw inserts. This
handles the bidirectional relation automatically and dispatches
the appropriate event.
2026-03-04 17:20:26 +01:00
kolaente
e07eeed211 refactor: batch label inserts during task duplication
Collect all LabelTask records in the loop and insert them in a single
database call instead of inserting one at a time.
2026-03-04 17:20:26 +01:00
kolaente
6da0f68562 fix: remove debug log statements from task duplicate
Remove all log.Debugf calls from the Create method as they were
leftover development aids and should not be in production code.
2026-03-04 17:20:26 +01:00
kolaente
6c9407c58f feat: add duplicate button to task detail view 2026-03-04 17:20:26 +01:00
kolaente
2014d50b95 feat: add duplicateTask action to task store 2026-03-04 17:20:26 +01:00
kolaente
52bee379d4 feat: add task duplicate frontend model and service 2026-03-04 17:20:26 +01:00
kolaente
4d494ba442 test: add web integration tests for task duplication 2026-03-04 17:20:26 +01:00
kolaente
77fdf1b84b feat: register task duplicate API route 2026-03-04 17:20:26 +01:00
kolaente
d8f3a96b06 feat: add task duplicate backend model and tests 2026-03-04 17:20:26 +01:00
kolaente
cd7d40583a fix: only dump Vikunja-owned tables
Same fix as WipeEverything - use the registered table list instead
of x.DBMetas() to avoid including PostgreSQL extension tables in
database dumps.
2026-03-04 15:37:54 +01:00
kolaente
14e2c95a83 fix: only drop Vikunja-owned tables in WipeEverything
Previously WipeEverything used x.DBMetas() which returns all tables
in the database, including those owned by PostgreSQL extensions like
PostGIS. This caused restore to fail with 'cannot drop table
spatial_ref_sys because extension postgis requires it'.

Now uses the registered table list instead.

Fixes go-vikunja/vikunja#2219
2026-03-04 15:37:54 +01:00
kolaente
0a8534ded9 feat: add RegisteredTableNames helper to db package 2026-03-04 15:37:54 +01:00
kolaente
3dd2ba4aa4 feat: register Vikunja tables with db package at init 2026-03-04 15:37:54 +01:00
kolaente
d26936f869 feat: add table registration to db package
Part of the fix for dump/restore failing when PostgreSQL extensions
add extra tables (e.g. PostGIS spatial_ref_sys).
2026-03-04 15:37:54 +01:00
renovate[bot]
3fad03d40f chore(deps): update dependency rollup-plugin-visualizer to v6.0.11 2026-03-04 11:03:35 +01:00
kolaente
18f16878a8 fix: prevent nil pointer panic in mention notification listeners
When a task bucket is updated without changing buckets (early return in
updateTaskBucket), b.Task remains nil. The TaskUpdatedEvent was then
dispatched with a nil Task, causing a nil pointer dereference in
HandleTaskUpdatedMentions when accessing event.Task.Description.

This adds:
- A nil guard in TaskBucket.Update to skip event dispatch when b.Task is nil
- Nil checks in HandleTaskUpdatedMentions, HandleTaskCreateMentions,
  HandleTaskCommentEditMentions, and UpdateTaskInSavedFilterViews
- Tests verifying the handlers gracefully handle nil task events

Closes #2351
2026-03-04 10:29:16 +01:00
kolaente
f0ead6049d fix(ci): remove HTML comments inside table that break markdown rendering 2026-03-03 17:04:06 +01:00
kolaente
c7fa08c14c feat(ci): post preview deployment comment on PRs
Add a github-script step to the preview workflow that creates or updates
a comment with preview URLs (pr-number and per-commit SHA) and Docker
image tags. Past SHA URLs are preserved across pushes so reviewers can
access any previously built version.
2026-03-03 16:51:21 +01:00
kolaente
79ac50b99b fix(test): update mobile kanban test to use close button instead of back button
The back button was removed from modal mode in the previous commit.
On mobile kanban, tasks open as modals, so the test now uses the
close button from the Heading component instead.
2026-03-03 16:04:37 +01:00
Claude
8a4f3a916f fix: remove duplicate close button on mobile task detail view
When viewing a task in modal mode on mobile, both a back button and a close button were displayed, causing confusion. The back button condition `!isModal || isMobile` meant it would show on mobile even in modal mode.

This fix changes the back button to only display when not in modal mode (`!isModal`), ensuring only the close button appears when viewing tasks in a modal on mobile devices.

Also removed the now-unused `isMobile` variable and its import.
2026-03-03 16:04:37 +01:00