Commit Graph
76 Commits
Author SHA1 Message Date
Lauri Ojansivu b6a3d98736 Admin Panel / Problems: Memory Usage and Disk usage reports.
The RAM and Disk usage pages were designs that no code carried out. Both
monitors now run beside the CPU one and, like it, record only the start and
the end of a sustained high-usage period:

- Memory: RAM from /proc/meminfo's MemAvailable - os.freemem() is MemFree,
  which counts the page cache as used and shows a healthy server as full -
  and swap, which alone also starts a period. Without /proc/meminfo it uses
  what Node reports. Settings WEKAN_RAM_* and WEKAN_SWAP_HIGH_PERCENT.
- Disk: each filesystem WeKan writes to - the files root, its temp directory
  for uploads and the snap's data directory - measured once per device, with
  an episode of its own. WEKAN_DISK_WATCH_PATHS replaces the paths.
- Each report has a live line above its rows and a URL
  (/admin/problems/ram, /admin/problems/disk). The menu and titles use the
  existing memory-usage and sandstorm-disk-usage keys, which every language
  translates, and the Summary names the cpu, ram and disk streams.

Observe and report only, as designed. The three monitors share one event
recorder (server/lib/resourceLog.js) and one intEnv (models/lib/intEnv.js),
which three files had each defined. The pure halves are tested without
Meteor, and resourceMonitorsWiring checks the wiring and that no copy of
either shared piece returns.

Thanks to xet7 !
2026-10-17 01:14:16 +03:00
Lauri Ojansivu b7589737f5 File docs/Features the way the WeKan menus are.
A feature's guide now sits under the menu it is used from, read from the
templates rather than from where somebody once put it: Header-Bar,
All-Boards, Pages, Board-Header (search and every Board View), Board-Sidebar
(Board Settings, Filter, Members, Labels, Archive), Rules, Swimlanes, Lists,
Cards, Member-Settings, Admin-Panel and Login-Page. Topics used from several
menus (editor, history, theme, translations, email, troubleshooting) are in
General.

- Each area has a README mapping its menu entries to their guides and to the
  template or server module that implements them. Board-Header/README.md
  lists all 40 Board View entries with the template boardBody.jade renders;
  five views (Table, Calendar Mode, Time, Timeline, Map) have no guide of
  their own yet and say so.
- Board-View.md listed 25 views while BOARD_VIEWS has 40; it now lists all
  of them with their English labels.
- Pages keep their file names. Where a released changelog links an old path,
  a "# Moved" page stays there and points to the new one; test-menu.sh skips
  folders holding only those.
- Undo was filed under Login; it is General/Undo now.
- Every link in docs, code comments, scripts and tests follows the move;
  docsLinksResolve checks them all.

Tests that read a doc follow it to its new place. boardViewSettings now fails
when Board-View.md or Board-Header/README.md differs from BOARD_VIEWS, or
names a template boardBody.jade does not render.

Thanks to xet7 !
2026-10-16 23:45:35 +03:00
Lauri Ojansivu 70dcc2a134 Remove files nothing uses, and point their tests at the code that runs.
Found by following every import, re-export and require from client/main.js
and server/main.js (meteor.mainModule: only what that reaches is loaded) and
each local package's package.js:

- packages/wekan-fullcalendar/fullcalendar/ (88 files) and update.sh: the
  vendored FullCalendar v3 and the script that updated it as a git
  submodule; the package takes FullCalendar 5 from npm (Npm.depends).
- packages/wekan-fontawesome/fontawesome-free: js/, sprites/, metadata/,
  attribution.js and the .min.css copies; package.js adds only the plain CSS
  and the webfonts. Its package.json no longer names the removed files.
