mirror of
https://github.com/wekan/wekan.git
synced 2026-11-25 04:49:41 -05:00
fe65bb658dffaf737fa37b97abaf38ac03b58665
9
Commits
| Author | SHA1 | Message | Date | |
|---|---|---|---|---|
|
|
bb76e7bf10 |
Snap: remove the database setting. There is one answer, and it is FerretDB.
`snap set wekan database=mongodb|ferretdb` is gone, and so is `snap run wekan.database`. WeKan runs on FerretDB on every platform; MongoDB is in the amd64/arm64 snaps to be READ while a migration is owed. A setting could say something the data did not support, and every way it could was a report: set to mongodb it kept a site on the database the snap migrates away from, for good, because nothing ever set it back - including instances a failed migration or a wrong staleness guess had put there; set to ferretdb with no FerretDB present it would have served an empty site, so the guard against that had to exist anyway; and each script carried its own copy of "which database is this, then". snap-src/bin/database-role replaces it. One helper, asked by wekan-control, mongodb-control, ferretdb-control, migration-pending, attachment-repair and the configure hook, answering from the data: a FerretDB with something in it and a migration that has finished means ferretdb, MongoDB data with the migration still owed means mongodb. An interrupted migration is told from a finished one by the importer's checkpoint, so a partial FerretDB resumes and a finished one whose marker went missing is not migrated over again (#6585). An empty FerretDB beside a MongoDB full of boards is never served. The explanatory page is no longer a dead end: when this snap cannot read the MongoDB files but a FerretDB copy is there, the copy is served - older beats unreadable - and the page says the snap keeps trying rather than giving a command to type. A snap that still has the old setting is told once that it is ignored, and it is unset. docs/Platforms/FOSS/Container/Snap/Migration-to-FerretDB.md is the design in one page: all text data to SQLite, CollectionFS and Meteor-Files attachments to the filesystem, the card History with it, which MongoDB versions can be read, when it runs, what happens when it fails, and how two copies are reconciled. The Admin Panel, Snap and CPU-platform docs point there instead of documenting a setting that no longer exists. Nine guards updated; each says in it which decision changed and why. Thanks to xet7 ! |
||
|
|
1e9e58dab6 |
Docs: the Admin Panel documentation mirrors the Admin Panel menu, and says what is there now.
Both remaining documentation entries of CHANGELOG's TODO Later, done together
because they are the same sweep.
A menu path is a docs path now. Admin Panel / Settings / Visibility is
docs/Features/Admin-Panel/Settings/Visibility.md; Admin Panel / People / Teams is
People/Teams.md; and each of the four sections has an index listing its panes in
menu order. Before this a reader could not map what they were looking at to a file:
the folder held Admin-Panel.md plus two loose pages, and the prose still described
panes that had moved or gone.
What the prose now says, and did not:
* Version is a Settings pane and the one that opens with the Admin Panel; the
Info tab is gone and /information redirects.
* Visibility is four groups with a Save each - All Boards: Hide, URL, Product
name, Logo - and absorbed Allow-private-boards-only.md and Custom-Logo.md,
which were separate pages for two of its settings.
* Layout is PWA, and holds only the PWA settings: everything else in it moved to
Visibility. Wait-Spinners.md pointed at Layout and now points at the group it
is in.
* Registration is People / Login, one "Login: Allow" group of checkboxes, and
the Accounts pane is gone - allow e-mail change is in People / E-mail, username
change and self delete in People / Login.
* The e-mail domain field decides who may INVITE while self-registration is off,
not who may sign in.
* The board-member restriction is two checkboxes, in Organizations and in Teams.
* The Features tab is gone: its panes are the Settings group of Problems, whose
menu is two named groups. Undo.md, which plans a Features / Delete pane, says
so where it plans it.
* Attachments has a page per menu entry, Backup first, and Problems' index
describes today's two groups.
Every link into the moved pages was updated - docs/README.md, Features.md,
Boards.md, Templates.md, Status.md, Members.md - and every relative link inside the
Admin Panel tree resolves.
wekan.fi: the Admin Panel row of docs/index.html described the old panes (Features,
Info, Translation as tabs; "registration, accounts, table visibility, layout"), the
Registration control row named settings that have moved, and install/index.html sent
readers to Settings/Layout for the logo. Those are edited in ../w/wekan.fi and left
uncommitted there, as that repository is not this one.
Thanks to xet7 !
|
||
|
|
33a0cf6160 |
Design docs: move Table-Page.md under Design/Page/, and add Left-Menu.md.
docs/Design/Table-Page.md -> docs/Design/Page/Table.md, with every reference updated: the three design docs that link to it (History, CPU-usage, Recovery), the code comments in the shared template, stylesheet and helpers, and the four test suites that read it. Its own link to History.md is re-based, since the file is one level deeper now. docs/Design/Page/Left-Menu.md is the second page design: the menu beside the content on every Admin Panel page. It records what those seven menus share, which pages use it, the entry shape, and how a page adds one. Which side it is on is part of the design, not an accident of the markup: for a left-to-right language the menu is on the LEFT with the content to its right; for a right-to-left language the whole panel MIRRORS - the menu is on the right, the content to its left, and inside each entry the icon and label mirror too. That works only through the document direction plus logical CSS, so the doc says to never write left/right/margin-left/padding-left for this menu. Checking that turned up two places where the current CSS did exactly that: - .side-menu had `box-shadow: inset -0.2vh ...`. An inset shadow offset on the X axis is a PHYSICAL direction and does not mirror, so it shaded the wrong inner edge once the menu moved to the right. The X offset is dropped. - the entries used `padding: 1.3vh 0 1.3vh 1.3vw`, i.e. padding-LEFT, so under an RTL language the indent stayed on the left - the outer edge of a right-hand menu. Now padding-block + padding-inline-start. Theme: the menu was entirely hard-coded greys. Most of it stays neutral on purpose - it is chrome, and tinting the whole card would fight the content beside it - but the entry you are ON now takes the per-user theme accent (Member Settings -> Change color sets --theme-accent on :root), with `inherit` as the fallback so the WeKan default look is byte-for-byte unchanged when no colour is chosen. No brand colour is hard-coded in the menu. The shared pieces are in place: client/components/settings/leftMenu.jade renders the menu from an item list, and models/lib/leftMenu.js turns (items, activeId) into it - marking exactly ONE entry active, dropping conditional holes, and supporting group separators. Tests: tests/leftMenu.test.cjs is the one suite for this design - the pure helpers, the template, the mirroring, the theming, the shared narrow-window stacking, and that every path in the doc's related-files table exists. NOT done yet: the seven Admin Panel templates still render their own copy of the menu markup. Converting them to +leftMenu is the next step; the design, the template, the helpers and the tests it will be checked against are ready. Thanks to xet7 ! |
||
|
|
9791993d59 |
Table pages: one design, one implementation, and a layout that fits the window.
Files, Rules, Boards, Cards, Impersonation, Recovery and the four event streams
(Security, Speed, Tests, CPU usage) were ten copies of the same page: the same
title + search + prev/next markup, the same currentPage/totalPages helper pair,
and the same click/keydown handlers, retyped with a different js- prefix each
time. They had drifted apart, and any layout fix had to be made ten times.
They now render through ONE template and differ only in a column list:
{ label | labelKey, value(doc), align, nowrap, cls, userId(doc), data(doc) }
- client/components/settings/tablePage.jade - title, optional status row,
controls, table. The row ORDER is defined here once.
- client/components/settings/tablePage.css - the layout.
- models/lib/tablePage.js - pure pageInfo() / buildRows() / buildHeader() /
columnWidthPercent(), unit-tested without a browser or a database.
adminReports.jade 349 -> 112 lines, its CSS 134 -> 53, ten templates -> four,
twelve page/total helpers -> none, twenty-four control handlers -> four.
Layout fixes, now made once and reaching every page:
- The table is width:100% with table-layout:fixed, so every column gets the SAME
percentage of the width and the table can never grow wider than the panel. With
the default auto layout one long id or file name widened the table past the
panel and pushed its right-hand columns outside the browser window.
- Cells wrap: overflow-wrap:anywhere breaks even an unbroken id, URL or file name
inside its column. Datetime columns opt out with nowrap.
- .table-page has min-width:0 / max-width:100% so it can shrink inside the flex
.main-body instead of setting a min-content floor; only the table's own wrapper
may scroll sideways, never the page.
- At <= 800px the side menu goes full width on top and the table sits BELOW it.
This deliberately overrides the older "always side by side, even on narrow
windows" rule, which on a phone left the table a few dozen pixels wide with its
right-hand columns unreachable. Above that width the menu keeps its place and
the table sits beside it.
- Rows top to bottom: title, status (the live CPU figure on the CPU usage page),
controls, table.
Paging still loads only the current page - the publications apply limit/skip -
and loadReport now takes that window from the SAME pageInfo() call that renders
"page X / N", so what is fetched and what is displayed cannot drift apart.
Docs: the shared design moves out of the History design doc into
docs/Design/Table-Page.md, which lists every page that uses it (table name, menu
path, description) per group. History.md, CPU-usage.md and Recovery.md now link
to it and keep only what is specific to them.
Tests: tests/tablePage.test.cjs (18) covers the pure helpers - including a page
that no longer exists clamping to a real one, and a short row never shifting the
columns - plus the layout rules the doc promises and the "one implementation"
guarantee. Four existing tests that pinned the old per-report markup were updated
to the new mechanism, same intent.
Thanks to xet7 !
|
||
|
|
fae1ccd176 |
FerretDB high CPU: run FerretDB standalone (no OpLog) by default; enable the replica set / OpLog only when wekan-ferretdb-oplog=true.
The 10.16-10.21 reports of the ferretdb process pegging ~2 cores for a long time
while node sat idle are the signature of an OpLog tail: Meteor holds a tailable
cursor on local.oplog.rs and FerretDB re-scans it server-side. wekan-control
already defaults to polling-only (it clears MONGO_OPLOG_URL), but ferretdb-control
passed --repl-set-name unconditionally, so FerretDB ALWAYS maintained the capped
OpLog (a second write per mutation, a once-a-minute cleanup, and a tailable cursor
for any stray MONGO_OPLOG_URL to spin on) even when WeKan would not tail it.
Gate --repl-set-name on WEKAN_FERRETDB_OPLOG (default false), matching
wekan-control: in the default polling-only mode FerretDB now runs STANDALONE, with
no OpLog at all; the replica set / OpLog is created only when the admin opts in with
wekan-ferretdb-oplog=true. Opting in is now also cheaper on the FerretDB fork side
(the {ts: {$gt}} tail filter is pushed down and the OpLog Timestamp indexed).
Docs: docs/Features/Admin-Panel/Problems/Migrations.md (FerretDB reactivity mode).
Test: tests/ferretdbOplogGating.test.cjs.
Thanks to xet7 !
|
||
|
|
c4a76e0e3d |
Docs: Admin Panel / Problems — README overview + Snap commands + Repairs / Migrations / Login-Problems pages.
docs/Features/Admin-Panel/Problems/README.md describes what Problems offers and links the detailed pages (existing CPU/RAM/Disk/Recovery plus the new Repairs, Migrations, Login-Problems and Snap pages). Snap.md documents `snap run wekan.problems` and its sub-commands (migrations | login | broken-cards | cpu). Repairs.md / Migrations.md cover the shared board data-repairs and the MongoDB <-> SQLite migration, when they run (board open, server startup, during migration) and the progress dashboard. Login-Problems.md explains the "Must be logged in" / "Loading, please wait" causes and fixes, tying them to a saturated ferretdb. Thanks to xet7 ! |
||
|
|
8e4d57c21d |
Show a recovery maintenance page on all FerretDB v1 platforms
During a #6492 data recovery, users should never see a bare connection error. Two layers now cover the whole window on every FerretDB v1 launch path (snap, bundled release, Docker): - In-app spinner (already present): the server clears the RECOVERY_IN_PROGRESS marker only after a real health probe, so the full-screen overlay behaves identically everywhere. - Static bridge page (new, cross-platform): for the brief window while a just-restored FerretDB comes back up and before Meteor can serve the client, the launch scripts serve a tiny standalone "recovering your data" page (HTTP 503) on the web port. The snap reuses wekan-maintenance-page.mjs with a recovery wording; release/Docker serve the portable recovery-bridge.mjs. The bridge is time-bounded (WEKAN_RECOVERY_BRIDGE_SECONDS, default 20s) so it can never block WeKan from starting, hands straight over to the in-app spinner, and is skipped if its page file or the marker is absent. The launch scripts do NOT delete the marker; only the server does, after verifying the database serves reads. Tests enforce the bridge is bounded, is guarded by the page file, and that no script deletes the marker. Thanks to bluetopaz1204, mueschel and xet7 ! Fixes #6492, |
||
|
|
63c77a27f4 |
Automatic recovery/remediation for the SQLite text data + Admin Panel Recovery report
Completes the #6492 data-safety system on the WeKan side (FerretDB detection/repair/cap landed in the fork): - Decision brain: models/lib/recoveryPlan.js decideRecovery() picks the least-invasive recovery when the database is KNOWN corrupt (latest good backup -> previous backup -> re-migrate from MongoDB -> manual). It never acts on a healthy/unknown database and never restores a known-bad backup. - Startup restore/re-migrate: every FerretDB launch path (snap, bundled release, Docker) can restore the text data BEFORE FerretDB opens the files, on request (WEKAN_FORCE_RESTORE env or a RESTORE_REQUESTED marker). It copies a known-good backup INTO the live database (dropping stale WAL side-files); backups are never deleted and the main wekan.sqlite is only overwritten, never removed. remigrate is delegated to migration-control. Attachments/avatars on the filesystem are untouched. - Recovery events: the scripts append JSON lines to recovery-events.jsonl; the server (server/recovery.js) imports them into the recoveryEvents collection on startup, plus an admin-only recordRecoveryEvent method. - Admin Panel / Problems / Recovery: a new admin-only report (server/publications/recoveryReport.js, wired in adminReports.js/.jade + i18n) lists the remediation history newest-first, readies up front and fetches directly (no hang). - Docs: docs/Features/Admin-Panel/Problems/Recovery.md. Tests (wired into npm run test:unit:node), verified by mirror since there is no Node runtime here to execute them: - recoveryPlan.test.cjs (decision logic, positive + negatives) - recoveryEventsJsonl.test.cjs (parser: skips junk, normalizes severity, never throws) - recoveryReportQuery.test.cjs (search selector escapes regex metacharacters) - recoveryReportWiring.test.cjs (report wired; publication/count/method admin-gated) - ferretdbTextDataBackup.test.cjs extended: restore copies from a backup, is request-gated, and NEVER deletes the live text data or a backup copy Thanks to bluetopaz1204, mueschel and xet7 ! Fixes #6492, |
||
|
|
f306061273 |
docs: Admin Panel / Problems monitors under Admin-Panel/Problems/ + RAM & Disk designs
Move CPU-usage design under docs/Features/Admin-Panel/Problems/ and add RAM-usage and Disk-usage design docs (siblings of CPU-usage): both log how much RAM+swap / disk is used and record only the START and END of each sustained high-usage period to Admin Panel / Problems, mirroring the CPU-usage monitor's shape (hysteresis tracker, event stream, env vars). Link them from the Admin-Panel index and update the now-automatic card loading description. Update the CHANGELOG link to the moved CPU-usage. |