Start the shared scheduler and use valid daily expressions. Preserve all
application collections, BSON types, indexes and selected file versions in
portable archives, validate content before restore, and report failures.
Document every Admin Panel implementation and its validation limits. Add
real-database round trips, failure cases and browser coverage for scheduling,
restore, file downloads, every pane route and permission boundaries.
Thanks to markusst1982 and xet7 !
Fixes#6683,
THE PDF THAT WAS AN HTML PAGE. Not a broken PDF - WeKan's own page, saved as
`<card>.pdf`. Every export in the interface is a download from an `/api/...`
address, and server/apiMiddleware.js refuses every /api request unless WITH_API
is exactly "true". It refused by answering `301 Location: /`, so the browser
followed it to the front page and the download link's `download="<card>.pdf"`
wrote the HTML it got there to that name. Reproduced against the running
instance: `GET /api/boards/x/exportPDF` -> 301.
Two faults, and either alone is enough:
* The bundle launchers did not set WITH_API. The snap has defaulted it to true
for years (snap-src/bin/config) and every docker-compose*.yml in this
repository sets it, so the bundle was the ONE platform where exporting was
off by default - which is why it was the one platform where an export came
back as HTML. start-wekan.sh and start-wekan.bat now default it to true,
overridable, and say WHY: the name reads like a developer feature, and
somebody switching it off to harden an instance should know they are turning
off every export in the interface.
* The refusal was a redirect. Whatever the setting, "the API is off" must not
arrive as a page: it is now 403 text/plain saying that exports use the API
too and naming the variable to set. A 403 with a sentence in it cannot be
mistaken for the file that was asked for.
CHECKBOXES ARE SQUARE, WHEREVER THEY ARE PUT. The export popup's unchecked box
drew a thin vertical sliver beside a long label and a proper square beside a
short one: the row is a flex container, the box is a flex item, and a flex item
shrinks. That is the THIRD time this shape has broken - settingBody.css already
carries a fix for a 41px min-height that "turns a 13px box into a tall
rectangle", and another for a `height: 100%` that stretched it - so the fix goes
in the rule that DEFINES the checkbox: `flex: none` in forms.css, for all 90 of
them across 19 templates, rather than one more local patch.
The local patch is removed with it. It had set `box-sizing: border-box`, which
would have made the export popup's boxes 13px INCLUDING their border while every
other checkbox in WeKan is 13px plus 2px - a fix for one page that made that
page the odd one out.
The Admin Panel's checkboxes are native inputs STYLED to be the material box,
and a guard already compares the two rules declaration by declaration, so they
take the new declaration too - written the same way, since `flex-shrink: 0` and
`flex: none` mean the same thing and only one of them can be compared.
Audited the rest rather than assuming: every CSS rule in the client that sizes a
checkbox gives it equal width and height, including the two "clean" board themes
that deliberately draw theirs at 24px and 18px. tests/checkboxesAreSquare.test.cjs
pins that invariant for every rule, and tests/exportNeedsTheApi.test.cjs pins
that the launchers turn the API on, that the refusal is never a redirect, and
that the exports really are /api addresses - which is what made the gate their
business in the first place.
Thanks to Heart1010 and xet7 !
The pane is called Problems in the menu, its address is /admin/problems, and
docs/Features/Admin-Panel/Problems is where it is documented. Two things still
called it Reports, from before it was renamed:
* the route NAME was 'admin-reports', where its three siblings are 'setting',
'people' and 'attachments' - the bare page key. So the one route whose name
did not match its own address;
* the template, and its three files, were adminReports.
Both are 'problems' / adminProblems now, across 41 files.
What did NOT change is `legacyBase: '/admin-reports'`. That is an address people
have bookmarked and it still redirects here - the point of the rename is that
the code agrees with the menu, not that an old link should break. The CHANGELOG
entries describing the old addresses are left alone too: a released section is a
record of what shipped.
Thanks to xet7 !
Each pass of the runner reveals the next assertion in a suite, and three of these
were broken by this morning's own fixes.
* adminCheckboxStyle: the checkbox-row ITEM rule covers two shapes now - a
label around a native checkbox, and the `a.flex > .materialCheckBox + span`
that replaced the Attachments ones - so the lookup is on the pair.
* leftMenu: a menu builder may take arguments (`function peopleMenu(user)`,
since multitenancy option D), and the helper matched `()` exactly, so it
dereferenced null.
* narrowWindowLayout: the width block was sliced up to the rule following
`position: absolute` IN it - and the hamburger is `position: static` now, the
last button in the flow rather than pinned to the corner, so that landmark
was gone and the slice ran from the start of the file. It brace-matches the
media query instead.
And two that were true before today:
* boardsVisibilitySettings: "not on screen is left alone" is
`if ($(selector).length)` - the settings are checkboxes read by `is-checked`,
not radios read by value, so `!== undefined` was the old shape.
* changelogFormat: the TODO Later section ends at whatever comes next - the
Upcoming section when there is one, otherwise the newest release. Ending it
at `# v` alone counted every Upcoming entry as a backlog entry, and those DO
thank people.
Thanks to xet7 !
The node runner now reports every failure, so each fix reveals the next
assertion in the same suite. Twelve of the twenty are green; these eight failed
on a LATER assertion than before, and one is new.
* themeColorPicker: the category titles are `text-align: start` now, not
`left` - a physical side is what tests/rtl.test.js fails on. The guard asks
for `start` and refuses a physical side.
* adminCheckboxStyle: Attachments left the "panes that use a native checkbox"
list, because that is exactly what #6465 was. It now asserts the REMOVAL,
and the Backup row is three material checkboxes in one row.
* boardsVisibilitySettings: the site-theme picker is a fifth group.
* changelogFormat: the open/close counts are taken on the MARKUP - an entry
that explains the format writes `<details>` in backticks, closed by nothing.
* leftMenu: the heading branch is read without its jade comments; the comment
says a heading has "nothing ... to read a data-id from", and the guard was
failing on the sentence that explains the rule.
* narrowWindowLayout: the drag-handle toggle has TWO rules in the phone block,
so the declarations are looked for across both instead of in the first.
* securityLog: the Problems menu is DATA now (PROBLEMS_MENU + the shared
+leftMenu), so the entry ids are asserted where they live.
* tablePage: "the global-search machinery is gone" is checked on the code with
comments stripped - the comment above the report's config names the
machinery it no longer uses.
Three of these eight were guards reading a COMMENT as if it were code or markup.
That is now a known shape: strip comments before asserting about source.
CLAUDE.md gains the workflow this came from: check the newest logs and fix WHILE
the run is still going - the node suites are the fastest signal (~15s for 260) -
and decide per failure whether the code or the guard is the wrong side, saying
in the test why when it is the guard.
Thanks to xet7 !
The new runner ran all 260 suites for the first time: 20 failed. Four were real
defects in the app, the rest were guards pinning a spelling or a design that had
since changed - each of them written when it was true, and none of them run
since, because npm stopped the chain at the first failure.
The app fixes:
* models/lib/themeAccents.js: accentOf('constructor') returned Object's
constructor - a FUNCTION - because a plain lookup answers from
Object.prototype. A board colour named after any prototype member would have
written a function into a stylesheet. Only the map's own keys are themes now.
* RTL: the dependency overlay and its connect handle each set a physical
left/right AFTER the logical property, so the physical one won and both were
pinned to the LTR side in an Arabic or Hebrew layout. The skip link, the
avatar's account badge, the stats value column and the theme-category label
were physical too. All logical now (inset-inline-*, text-align: start/end).
The guards, each corrected to what the code actually does now, with the reason:
* addBoardTileHeight, publicationArgumentGuard: a fixed-size slice
(jade + 3000, source + 1400) that a grown comment pushed the subject out of.
Both now take the whole block they are about.
* adminCheckboxStyle: the Grey Icons feature is gone; asserts its REMOVAL.
* boardsVisibilitySettings: the separator count was pinned at 3; the site-theme
picker group made it 4. Asserts the shape - one Save per section, none for
the picker that applies immediately.
* changelogFormat: "# Upcoming WeKan ® release" is a legitimate heading.
* dbConformanceWiring: the log directory honours WEKAN_LOGDIR now.
* domainTablePage: the default page is the app-wide 10, not 25.
* ferretdbOplogGating: the exec runs under the CPU launcher.
* leftMenu: peopleMenu takes the user (multitenancy option D).
* loginEmailPanesMoved: the board-member restriction is two checkboxes in
Organizations and Teams now; asserted there.
* mobileAllBoardsFit: the bell and the avatar are two rules with variants.
* narrowWindowLayout: the hamburger is the last button in the flow, not pinned.
* rulesApiTriggerNormalize: #6491 made a missing matching field mean "any
value", so the #2674 "can never match" case now matches - and removeMember
iterates assignees, not members.
* securityLog: the new-problems selector moved to models/lib/eventLogProblems.
* tablePage: the Cards report renders the page the SERVER named.
* tenantWiring: the site colour is read in two places; the autorun is the one.
* themeAccents: see above - the guard was right, the code was not.
* translationPane: the "no hand-written table" regex matched the +tablePage
include it also requires.
* uiDensity: admin table cells wrap in one td+th rule now.
* rtl: the dir attribute comes from a helper, `!important` is not part of a
value, and the scanner read CSS COMMENTS as declarations - the comment
explaining why `left: 50%` needs no RTL variant was reported as a violation.
Thanks to xet7 !
The app-wide rule that hides a native checkbox hides it in THREE ways at once:
display, visibility, and `inset-inline-start: -9999px`. The Admin Panel rule undid
the first two, so the box was on screen - 9999px to the side. Unchecked it was
simply not there; checked it appeared, because the checked state sets its own -3px
offset. That is exactly what "only the checked state is visible" was, in the
S3/MinIO, Azure and GCS panes and everywhere else a native checkbox is used.
`inset-inline-start: auto` (and `top: auto`) undoes the third.
The test now reads the hiding rule and requires the Admin Panel to undo every
property it hides with, rather than a list written by hand - so a fourth way of
hiding one would fail here instead of on screen.
Thanks to xet7 !
The material declarations were right, but one thing still fought them: forms.css
styles `input:not([type=file])` as a form FIELD - grey background, 6px radius,
padding, bottom margin, and `min-height: 41px`. Everything else was overridden;
the height floor was not, so a 13px box was drawn as a tall rectangle and the tick
it turns into was stretched with it. That is why the checked state looked roughly
right and the unchecked one did not, in Attachments / Limits / Avatars, in the
S3/MinIO, Azure and GCS storage panes, and everywhere else a native checkbox is
used.
`min-height: 0` (and `min-width: 0`) undoes it - the same reset
`input[type="radio"]` does a few lines below that rule in forms.css, for exactly
this reason.
The test now asserts every part of the form-field styling is undone, naming the
41px floor, so this cannot come back unnoticed.
Thanks to xet7 !
"Attachments, Avatars, Data (text)" already draw as the Admin Panel's checkbox -
the plain square when off, the green tick when on, animated between, like
Announcement's "Active System-Wide Announcement" - since the checkbox style was
made the material one for every native checkbox in the panel.
What they lacked was layout: three inline labels, so a label could wrap away from
its own checkbox, and the box shifts a few pixels as it turns into the tick, which
unaligned text follows. They are one flex row now, each label holding its box and
its words together.
Thanks to xet7 !
The Save inside the New and Edit popups for Translation, User, Organization and
Team is an `input[type=submit].primary.wide` in a flex `.buttonsContainer` - and
`.wide` never reached it, because the rule for it in forms.css is written as a
DESCENDANT selector, `input[type="submit"] .wide`, which an input can never match.
So those Saves were the right colour but a different, cramped size from the Save
in a pane (People / Login, People / E-mail, Visibility).
All eight popups are now listed with the panes' own Save declarations - the theme
accent, the same padding, weight and states - and each Save takes its row, which
is what `.wide` was for. The popups are named one by one on purpose:
`.buttonsContainer` is board-sidebar and member-menu markup too, and those are not
Admin Panel buttons.
The test walks the Admin Panel templates and fails if a popup with a Save is not
in that list, so the next popup added cannot quietly get a plain button.
Thanks to xet7 !
The first attempt drew the checkmark with a pseudo-element over the box. That got
the checked state right and lost the other two thirds of the checkbox: the plain
grey square when unchecked, and the 0.2s morph between them that Announcement's
"Active System-Wide Announcement" checkbox has.
The rules are now `.materialCheckBox` and `.materialCheckBox.is-checked` applied to
the input itself - the same square, the same morph into the same green tick, the
same transition - with `appearance: none` as the only addition, to take the
browser's own rendering out of it. A native Admin Panel checkbox and a WeKan one
are now the same checkbox in every state.
The test compares them declaration by declaration against forms.css, so a change
to the material checkbox that is not carried over here fails rather than quietly
leaving the two different again.
Thanks to xet7 !
A pane's Save is a `button.primary`, which forms.css themes. The Save inside the
Admin Panel edit popups (Edit User, Edit Organization, Edit Team) is an
`input[type=submit].primary.wide` in a flex row - and `.wide` never reached it,
because the rule for it in forms.css is written as a DESCENDANT selector,
`input[type="submit"] .wide`, which an input can never match. So the popups' Save
was the same colour but a different, cramped size.
Both are listed with the same declarations now - the theme accent, the same
padding, weight and states - so they cannot drift apart again, and the popups'
Save takes its row, which is what `.wide` was for.
Also: a checkbox written as `label > input + text` (Attachments / Limits /
Avatars, and the Backup checkboxes) gets the gap between box and words that the
.materialCheckBox markup gets from its own layout.
Thanks to xet7 !
WeKan hides the native checkbox app-wide and draws its own square with a green
tick - `.materialCheckBox`, which is what Admin Panel / Settings / Announcement
shows for "Active System-Wide Announcement". But several Admin Panel panes use a
real <input type="checkbox">: the storage Read toggles, the Organizations and
Teams feature columns, the Backup checkboxes, the Problems summary. Those were
either invisible, because nothing re-enabled them, or re-enabled pane by pane and
then drawn by the BROWSER - on Ubuntu a big orange box that ignored the chosen
theme entirely (orange under clearblue), at a different size in every pane.
The Admin Panel now styles them itself: `appearance: none` takes the browser's
rendering out of it, and the tick is drawn the same way .materialCheckBox draws
it - two borders of a rotated box, in the same green - so a native checkbox and a
WeKan one are the same checkbox to look at. Grey icons, disabled and keyboard
focus are handled with it, and the panes no longer each re-enable and re-size
their own.
Admin Panel / People / E-mail / Allow Email Change is one such checkbox now
instead of a Yes/No radio pair: the setting is on or off. Save below writes it as
it wrote the radios, and only when the checkbox is on screen.
Thanks to xet7 !