- models/lib/propagateMembers.js and models/lib/teamBoardMemberSync.js:
  replaced on 2026-10-14 by models/lib/groupBoardMembership.js (memberships
  that record their team or org, #4178), which the server uses. Their tests
  exercised the old modules; the same scenarios now run against planGain /
  groupChanges, and the wiring checks are kept.
- models/lib/recoveryPlan.js and its test: a model of the SQLite recovery
  policy that nothing ran; releases/ferretdb/sqlite-recovery.mjs carries it
  out and tests/sqliteVerifiedRecovery.test.cjs tests that. The Recovery
  design page says so.
- packages/wekan-ldap/server/configResolver.js: a vendored copy nothing
  imported - the LDAP package reads its settings through the app's
  accessor. Its sync test is now a check that no package carries such a
  copy; three comments that sent readers to it explain the reason instead.

docs/Design/TeamsOrganizations.md also said losing a team removes nothing;
since #4178 a team takes back what it gave.

Thanks to xet7 !
2026-10-16 22:54:48 +03:00
Lauri Ojansivu 79ac301675 Email bounces with Amazon SES, Problems -> Email, and runtime tests for sending and receiving.
Email that comes back is handled in WeKan instead of landing in the
administrator's own inbox. Admin Panel -> E-mail -> Bounces: hard bounces
(a mistyped invited address), soft bounces, automatic replies and spam
complaints, each with actions done after a count - list it, stop emailing
the address, tell who invited it, delete the invitation, ignore - as
listmonk and Discourse do it, and the list of addresses that bounced, which
an admin clears to email them again. Amazon SES Bounce and Complaint
notifications and mail SES receives arrive through SNS at
/api/inbound-email/ses, signature-checked against Amazon's certificate and
accepted only from the topics the Admin Panel lists. Delivery status
notifications and out-of-office replies arriving by IMAP, a provider
webhook or a Sandstorm grain are bounces too, never cards.

Admin Panel -> Problems -> Email shows what went wrong sending or
receiving: a send the mail server refused or could not reach, an IMAP
mailbox that cannot be read (never with its password), an unreadable
email, an email for a board that no longer takes email. Attempts stay in
Problems -> Security. The inbound email endpoints no longer need the whole
REST API turned on.

Runtime tests run WeKan's own transports against local SMTP and IMAP
servers over TCP, a real Sandstorm Maildir, the webhook over HTTP and
signed SNS messages; UI tests drive the Email and Chat views, the
email-to-card settings and the Bounces page. They found and this fixes:
every whole-message parse failed in the server bundle (nodemailer's
addressparser resolved to its ESM build), the Chat view's drag and drop
never started (dragscroll took the mouse) and dropped a card into the
target's previous list, and the Chat panes did not follow a change to a
right-to-left language.

Thanks to xet7 !

Fixes #794,
Fixes #3948.
2026-10-13 18:27:25 +03:00
Lauri Ojansivu d56bb34490 Make large boards fast on 8 GB: load only what is visible, stop re-running every minicard, and stream big attachments.
On a seeded board of 4,000 cards, 12,000 comments, 20,000 checklist items
and 32,000 activities, served from FerretDB with SQLite as the Snap is:
closing a card took about 4 s and now takes 0.1 s, the board finished
loading in 17.6 s and now in 6.2 s, a card open re-ran about 7,700
computations and now about 1,000, and FerretDB used 13 s of CPU and 724 MB
while the board opened, now 3 s and 280 MB.

- The client data cache queued one more stop callback each time a helper
  re-ran, and every check asked Tracker for dependents, which on close was
  710 walks of 3 ms; there is now one callback per computation and key and
  one timer per key (imports/lib/dataCache.js).
- Opening a card writes the user's last-viewed card, and avatars, @mentions,
  list and swimlane headers read the whole user, so everything re-ran; they
  read only the fields they show. The comment, checklist and subtask indexes
  were one object every minicard depended on and are now per card
  (imports/lib/keyedGroupIndex.js).
- The lazy card window kept a full copy of every card of a list per window;
  it keeps the id and the sort keys, runs its id query once instead of five
  times, and sends comment text only when minicards show comments
  (server/publications/cardsWindow.js, models/lib/cardWindowFields.js).
  Comment reactions and legacy attachment lookups come with the opened card
  only.
- Attachment downloads honour Range for filesystem, GridFS and cloud
  storage (206, 416, If-Range); uploads to cloud storage are spooled to a
  temporary file and streamed instead of gathered into one Buffer; the API
  copy checks the size limit before reading; the legacy attachment
  migration streams, and no longer stores "[object Promise]" as a file; the
  board export no longer concatenates buffers quadratically.

The FerretDB fork pushes dotted-path filters such as meta.cardId down to
SQLite (they were each a full scan) and decodes only the fields a count
filters on. docs/Features/Admin-Panel/Problems/Large-Boards.md describes how
a large board loads and how to size a server with 8 GB of RAM.

Thanks to markusst1982 and xet7 !

Fixes #6745.
2026-10-09 13:28:08 +03:00
Lauri Ojansivu e8fac5e85c Record every board import before its first write, and let an admin keep or discard an interrupted one.
An import that stopped halfway - a restart, a hung writer, a failure - left a
partial board nothing recorded. Each board import, copy, Trello zip and
Trello API import now writes an importRuns record first, with the id its new
board will have; every creator inserts the board with that id and the run's
id stamped on it. A heartbeat keeps the run alive; the method deadline now
stops the writer at its next step. A scan at startup and every 5 minutes
flags a stopped or failed run once and records it in Admin Panel ->
Problems -> Recovery, where an administrator keeps the partial board or
discards it: only the board carrying the run's stamp is removed, through the
board's own removal, then whatever else has its id. Discard is refused while
the import's Scrum stage is still written or recovered, and the Scrum resume
is refused while the import is discarded. Resume is deliberately not
offered: the source file is not kept, for its size, its personal data and
the anonymization it would undo; discard and import again instead.

Thanks to xet7 !
2026-10-08 12:44:46 +03:00
Lauri Ojansivu cb69750b17 Let administrators discard List Sync operations that cannot be replayed.
A saved List Sync operation whose list was removed, recreated or
reconfigured, or whose actor lost full-list write access, could never be
replayed. The replay job refused it every minute with only a console line,
and because a new Sync of the list resumes the pending operation first,
that list could not Sync at all.

Such an operation is now marked once, with one Recovery event, and a
blocked manual Sync says why. Admin Panel / Problems / Recovery lists these
operations with what they applied and their live replayability. An
instance administrator can discard one only while the same checks a replay
makes still fail. The discard holds the list's Sync lease, records one
immutable decision, then removes the saved steps and the operation marker,
reading each removal back. It writes no card: changes already applied stay
and the rest are never written. A retry or a second administrator only
finishes the removal, and a replay that finds a decided discard completes it
instead of resuming. The intent stays as evidence and the discard is
audited in Recovery.

Unit, source-wiring and negative tests cover recording once, refusing
non-administrators and replayable operations, and discarding twice; an app
test and a Playwright case cover the Recovery page. New interface text is
in English, pending Transifex.

Thanks to xet7 !
2026-10-08 11:53:06 +03:00
Lauri Ojansivu 6ed28c41f7 Run manual and scheduled Sync through the durable journal, with replay.
The write-ahead Sync journal and its stored stages - History, activities,
rules, notifications, webhooks - were built and tested but never called:
manual and scheduled Sync wrote cards directly, so a restart mid-run lost
whatever effects had not happened yet. Maintainer decision of 2026-09-30:
finish the Scrum/Sync handoff by calling the stored stages from both.

A run now takes the durable path when it can do everything
(server/lib/listSyncSteps.js): the board enabled Sync effects (and the
instance enabled cron effects for a scheduled run), the list has a versioned
scope, and every rule action on the board - extra actions included - has a
durable adapter. Only sending email has one, so a board with any other rule
action keeps the direct writes, exactly as before; nothing that ran stops
running.

server/lib/listSyncApplication.js turns the reconcile plan into saved steps
from the stored cards, refusing a local edit made since the fetch as the
direct update would, and carrying custom fields only with a mapped estimate.
Effects are planned once with the shared planner and each step is applied
through the hooked card and activity adapters and durable delivery, as the
actor and trigger that started it. Both paths build the same new card.

A new run first finishes the list's unfinished operation, reusing the list
lease it holds instead of taking it twice. The wekan-list-sync-replay cron
job resumes interrupted operations every minute; intents now record their
trigger (version 2) so a replay runs under the same activation switches. An
operation still preparing has written nothing and is discarded - a replay has
no source data to rebuild it from.

Tests: eligibility for every condition, and step building including the
local-edit refusal (node); the direct-path suite now pins that it never calls
the durable one; a full-app run creates, updates and archives through the
journal, crashes at a card write, replays without duplicate cards or
activities, and falls back to the direct path for a rule action without an
adapter. 565 server tests pass.

Thanks to xet7 !
2026-09-30 11:29:44 +03:00
Lauri Ojansivu 778e9ed957 Show private rule email delivery reports in administrator Recovery 2026-09-28 16:06:59 +03:00
Lauri Ojansivu f1e572db5c Integrate cancelled notification payload cleanup and terminal receipt reporting 2026-09-28 15:13:39 +03:00
Lauri Ojansivu 8814dbf1f4 Compact cancelled activity payloads into permanent terminal receipts 2026-09-28 15:08:00 +03:00
Lauri Ojansivu b590d3d76f Cancel remaining activity notification delivery with permanent replay protection 2026-09-28 15:04:37 +03:00
Lauri Ojansivu 7fef4f4cdc Add administrator pause and resume controls for activity notifications 2026-09-28 15:00:31 +03:00
Lauri Ojansivu 61bca9bb42 Honor persistent activity notification holds during delivery 2026-09-28 14:55:15 +03:00
Lauri Ojansivu 614ece5397 Persist versioned activity notification hold decisions 2026-09-28 14:52:29 +03:00
Lauri Ojansivu 169a19817a Report pending activity notifications and allow guarded manual retry 2026-09-28 14:49:56 +03:00
Lauri Ojansivu 694807fc47 Compact completed notification plans without deleting replay keys
Remove rendered payloads immediately after matching intent completion and in bounded background sweeps. Require valid checksums and dispatch identity, retain pending or damaged plans, and use atomic in-place replacement with readback for uncertain acknowledgements.

Validated with 20 Node/MongoDB cases, three additional Node suites, four Meteor cases and thirteen Chromium delivery and cleanup scenarios. Operator handling and unresolved-payload retention remain open.

Thanks to xet7.
2026-09-28 14:39:16 +03:00
Lauri Ojansivu 34c6c31a48 Resume pending activity notifications with shared reservations
Scan bounded pending-intent batches after startup, advance past failed and busy rows, and coordinate immediate delivery and recovery through renewable per-intent reservations. Resume saved plans or prepare the first plan from an unchanged persisted activity; retain unresolved orphans without recreating activities.

Validated with 14 Node/MongoDB cases, three additional Node suites, four full-app Meteor cases and twelve Chromium scenarios including scheduled local SMTP recovery. Operator controls and payload retention remain open.

Thanks to xet7.
2026-09-28 14:31:47 +03:00
Lauri Ojansivu 4c762f4070 Persist ordinary notification recipients and rendered service payloads
Save a checksummed plan before delivery, bind the original activity and dispatch actor, and reuse tray receipts and email job identities on retry. Recheck current recipient scope and channel preferences without rebuilding saved content.

Validated with ten MongoDB cases, three Node suites, three Meteor cases and ten Chromium notification scenarios. Background replay, ownership and plan retention remain open.

Thanks to xet7.
2026-09-28 14:23:38 +03:00
Lauri Ojansivu 54c3130ce9 Capture activity notification intents before ordinary activity writes
Await private intent persistence before the activity insert, preserve scoped Sync deferral, and retain pending evidence until all recipient subscribers acknowledge local writes. Compact successful intents while preserving dispatch identity; keep webhook delivery independent.

Validated with six MongoDB cases, three Node suites, three full-app Meteor cases and ten Chromium email delivery and private-storage scenarios. Automatic pending-intent recovery remains unfinished.

Thanks to xet7.
2026-09-28 14:15:55 +03:00
Lauri Ojansivu 081c220103 Add write-ahead activity notification intent storage boundary
Confirm immutable intent persistence before inserting an activity, reconcile uncertain acknowledgements, and require exact activity snapshots for recovery. Bind insertion authority to the creating call so orphan retries cannot resurrect deleted activities.

Four real MongoDB fault and concurrency tests pass. This internal primitive is not activated in activity hooks; scheduling, persisted delivery plans and operator lifecycle remain open.

Thanks to xet7.
2026-09-28 14:09:41 +03:00
Lauri Ojansivu 765e2c305d Compact terminal email metadata while retaining replay receipts
Retain detailed metadata for 30 days by default, then replace terminal jobs and commands atomically with minimal permanent identities. Preserve unfinished work, holds, generation fencing and actor-bound command replays. Sweep bounded batches independently and reconcile uncertain writes.

Validated with six Node suites, real MongoDB faults and replay tests, the Meteor startup scheduler, and Chromium Recovery replay and authorization checks.

Thanks to xet7.
2026-09-28 14:06:15 +03:00
Lauri Ojansivu 7efa8ca37f Share notification delivery slots across workers and cancel lost senders 2026-09-28 13:49:39 +03:00
Lauri Ojansivu 9758886cfa Bound SMTP connection phases and idle waits
Apply configurable finite DNS, connection, greeting and idle limits to standard SMTP URLs, TLS overrides and admin providers. Keep Meteor's native standard transport and reapply limits after Sandstorm mail updates.

Eleven focused Node suites and fifteen Chromium scenarios pass. Real SMTP tests prove greeting and idle timeouts close connections, preserve queued payloads and allow later delivery. Absolute delivery deadlines remain pending.

Thanks to xet7 !
2026-09-28 03:39:45 +03:00
Lauri Ojansivu 15368a1570 Process independent email recipients with bounded concurrency
Select due recipients rather than a message-limited prefix. Share overlapping scans and process four recipients concurrently while preserving recipient leases. Verify pool limits, query recovery, large-backlog fairness and actual slow SMTP delivery.

Nine focused Node suites and fourteen Chromium scenarios pass; the strengthened scheduling-order browser case also passes. Startup-only harness was not rerun.

Thanks to xet7 !
2026-09-28 03:29:50 +03:00
Lauri Ojansivu 0457e0dfd4 Bound email retries and expose stopped delivery recovery
Persist attempt reservations before sending, classify permanent SMTP failures, add bounded jitter and retain failed messages for administrator retry or cancellation.

Verify fourteen focused Node suites and fourteen Chromium scenarios with local MongoDB and SMTP. The separate stopped-app startup harness was not rerun.

Thanks to xet7 !
2026-09-28 03:25:40 +03:00
Lauri Ojansivu 20b47995b2 Add administrator recovery controls for queued notification email
Summarize recipients without mail payloads, paginate with bounded memory, and coordinate pause/resume/cancel with sender reservations. Persist holds, cancellation cutoffs and idempotent request receipts so replay cannot undo newer actions or cancel later messages.

Verify current administrator access, interrupted commands, lost write acknowledgements, stable cancellation and private collection boundaries with MongoDB and Chromium tests. Keep translations limited to English source labels.

Thanks to xet7 !
2026-09-28 03:15:09 +03:00
Lauri Ojansivu d828411bf6 Persist notification email jobs and resume delivery after restart
Replace process-only digest timers with a private event/recipient outbox, renewable recipient reservations, persisted retry backoff and verified SMTP acceptance. Migrate legacy buffers without discarding unqueued text, retain small replay receipts, and recheck membership before delivery.

Verify MongoDB concurrency and interrupted writes, actual application startup recovery, and ten Chromium scenarios using local SMTP. Document at-least-once delivery and remaining recovery controls.

Thanks to xet7 !
2026-09-28 03:02:16 +03:00
Lauri Ojansivu 4063b423c9 Acknowledge notification email buffers only after SMTP acceptance
Await buffer persistence, serialize per-user digest timers, and remove only delivered lines. Retain failed sends and newer reply targets. Cover SMTP rejection recovery through Chromium and local SMTP capture, plus concurrent sends and database read failures.

Thanks to xet7 !
2026-09-28 02:50:31 +03:00
Lauri Ojansivu 2c91935352 Persist and validate Sync effect plans with their card units 2026-09-28 02:39:56 +03:00
Lauri Ojansivu f5e2dd0f59 Persist retryable Sync field History batches and redo snapshots 2026-09-28 02:36:02 +03:00
Lauri Ojansivu 7bf5c63d0a Require separate effect completion for durable Sync card steps 2026-09-28 02:18:15 +03:00
Lauri Ojansivu d3667f50be Verify successful Scrum restoration inserts before acknowledgement 2026-09-28 02:15:43 +03:00
Lauri Ojansivu 617ba292f9 Retain Sync completion proofs across stable request retries
Require caller-persisted intent IDs and private immutable completion records before cleanup. Resume known completions without rebuilding or reapplying cards, reject conflicting scopes and pending intents, and preserve newer operations.

Thanks to xet7.
2026-09-28 02:09:52 +03:00
Lauri Ojansivu 0c9aa707d8 Verify durable Sync cleanup before acknowledging completion
Read back plan and marker deletion, retain incomplete cleanup, resolve lost delete acknowledgements only from confirmed absence, and protect successor operations and uncertain outcomes.

Thanks to xet7.
2026-09-28 02:03:25 +03:00
Lauri Ojansivu 0d2dd1d36e Prepare conditional field patches for durable Sync steps
Compare before/after field unions without replacing unrelated metadata. Share literal snapshot predicates with production Sync, isolate result verification from driver mutation, and reject array shapes that cannot survive BSON storage.

Thanks to xet7.
2026-09-28 01:59:40 +03:00
Lauri Ojansivu 281d7f574b Preserve mapped estimate snapshots in durable Sync plans
Validate typed custom-field arrays, canonical estimate mapping identities and source baselines. Permit only the mapped field to change, retain local fields exactly, and verify persisted update/clear/create recovery and conflict retention against MongoDB.

Thanks to xet7.
2026-09-28 01:53:16 +03:00
Lauri Ojansivu 0d582c9c0a Verify Scrum undo finalization before removing recovery checkpoints
Check source integrity, conditional write results and persisted undo state. Preserve undo timestamps across retries and delete only the matching operation checkpoint. Test failed writes, damaged final state, replacement checkpoints and recovery in Node and Chromium.

Thanks to xet7 !
2026-09-28 01:07:15 +03:00
Lauri Ojansivu 484bad1d97 Acknowledge exact Scrum restoration History events on retry
Use deterministic event IDs and verify immutable contents and integrity before clearing recovery evidence. Accept exact legacy rows and lost insert acknowledgements; retain checkpoints on failed or conflicting records. Cover replay, concurrency, failed writes and damaged recovery rows in Node and Chromium.

Thanks to xet7 !
2026-09-28 01:03:10 +03:00
Lauri Ojansivu 96dba34609 Emit card activities and History only after matched writes 2026-09-28 00:53:59 +03:00
Lauri Ojansivu 487fd59882 Add persisted Sync plan checkpoints and preserve null write preconditions 2026-09-28 00:43:00 +03:00
Lauri Ojansivu 6a4e5e29a8 Expose retained Sync diagnostics in Problems Recovery 2026-09-28 00:34:27 +03:00
Lauri Ojansivu 953d8f7c13 Organize feature guides by menu and document backup alternatives
Add September feature instructions, preserve guide forwarding links, and document backup coverage with descriptive screenshots from #6683.

Thanks to markusst1982 and xet7 !
2026-09-23 18:34:37 +03:00
Lauri Ojansivu 19f740f509 Stabilize WeKan regression checks and macOS release jobs 2026-09-22 19:31:34 +03:00
Lauri Ojansivu ab11bad210 Harden Meteor 3.6 passwordless account requests 2026-09-22 19:16:55 +03:00
Lauri Ojansivu 23ed8d927f Show Meteor instrumentation in Admin Panel Problems 2026-09-22 19:07:14 +03:00
Lauri Ojansivu e8d9bf9f11 Pair IPv4 and IPv6 addresses with their locations 2026-09-22 18:47:39 +03:00
Lauri Ojansivu a990e7f202 Provide full MIME detection across server platforms
Share native file and bundled libmagic detection across uploads, extension correction and administrator file checks. Include the portable WASM database in runtime dependencies, stage native file for Snap and Linux setup, and verify release assets before smoke boot.

Cover portable detection with native file absent, missing dependencies/assets, isolated release layout and HTML diagnostics in Chromium, Firefox and WebKit.

Thanks to xet7 !
2026-09-20 21:06:30 +03:00
Lauri Ojansivu 1f5cb0d134 Add read-only file status checks to Admin Panel Problems
Add shared controls above Files, Filesystem integrity and Recovery for content/type checks, storage inventory and history correlation, with progress, cancellation and a downloadable bounded summary.

Report incomplete upload metadata separately from missing binaries. Compare filesystem and GridFS references, sizes, MIME/extension aliases, hashes and baseline evidence; correlate undo/activity history with candidate renamed or moved files. Preserve files and records, enforce administrator access and scan limits, and explicitly report unknown or unverified coverage.

Verify five focused Node suites and two browser scenarios in Chromium, Firefox and WebKit. Rerun header-first content detection in all three browsers. Document storage and verification limits.

Thanks to xet7.
2026-09-20 19:35:16 +03:00
Lauri Ojansivu bbcd98d9d8 Add REST API for attachment soft delete and restore, Admin Panel Problems, OAuth login provider and passwordless settings, card field order and pausing a rule.
Every feature of the recent releases that had a UI but no endpoint, on the
same server-side code the UI uses:

- DELETE /api/boards/:boardId/attachments/:attachmentId soft-deletes,
  POST .../attachments/:attachmentId/restore restores, and
  GET /api/boards/:boardId/attachments/deleted lists what is restorable -
  all through the attachments.softDelete / attachments.restore methods the
  card and the card history use, run as the request's user. No hard delete.
- GET /api/admin/problems (the Problems status overview plus the new-problem
  count per stream), GET /api/admin/problems/:stream (one page, with
  limit/skip/search) and POST /api/admin/problems/:stream/acknowledge,
  through the admin-only eventLog* methods the Admin Panel pages call.
- GET /api/admin/oauth-providers, PUT /api/admin/oauth-providers/:providerKey
  and PUT /api/admin/passwordless, through saveOauthProviderSettings,
  savePasswordlessSettings and getOauthProviderConfigSources. A provider's
  secret is reported only as { source, hasValue }, never its value.
- GET/PUT /api/boards/:boardId/cardFieldOrder, normalised with the same
  applyCardFieldOrder() the card renders with.
- PUT /api/boards/:boardId/rules/:ruleId accepts `enabled` to pause and
  resume a rule, and GET reports it.

The OpenAPI generator is fixed on the way: server/models/boards.js has had a
bare `catch {` since v11.67, the esprima parser cannot read that, and a parse
failure was silently skipped - so public/api/wekan.yml has shipped WITHOUT
the whole Boards API since then. It now downlevels `catch {` and
`for await (`, warns when a file cannot be parsed, and no longer emits an
empty sub-schema for a primitive array-element marker such as
`wipLimitGroups.$.listIds.$`, which made the spec unparseable YAML.
public/api/wekan.yml and wekan.html are regenerated with the release
workflow's own commands: 156 operations, up from 122.

tests/restApiNewFeatureRoutes.test.cjs pins every new route to its method,
path, @operation block and authentication check, that the OAuth endpoints
never mention a secret outside the input whitelist, the generator's two
fixes, that the generated and the committed spec carry the Boards API and the
new operations, and - as the negative sweep - that no route in models/ or
server/models/ lacks an authentication check.

Thanks to xet7 !
2026-09-11 21:18:35 +03:00