Commit Graph

13708 Commits

Author SHA1 Message Date
kolaente
692249fa04 fix(spike): remove broken TestDoCreate_HappyPath
The handler package has no TestMain to initialize DB/fixtures, so the
test panics on nil pointer deref when run via mage test:feature (which
walks every package) even though it was hidden when running only
mage test:web. DoCreate is already covered end-to-end by
TestHumaLabel_Create_ReadOne_via_OAS31Route in pkg/webtests.
2026-04-20 12:24:07 +02:00
kolaente
0b08131dad style(spike): fix lint issues introduced by Huma spike
License headers on new files, gofmt on routes.go import ordering,
unused imports in test files, testifylint assert.Contains/InDelta,
and infertypeargs cleanups.
2026-04-20 11:14:29 +02:00
kolaente
4b1202df17 test(spike): verify OAS 3.1 spec exposes label paths 2026-04-20 11:11:35 +02:00
kolaente
7bd561ded8 test(spike): Label round-trip through Huma OAS 3.1 routes 2026-04-20 11:05:39 +02:00
kolaente
898ca26627 fix(spike): mount Huma under /oas3 and translate Vikunja errors
Three follow-ups to Task E2 needed to make the routes functional end to end:

- Echo v5 panics on duplicate (method, path) registrations, so the
  Huma-backed label routes live under /api/v1/oas3/labels for the spike.
  The legacy /api/v1/labels endpoints remain unchanged.
- Huma's built-in /openapi.{json,yaml,docs} routes are disabled. The spec
  is re-exposed via a handler on the unauth group so clients and tooling
  can fetch it without a bearer token, matching the /docs.json treatment.
- Errors returned from the shared handler.Do* pipeline (echo.HTTPError,
  web.HTTPErrorProcessor) are translated into Vikunja-shaped
  huma.StatusErrors, preserving the legacy {code, message} body contract
  instead of Huma's default "unexpected error occurred" wrap.

Also sets humaConfig.FieldsOptionalByDefault=true so PUT/POST bodies
don't need to include derived fields like created/updated/created_by.
2026-04-20 11:05:36 +02:00
kolaente
aef4cc3f8a feat(spike): register Label via Huma alongside legacy routes 2026-04-20 10:57:35 +02:00
kolaente
75a9ad4555 feat(huma): generic CRUD registrar for CObject resources 2026-04-20 10:56:33 +02:00
kolaente
5ba404ac58 refactor(handler): extract DoDelete from DeleteWeb 2026-04-20 10:52:08 +02:00
kolaente
d677e40597 refactor(handler): extract DoUpdate from UpdateWeb 2026-04-20 10:50:51 +02:00
kolaente
be988d47e2 refactor(handler): extract DoReadAll from ReadAllWeb 2026-04-20 10:50:02 +02:00
kolaente
12feb63e4c refactor(handler): extract DoReadOne from ReadOneWeb 2026-04-20 10:48:56 +02:00
kolaente
19fa92febf refactor(handler): extract DoCreate from CreateWeb 2026-04-20 10:48:03 +02:00
kolaente
00d394ed9f feat(huma): error formatter matching legacy Vikunja JSON shape 2026-04-20 10:43:42 +02:00
kolaente
abc0cdfc6a feat(auth): add GetAuthFromContext for Huma handlers 2026-04-20 10:43:15 +02:00
kolaente
1d6c1cf838 test: humaecho5 adapter roundtrip and spec serving 2026-04-20 10:41:45 +02:00
kolaente
35f9c4b684 feat: vendor humaecho adapter for echo/v5 2026-04-20 10:41:25 +02:00
kolaente
37adc38df7 chore: add github.com/danielgtaylor/huma/v2 dependency 2026-04-20 10:39:18 +02:00
renovate[bot]
326874d94c chore(deps): update dev-dependencies 2026-04-20 06:18:12 +00:00
Frederick [Bot]
56aef03697 chore(i18n): update translations via Crowdin 2026-04-19 01:46:56 +00:00
Frederick [Bot]
9b46ad8ecc chore(i18n): update translations via Crowdin 2026-04-18 01:23:08 +00:00
kolaente
89af0a6c14 refactor(frontend): use FormCheckbox for remember-me on Login 2026-04-17 12:54:17 +00:00
kolaente
b9f6eabe2c refactor(frontend): use form primitives in WebhookManager 2026-04-17 12:54:17 +00:00
kolaente
cab970b59b refactor(frontend): use form primitives in user settings General view 2026-04-17 12:54:17 +00:00
kolaente
a6811a922a refactor(frontend): support two-col layout on FormField 2026-04-17 12:54:17 +00:00
kolaente
59e7c9bce3 feat(frontend): add FormCheckbox primitive component 2026-04-17 12:54:17 +00:00
kolaente
740546ee5a feat(frontend): add FormSelect primitive component 2026-04-17 12:54:17 +00:00
kolaente
875f685caf feat(frontend): add FormInput primitive component 2026-04-17 12:54:17 +00:00
Dávid Takács-Tolnai
e624c8a296 fix(desktop): rebuild tray menu in place instead of recreating the Tray
The old setupTray() called tray.destroy() before creating a new Tray. On
Linux with KDE Plasma 6 Wayland, tray.destroy() does not actually remove
the icon from plasmashell (electron/electron#49517), so the new Tray
registers a fresh dbusmenu while plasmashell keeps talking to the
orphaned one. Menu items still render (cached layout) but every
com.canonical.dbusmenu.Event("clicked", ...) method call from plasmashell
hits the destroyed handler and is dropped, so menu-item click callbacks
stop firing after the frontend triggers a rebuild on login.

Move the one-time Tray construction (icon, tooltip, click handler)
behind a !tray guard and keep setContextMenu in the always-run path. The
desktop:update-quick-entry-shortcut IPC handler keeps calling setupTray()
and the accelerator label updates without touching the native Tray.
2026-04-17 07:49:16 +00:00
kolaente
10e5fa915a refactor(frontend): drop Bulma components/navbar import
.navbar and .navbar-end are only used in AppHeader.vue. Ports the
relevant rules (z-index 30 and min-block-size: $navbar-height) into
its scoped <style> block and drops the partial import.
2026-04-17 07:43:35 +00:00
dependabot[bot]
10ec3b55b0 chore(deps): bump dompurify from 3.3.2 to 3.4.0 in /frontend
Bumps [dompurify](https://github.com/cure53/DOMPurify) from 3.3.2 to 3.4.0.
- [Release notes](https://github.com/cure53/DOMPurify/releases)
- [Commits](https://github.com/cure53/DOMPurify/compare/3.3.2...3.4.0)

---
updated-dependencies:
- dependency-name: dompurify
  dependency-version: 3.4.0
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-04-16 13:01:57 +00:00
renovate[bot]
7abac42daa chore(deps): update dependency electron to v40.9.1 2026-04-16 13:01:42 +00:00
kolaente
21dcb76dc7 chore(mage): silence gosec on worktree branch-exists helpers
The branch name is supplied by the developer running the mage task,
so flagging it as tainted input is a false positive.
2026-04-16 15:00:26 +02:00
Tink
95ec3325c2 refactor(frontend): migrate .box to Card and drop Bulma elements/box (#2640) 2026-04-16 14:14:36 +02:00
Tink
19ee7f26ee refactor(frontend): drop Bulma components/card import (#2639) 2026-04-16 14:12:36 +02:00
kolaente
56a7db5a0d feat(mage): support existing branches in dev:prepare-worktree
Detect local and remote branches by name and check them out instead of
always creating a new one.
2026-04-16 13:40:18 +02:00
Frederick [Bot]
3120c2b12c chore(i18n): update translations via Crowdin 2026-04-16 01:46:56 +00:00
kolaente
50465818ae refactor(frontend): drop Bulma components/media import
The .media / .media-left / .media-content classes are only used in
Comments.vue. Ports the relevant rules into its scoped <style> block
and drops the partial import.
2026-04-15 20:15:42 +00:00
kolaente
3c3b1820a1 refactor(frontend): port is-pulled-right locally and drop Bulma float helper
Only .is-pulled-right is used (3 callsites); .is-pulled-left and
.is-clearfix from Bulma's helpers/float partial have zero usage. Ports the
one needed rule into theme/helpers.scss so the Bulma import can go.
2026-04-15 20:12:45 +00:00
renovate[bot]
2ae194e943 chore(deps): update dependency postcss to v8.5.10 2026-04-15 16:25:26 +00:00
renovate[bot]
85dbef8330 chore(deps): update dependency stylelint to v17.8.0 2026-04-15 15:49:30 +00:00
kolaente
d09ef36bd4 fix(frontend): guard Object.keys against null in refactored helpers
typeof null === 'object', so null slipped past the type guards in
objectToCamelCase/objectToSnakeCase/prepareParams. The original
for...in loops silently iterated nothing on null; Object.keys(null)
throws. Also guard saveCollapsedBucketState where state[projectId]
may be undefined.
2026-04-15 11:44:47 +00:00
kolaente
dd83e0d42b refactor(frontend): replace reverse-index splice loops with findIndex/filter
Single-match removals use findIndex + splice; the reminder-null cleanup
uses filter since model.reminders is on a local shallow clone.
2026-04-15 11:44:47 +00:00
kolaente
2c6029eac4 refactor(frontend): replace for...in usages and forbid via lint rule
Replaces 33 for...in loops across 18 files with for...of + Object.keys/entries
or indexed for loops. for...in iterates enumerable string keys including
inherited ones, which is especially risky on reactive arrays (tasks, labels,
assignees, etc.) where polyfilled properties may appear.

Loops that mutate via splice during iteration now iterate backwards to avoid
index-shift bugs. Adds a no-restricted-syntax ESLint rule forbidding
ForInStatement to prevent regressions.

Closes #513
2026-04-15 11:44:47 +00:00
kolaente
95180a341d refactor(frontend): drop unused Bulma form/file partial import
Every file input in the codebase is hidden (via class="is-hidden" or
scoped display:none) and triggered programmatically by a custom XButton.
None of Bulma's .file / .file-label / .file-cta / .file-input / .file-name /
.file-icon classes are used anywhere in .vue files, so the partial is dead
code.
2026-04-15 11:06:11 +00:00
kolaente
39c804f460 refactor(frontend): drop unused Bulma modal partial import
Vikunja's Modal.vue uses a native <dialog> element with its own locally-
scoped classes (modal-dialog, modal-container, modal-content, modal-header).
None of Bulma's modal classes (.modal, .modal-background, .modal-card*) are
used anywhere in the app. The two CSS variables this partial provided
(--modal-card-head-padding, --modal-content-spacing-tablet) were inlined in
the two callers in the previous commits, so the whole partial is now dead
code.

Modal.vue already had several 'reset bulma' overrides fighting the default
rules Bulma applied to .modal-content; those can be cleaned up in a
follow-up.
2026-04-15 10:56:48 +00:00
kolaente
d05fd4dbb2 refactor(frontend): inline modal-content-spacing-tablet in PDF preview
The --modal-content-spacing-tablet CSS variable is provided by Bulma's
components/modal partial. Inlining Bulma's default (40px) lets us drop that
partial.
2026-04-15 10:56:48 +00:00
kolaente
0b2f625f06 refactor(frontend): inline modal-card-head-padding in Card footer
The --modal-card-head-padding CSS variable is provided by Bulma's
components/modal partial. Inlining Bulma's default (20px) lets us drop that
partial without needing a local redeclaration.
2026-04-15 10:56:48 +00:00
kolaente
35f183979c feat: add license comments for agents and humans 2026-04-15 10:32:37 +00:00
kolaente
a82bea567a feat(db): add license_status table migration
Add database migration for the license_status table that stores instance
ID, cached license validation response, and validation timestamps.
2026-04-15 10:32:37 +00:00
kolaente
7dd664fdc4 feat(init): integrate license validation into startup and shutdown
Call license.Init() after database initialization and before the web
server starts. Call license.Shutdown() during graceful shutdown to stop
the background check goroutine.
2026-04-15 10:32:37 +00:00