mirror of
https://github.com/wekan/wekan.git
synced 2026-11-25 10:48:06 -05:00
v11.21
461
Commits
| Author | SHA1 | Message | Date | |
|---|---|---|---|---|
|
|
c476ee45a9 |
Repair browser regressions found by the complete test run.
Restore inline minicard title editing, editable opened-card dates, popup focus containment, accessible loading-state controls, phone board scrolling, and browser assertions for the current card UI. Thanks to xet7 ! |
||
|
|
2c034643b8 |
Fix Admin Problems nested pagination.
Keep specialized event-stream and Office pagination events from bubbling into the shared Problems report handler, and safely ignore missing report state during pane transitions. Add regression coverage for Next, Previous, and search controls.\n\nThanks to xet7 ! |
||
|
|
ff9d0bab8b |
Add country login locations to Admin Panel People.
Place a Location column immediately before account Status. Each user shows a flag and successful-login count for every country known from that user's addresses. Clicking a country opens a Table.md report for that person. Its left menu lists countries busiest first, while the selected country shows city, IPv4, IPv6, and the person's first and last login times for each address. Search, pagination and Back use the shared table controls. Location details are fetched once per People page and restricted through the same site-admin or tenant-admin scope as the People list. Unknown locations are not guessed, stale page responses are ignored, and new logins retain their supplied location on the per-user address tally. Focused positive and negative coverage checks country totals, ordering, both address families, city rows, timestamps, menu/table wiring, authorization and missing geography. Thanks to xet7 ! |
||
|
|
480074969b |
Show available initials in the Offices people column.
The server computed each person's initials, but person grouping discarded them and the shared table tried to find the user again in client cache. Users not published to that cache therefore rendered as empty grey circles. Carry initials through every table layer and let the existing avatar template render supplied initials before falling back to its reactive user lookup. Regression coverage checks the person-grouped response, shared table cell and direct initials fallback. Thanks to xet7 ! |
||
|
|
3539f2bbf3 |
Group Admin Panel Offices login addresses by person.
Show each person's successful-login addresses together, with separate IPv4 and IPv6 columns, the latest country flag and city supplied by Cloudflare or another supported proxy, and that person's login count for each address. Search continues to match usernames, full names, addresses and locations. Address metadata for each page is fetched in one batch, and people sharing an address remain separate groups with their own counts. Focused coverage checks grouping, shared addresses, both address families, proxy location headers, missing locations and the person-first server response. Thanks to xet7 ! |
||
|
|
71abf3f487 | Explain Recovery auditing in Delete settings. | ||
|
|
4b418b0dfd | Explain permanent-delete auditing in Recovery. | ||
|
|
5f1d422117 | Filter Recovery events by operation outcome. | ||
|
|
7a0b7b7cdb |
Audit failed permanent-delete attempts with status and address.
Record successful, failed, and unauthorized permanent-delete attempts in Recovery with Boolean Done and deleted-data fields, actor ID and username, proxy-aware IPv4 or IPv6, and requested board IDs and titles. Render Done first with green success, red failure, and yellow deletion icons. Preserve original errors after recording failed attempts. Thanks to xet7 ! |
||
|
|
134bd48de5 |
Audit permanent-delete changes and board purges.
Route the Admin Panel permanent-delete toggle through a Global Admin-only server method and record actual enabled or disabled changes in Recovery with the actor username and ID. After each successful permanent board removal, record the actor plus board ID and title. Do not log no-op setting writes, failed removals, or unauthorized calls. Thanks to xet7 ! |
||
|
|
4ab3161b4f |
Add permanent delete to Admin Panel Problems.
The Delete pane sits above Notifications and exposes the existing, default-off enablePermanentDelete gate for Global Admins. It has its own URL, documentation, and regression coverage for menu order, rendering and the setting handler. Thanks to xet7 ! |
||
|
|
58bf9774a2 |
Exporting a card to PDF produced an HTML file, and checkboxes are square.
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 !
|
||
|
|
580b03e172 |
Admin Panel avatars are avatar-sized, and All Boards tiles fill their row.
Three places, one cause each, all visible as soon as the page was opened. ADMIN PANEL / PROBLEMS drew a user's photograph at its NATURAL size - a 300px portrait in a table row, a screen tall, with the login counts scattered around it. Reported for Offices and for the Impersonation Report, and it was every pane that names a user. Every avatar rule in userAvatar.css is scoped to `.member`, which is what makes an avatar 24px and round and crops the image to fill it, and the shared table page's cells had no such box: the image and the initials had been copied, and the thing they belong in had not. The cells use `.member` now rather than a fourth private copy of "how big is an avatar" - there were already three, which is how the three came to disagree - with the two board-specific declarations it carries (a float and a sidebar margin) turned off for a table. That covers every Problems pane at once, because they all draw users through the same table page and none has avatar markup of its own. ALL BOARDS / STARRED: the grey "+ Add Board" tile hung short of the boards beside it. `min-height: 114px` is a FLOOR, and a board whose title wraps to three lines grows past it; the grid stretches every other tile in the row to match, but the grey comes from the `.label` INSIDE the li rather than from the li itself, so it kept its 114px while its li grew. The li is a flex box now and the label grows into it. ALL BOARDS / HOME: "Drag a board here to open it after login" was padding around a line of text, about 85px, on a page whose entire content is that box. It stands where a board tile will be, so it is a board tile's height. CHECKED AND ALREADY RIGHT, rather than changed: Templates and the workspaces. Every view - Starred, Remaining, Home, Templates, Archive and each workspace - is the SAME `ul.board-list` with a different set of boards in it, so they share one rule, and every tile variant computes to the same 114px border-box floor. A test now pins that there is one list and that no variant sets a height of its own, so "do the workspace tiles match" keeps having one answer instead of six. tests/adminPanelAvatars.test.cjs verified to fail on the real fault: dropping `.member` reports "these avatar links are not `.member`, so the image has no size and renders at whatever the file is". Thanks to xet7 ! |
||
|
|
6dc2651b48 |
Admin Panel / Problems / API: who called which endpoint, and how often.
Every other pane under Problems answers what went WRONG. This one answers what is being DONE: `POST /api/boards` called 34 times by alice last month, 812 times yesterday by nobody with an account. Without it the only record of REST API use is whatever the reverse proxy happens to keep, and most instances keep none. The table is username, endpoint, calls, the window they fall in, and the addresses - sorted by calls, because a usage report's question is "what is used most" where a problem report's is "what happened last". THE NAME IS THE ROUTE PATTERN, NOT THE PATH. `/api/boards/:boardId/lists` is one endpoint; `/api/boards/abc123/lists` and ten thousand of its siblings are that one endpoint being used. Naming rows after paths would put a row per board in the collection - the one-row-per-event cost this whole page exists to remove - and a request that matched NO route is counted under a single "(no route)" name rather than under the path it invented, because a 404 sweep is an attacker walking a wordlist and a row per guess would let them fill the database. ONE ROW PER ACCOUNT AND ENDPOINT, which makes the account part of a row's identity - the one deliberate exception to the rule every other stream follows. For those the question is "what is happening" and the caller would multiply the rows; here "who called what" IS the report, and the cardinality is bounded by real accounts times real endpoints. The account is stored by ID, so a rename does not split its history in two. NOTHING PER REQUEST. Ordinary API traffic is not rare the way a guard firing is rare, so calls are counted in memory and folded on a timer - a thousand requests become one write. A few seconds of counts are lost if the process stops between flushes, which is acceptable here and nowhere else on this page: this report decides nothing and nothing is protected by it. The tracked pairs are capped and the rest counted, not dropped. Counting hooks the middleware chain, not the routes, so a route cannot be added without being counted - and it counts on the response's `finish` event, which is where Express has filled req.route.path and authentication has run. The pane is the SHARED event-stream report with a different column list, not a second table page. The API stream is deliberately NOT in EVENT_STREAMS: it is usage, not a problem, and an instance serving its API would otherwise report thousands of new problems. AND THE IPv4/IPv6 SPLIT IS FINISHED WHILE HERE. The summary rows have had ipv4 and ipv6 fields since the summaries were written, and not one of the four loggers ever filled them - so the columns the design asked for could not have worked. The fold splits the address now, once, for every stream, and the two columns are one shared pair used by both reports rather than a copy each. They fall back to classifying the stored `ip`, so rows written before today display correctly instead of showing two empty columns for all of history. Seven i18n keys in 239 language files, in en.i18n.json's order, English as the placeholder where nothing is translated yet. Thanks to xet7 ! |
||
|
|
ebe985d453 |
A location in an Admin Panel table opens a map, through the card's own chooser.
Admin Panel / Problems / Offices names the places accounts log in from - "London", with the country's flag - and a name is only useful if it leads somewhere. Clicking one now asks which map to open it at, from the same eleven providers a card's location offers. THE SAME CHOOSER, not a second one. The provider list was eleven options inside cardDetails.jade; it is client/components/main/mapProvider.jade now, and both callers include it. Two lists would be eleven places to add a provider instead of one, and they would disagree the first time only one was edited. The isMapProvider helper moves with it, so neither caller needs its own copy, and so do its styles - they were scoped to .js-card-location-form, which stopped being true the moment a second template used them. What the two do NOT share is the rest. A card's popup EDITS a location - name, address, coordinates, delete - and none of that applies to an office: its location arrived in a CDN header, WeKan did not ask for it and cannot correct it. So tablePageMapPopup is the map half alone: where this is, the link, the chooser, and a save that makes the choice the default for cards too, because profile.mapProvider is the one setting both read. A cell is a link only when the row HAS coordinates. A city name is not a position, and a map URL built from one would either search for the word or invent a place, so buildRows drops a location without lat/lon and the cell stays plain text. The link follows the selection BEFORE it is saved: choosing a provider and finding the link still pointing at the old one reads as broken. The handler lives on the shared table page, not on the report. That is also where the "clicking a user opens the Edit user popup" handler goes: three reports each had their own identical copy, because each was written where its own page was. A Blaze event bubbles through the template hierarchy, so one handler on tablePage reaches every report - and a report added later gets both without being told. Two things the guards caught, both worth naming. The popup had no title, which in WeKan means no header and so no close button; it opens with titleKey: 'location-open-map-at' - the phrase the chooser is already labelled with in every language - rather than adding a key to 154 files. And a comment between an `if` and its `else if` breaks jade nesting, which tests/jadeCompiles.test.cjs has a negative test for; the comments sit above the chain. Thanks to xet7 ! |
||
|
|
760bd09044 |
Admin Panel / Problems: one active pane, instead of eleven booleans saying the same thing.
Every pane on the Problems page had a ReactiveVar of its own - `this.showSummary`, `this.showSecurity`, `this.showIntegrity` and eight more - on top of `activeReport`, which already held the id of the open pane. The booleans could only ever be "activeReport equals my id", so they were forty-four lines restating one value, and keeping them in step was manual: opening a pane reset all eleven and set one. That cost a pane four wiring points instead of one, and missing any of them failed SILENTLY. Filesystem integrity got three of the four - menu entry, setter and template branch - and no helper, and in Blaze an undefined helper is not an error but a falsy value, so the pane drew a blank page while Summary went on counting the problems it could not show. The Offices pane added in this release had the same shape of hole in a different place: it set no `loading.set(false)`, so opening it would have spun for ever. The template asks `else if isPane 'report-integrity'` now, against one helper. Panes that fetch through a method rather than a subscription are a list - SELF_LOADING_PANES - which is also what fixes Offices: it is in the list, so the spinner clears. Adding a pane is a menu entry, a branch, and one line saying how it loads. The guards move with it. tests/adminPaneHelpers.test.cjs, written when the integrity pane was blank, now pins both halves of the new mechanism: the helper must exist, and every id the template branches on must be an id the menu sets - a typo either way is dead template or a blank pane, and neither says anything at runtime. tests/problemsMenuOrder.test.cjs checks the invariant for EVERY pane rather than three named ones: each menu entry must be rendered, and must either load itself or have a report config, so a pane that spins for ever cannot ship again. A negative test fails if a `this.showX = new ReactiveVar` comes back. Thanks to xet7 ! |
||
|
|
961ff6cb47 |
Admin Panel / Problems / Offices: where people log in from, grouped.
A new pane at /admin/problems/office, through the shared table page like every
other report here (docs/Features/Page/Table.md) - same layout, same search, same
paginator - so it needed no design of its own.
The columns are what an admin actually asks:
Location the country flag and the city: "London", not 100.100.100.100. An
admin recognises their own offices at a glance, and the flag says
WHICH London. Empty when nothing in front of WeKan resolved it.
Address the IPv4 or IPv6 it really is
People each account as its INITIALS, or its avatar where it has one, with
its own login count beside it - the same way the board sidebar and
a card show a member, and for the same reason: a column of avatars
fits where a column of usernames does not. Clicking one opens the
existing Edit user popup.
Logins how many, and the first-seen / last-seen window they fall in
Two additions to the shared table page rather than a second table: a cell that
holds SEVERAL people, and a leading flag kept apart from the cell's text so it
is not searched or sorted as text. Both are available to every other report now.
The pane is registered the way the others are - slug, title, menu entry,
reactive var, helper, reset and menu branch - and three guards caught the pieces
I would otherwise have missed: adminUrls wanted the URL in the design doc,
adminPanelDocsMatchMenu wanted the pane in the Problems README with its gap
count updated, and tablePage wanted the third paginator handler explained rather
than merely allowed. Ten strings in en.i18n.json, in key order, and appended to
238 language files as English placeholders for the fill rules to replace.
Thanks to xet7 !
|
||
|
|
d8d1863dba |
Login offices: who logs in from where, and users shown as initials or avatar.
WHAT WAS ALREADY THERE, checked first: server/lib/loginAttemptThrottle.js resolves a client address for the REST throttle, the lockout resolves one for DDP, models/users.js has getInitials() and profile.avatarUrl, the board sidebar and cards show members through +userAvatar / +userAvatarInitials, cardDetails.js builds "open in map" links for a dozen providers, and Admin Panel tables already had a js-table-page-edit-user handler and a `userId` column option. All of it is reused rather than rewritten; only geolocation from CDN headers is new. THE TALLY, both directions from one successful login. On the user: which addresses this account uses - `100.100.100.100 25, 122.122.122.122 50`. On a new loginAddresses collection: which accounts use each address. Capped both ways with an overflow count, as the Problems summaries are. WHY THE SECOND DIRECTION EXISTS: an address several accounts log in from is an office, a VPN, a university, a carrier's NAT. Blocking it takes everyone behind it off WeKan at once - including the reverse proxy itself if HTTP_FORWARDED_COUNT is wrong, which is every user there is. So WeKan blocks the ACCOUNT that attempted the vulnerability and never the address, and this record is what lets an admin see that shape before drawing any conclusion from an address. Blocking uses loginDisabled, the field Admin Panel / People already toggles, so an admin unblocks from the table they know and no second notion of "blocked" appears beside the one that exists. `services.securityBlock` records why, from what and when. Only a 'blocked' action at high or critical severity, and only with a userId: an unauthenticated attempt has nobody to block, and guessing from the address is the mistake above. LOCATION, when something in front of WeKan already knows it: Cloudflare, Fastly, CloudFront, Vercel, Google Cloud or a hand-configured proxy. WeKan does no geolocation of its own - no database to ship, no third-party lookup of a user's address. An office in London is labelled London. DISPLAY ONLY, and the file says so twice: anything a client can send it can forge, and X-Forwarded-For at least has HTTP_FORWARDED_COUNT to say how much to believe, where a city name has nothing. USERS AS INITIALS OR AVATAR, in every Admin Panel / Problems table at once - it is one line of the shared table page, so Security, Speed, Tests, CPU, Database, Integrity and Impersonation all change together. The name is the title, so hovering still says who it is, and clicking opens the existing "Edit user" popup. Not +userAvatar: it renders its own anchor for the board's member popup, and an anchor inside the cell's anchor is invalid and would swallow the click. mapLinkFor and its Chinese datum conversions move to models/lib/mapLink.js so the card and the Admin Panel build map links the same way, with the user's own profile.mapProvider choice applying in both. Thanks to xet7 ! |
||
|
|
fa289e4a4d |
Admin Panel Problems: the route and the template say what the menu says.
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 !
|
||
|
|
daaf563910 |
Docs: implemented designs move to docs/Features, filed the way the menu is.
A design that describes what WeKan already DOES belongs with the feature it describes, not in the folder for things being proposed. Fifteen docs move: Design/Accessibility.md -> Features/Accessibility/Accessibility-Improvements.md Design/Original-Positions.md -> Features/Board/Original-Positions.md Design/Page/* -> Features/Page/* (thirteen pages that exist) Design/AdminPanelProblems.md -> Features/Admin-Panel/Problems/Design.md What stays in docs/Design is what the folder is for: the principles (Design-Principles, Monkey-Proof-Software), the comparisons, the roadmap (Multiverse), and the proposals not yet built (Multitenancy, Autoupdate). The Admin Panel Problems design is new and covers six changes - summaries, the per-actor tally, IPv4/IPv6 columns, an API report, a per-address login tally, and blocking with increasing delays. Three are shipped and three are planned; it is filed under the feature because the pane exists, with each planned item marked so it can become plain description as it lands. Every reference in the repository is rewritten - 152 files, including the CSS comments that point at the table-page design, which a first pass over .md and .js alone missed. Two suites asserted the old paths and now assert the new ones. A moved doc whose links nobody fixed is worse than one nobody moved. Thanks to xet7 ! |
||
|
|
6e208c6152 |
Admin Panel / People shows who is locked again, and why.
Moving the lockout counter to one per (user, source address) broke three readers that were still looking at the flat field it replaced: the People table's lock icon, its unlock click handler, and the lockedUsers methods behind them. Every account would have shown as unlocked, and no admin could have unlocked one. That is the "and nowhere else" half of the rule I had just written into CLAUDE.md, missed on the very next fix. The negative test now fails if anything reads the flat field again. models/lib/accountLockout.js is the one place that knows the shape - locked or not, since when, how many addresses and how many failures between them - so the client helper, the click handler and the server methods cannot drift apart again. Admin Panel / People / People answers WHY as well as whether: how many addresses were locked out of the account and how many failures they made. WHICH addresses is in Admin Panel -> Problems, where it is a tally rather than a field on every user document. Mongo cannot ask "which accounts are locked" over dynamically-named subdocuments without an aggregation, so a DISPLAY field - lockedUntil - is written beside the per-address state for that query alone. It is not the counter: the decision stays per address, and a test fails if the decision or the scope ever reads it, because a field that says "this ACCOUNT is locked" is the vulnerability that was just fixed. Unlocking one address clears it only when no other address is still locked. Thanks to daniais and xet7 ! |
||
|
|
d5b69137cc |
Font size setting moves all of the text, not the part written in rem.
Picking Largest grew the page heading and the minicards and left the header bar, the left menu, the lists, the swimlane header and every popup exactly as they were. The preset was a percentage on the root element, and a root percentage only reaches text whose size is written in a relative unit: rem is measured against the root, em against its parent. WeKan writes most of its sizes in px, and px is absolute, so exactly the rem-sized parts scaled. The base rule made it worse: html, body, input, select, textarea, button re-stated font: 14px, so the body took the stock size straight back off the scaled root. The preset is published as a number as well (--wekan-ui-font-scale), and every px font-size and line-height in the client stylesheets - 433 declarations across 37 files - is written calc(14px * var(--wekan-ui-font-scale, 1)). line-height scales with the size on purpose: 21px of type in an 18px line box is the same setting half-applied. The base font rule is split into font-family and font-size, because the shorthand's size was the one thing the setting had to be able to move. Nothing renders differently until a preset is chosen: the fallback is 1 and the variable is removed for Default. tests/uiFonts.test.cjs fails on any bare px font-size or line-height, so a new one cannot quietly opt out of the setting; the two density guards unwrap the calc as they read the file, so each still pins the size it means. Thanks to xet7 ! |
||
|
|
146a5184d9 |
Attachment migration: keep a binary two records share, and name a missing one.
Moving attachments from MongoDB CollectionFS to File-System stopped on some of them with "FileNotFound: file 66336fc372e64200010f4832 was not found", and the reporter had it exactly: it is the identical files. A CollectionFS filerecord points at its binary by copies.<coll>.key, the id of a file in the cfs_gridfs.<coll> bucket, and two filerecords can carry the SAME key - the same file attached twice, or a board copied with its attachments. The migration deleted the binary as soon as it had moved the first of them, so the second read a file that was no longer there. The binary now goes only when no other filerecord still names it, asked after the record itself is deleted so it cannot count itself. When that question cannot be asked at all, the binary stays: a file left behind can be removed later, an attachment deleted out from under another record cannot be brought back. A binary that really is missing - metadata restored without the chunks - is no longer a MongoDB stack trace naming a GridFS id. It names the attachment, says where it was looked for, and is counted as SKIPPED rather than failed, because there was nothing to move; the Admin Panel's summary line shows both counts, so a run that leaves attachments behind cannot look like one that moved everything. tests/collectionFsSharedBinary.test.cjs pins the shared-binary check, the order it is asked in, and that a skipped record is not a failure. Thanks to sbruckmueller and xet7 ! Fixes #6596, |
||
|
|
b77299c806 |
Fix the client bundle dying at startup: a component must load its own
template.
Reported from testi.wekan.fi, on the SIGN-IN page:
Uncaught TypeError: can't access property "helpers",
Template.exportScopeBody is undefined
[UserAccounts] Warning no template passwordInput found!
`Template.exportScopeBody.helpers(...)` runs at module scope and throws when
the template is not defined yet. That does not break one popup: it stops the
module evaluating, so every template registered after it never registers -
which is why a sign-in form nobody had touched came up blank.
The central lists in client/features/*.js import a component's .jade before
its .js, and that is enough for a component nobody else imports. The export
popup body is imported by sidebar.js, by cardDetails.js and by the import
page, so whichever of those the graph reaches first evaluates it, long
before the feature list gets to the template. It imports its own .jade now.
The module cache makes the second import free, and the order stops being a
hope.
tests/clientBundleImports.test.cjs gains the rule - a component .js that
other components import, that registers on a template of the same basename,
must import that template - and it found a second file already in that
state: migrationProgress.js, imported by boardBody.js. Fixed the same way
rather than excepted, since it is one line and the failure it prevents takes
the whole client with it.
Thanks to xet7 !
|
||
|
|
6420819cfa |
Clicking an open card closes it, and a focused checkbox is not a diamond.
The two newest comments on #6465. CLOSING BY CLICKING AGAIN was not a missing feature - it was an unreachable one. clickOnMiniCard already ended with } else if (Session.equals('currentCard', card._id)) { Utils.goBoardId(Session.get('currentBoard')); but the TITLE branch above it returns before that is ever reached, and a minicard's title covers most of the minicard. So the second click almost always landed in the title branch, which unconditionally re-opened the card that was already open. The toggle worked only if you managed to click a part of the card that was not its title, which is why two people asked for a feature that was already written. The title branch now asks the same question first, and closes the same way. A click on a card that is NOT open still opens it, and still clears the phone popup ids as it did. On a mini screen the card is a popup rather than a pane, so "already open" is a different question - `popupCardId` and `Popup.isOpen()` - and that path closes with `Popup.back()`. Multi-selection still short-circuits both, so ticking cards is unaffected. THE PROBLEMS PAGE GLITCH in the screenshot is the focus ring. The Admin Panel draws its checkboxes as a material square that morphs into a tick, and the tick IS a 40-degree rotation of the element. A browser draws its focus ring around the element as it is - rotated - so a checkbox that is both checked and focused, which is exactly what a checkbox you just clicked is, comes out as a blue DIAMOND where the tick should be. The ring is not removed: keyboard users need to see where they are. It moves to the row that contains the checkbox, which is not rotated - every one of these sits inside a label (problemsSummary.jade) - so it is a normal rectangle around the whole row, which is easier to see than a 13px box anyway. `:focus-visible`, so a mouse click does not leave a ring behind. tests/cardClickToggle.test.cjs pins that the close decision comes before re-opening (or it never happens), that opening a different card and the existing non-title toggle both still work, that multi-selection still wins, that the tick is still the rotation, and that the label nesting the ring relies on is really there. Thanks to csonkaoszimt, Heart1010 and xet7 ! |
||
|
|
aed26c6771 |
Version: one table with combined category rows, over two 50% columns.
The pane was five tables, one per category, and five tables size their columns independently: "WeKan ® Version" made the first one's label column wide and "OS Type" made the next one's narrow, so the values started at a different x in every group and the pane read as five unrelated things. One table now. Each category is a ROW in it - a th with colspan=2, bold and start-aligned - so it says what the rows under it are about instead of being a label with an empty cell beside it. A colgroup of two 50% columns plus table-layout:fixed puts every label and every value in the same place down the whole pane, and settingBody.css's 240px header cap is undone for this table only, since the width is now stated outright and the cap would fight it. The category title takes the table's own font size deliberately: at the pane title's size five of them would read as five pane titles and "Version" would be lost among them. Two of the repo's own guards caught mistakes on the way, which is what they are for. tests/jadeCompiles.test.cjs refused `th(colspan=2)`: the Meteor jade dialect wants the value quoted, and an unquoted one is a build failure rather than a rendering difference. tests/rtl.test.js refused `text-align: left`: the label column is on the RIGHT in Arabic and Hebrew, so it is `start`. tests/versionPaneCategories.test.cjs follows the new shape - exactly one table, five tr.info-category rows each spanning both columns, the colgroup and table-layout:fixed that make the 50/50 real, and the category title bold with no font-size of its own. The row-by-category and no-row-was-lost checks are unchanged and still pass, so the regrouping moved nothing. Thanks to xet7 ! |
||
|
|
01c36852da |
Filesystem integrity showed a blank page: the helper was never added.
Admin Panel / Problems / Filesystem integrity drew nothing at all - the pane title and then empty space - while Summary went on reporting "7 new problems" for it. Everything about the pane looked right, which is why it survived: the menu has a report-integrity entry, clicking it is handled, the handler sets tmpl.showIntegrity, the template has `else if showIntegrity.get` and an +eventStreamReport(stream="integrity") under it. The one missing piece was the HELPER. showIntegrity() was never added beside showDatabase() and the eight others, and in Blaze an undefined helper is not an error - it is falsy. So the branch never ran, the page was blank, and nothing anywhere said why. The helper is there now, and tests/adminPaneHelpers.test.cjs guards the class rather than this one pane: every `show*.get` branch in a settings template must have a helper of that name in that template's own .js, and a ReactiveVar behind it. The templates are FOUND, not listed, so a pane added later is covered without editing the test. It also names Filesystem integrity's four wiring points one by one, because that is the pane that was three-quarters wired. Checked in the failing direction: removing the helper again fails the test with the reason. Thanks to xet7 ! |
||
|
|
5091c3883a |
Version pane: the packaging row is package, and its value is never translated.
The label was `Platform_packaging` / "Installed as". It is `package` / "Package"
now: a short key for a short column, in the vocabulary the rest of the pane uses.
The half that matters more is the VALUE. bundle.zip, Snap, Docker and Sandstorm
are the names of the things themselves - a package format, a store, a product -
not words describing them, so they are not translated anywhere and none of them
is an i18n key. What an admin reads in the pane is then the same string they can
put in an issue, search the docs for and grep a log with, in every language; a
translated "Ohjelmapaketti" in a Finnish screenshot would match nothing anybody
can look up.
The test carries both halves rather than the comment alone: the label must be
the translated key, the value must be printed straight from
statistics.platform.packaging with no {{_ }} around it, and none of the four
names may exist as an i18n key - which is how "translate it somewhere else
later" is caught. Checked in the failing direction too: wrapping the value in
the translation helper fails with the reason.
Thanks to xet7 !
|
||
|
|
dcc6c8fe5d |
Version pane: five tables with a heading each, and what WeKan is installed as.
Admin Panel / Settings / Version was ONE table of 38 rows. The WeKan version, the OS load average, the DDP transport and a V8 heap counter were the same kind of thing in it: one flat list, read top to bottom, with no way to jump to the part you came for. Five tables now, each under a small heading, in the order somebody debugging reads them - Platform (what this IS), OS (what it runs on), Meteor (how it talks to the client: reactivity, reactivity order, DDP transport), Database (type, versions, commits, storage engine, OpLog, sessions) and Node (version, heap, memory). Reactivity and DDP moved to Meteor, where they belong: they are how the client is fed, and they were the two rows most often read as database settings. Whether an OpLog EXISTS stays with the database, because that is a property of it. No row was dropped; a test lists all 38 by name and requires each to still be shown. NEW ROW: what WeKan is installed as - bundle.zip, Snap, Docker or Sandstorm. It is the first thing a support answer turns on, and the pane never said it: the same version keeps its data somewhere else, carries a different database and gives the admin different reach in each of the four. models/lib/platformPackaging.js detects it, most-specific-first: an explicit WEKAN_PACKAGING wins (a packaging that knows what it is should say so, and it is how a future .deb or chart names itself), then Sandstorm, then snapd's own SNAP/SNAP_NAME, then a container runtime's marker file, then the bundle. Sandstorm and Snap are asked BEFORE the container markers on purpose: a grain is a container, and a confined snap can look like one, so the other order answers "Docker" for both. It claims nothing it cannot know - there is no "source checkout" answer, because a `meteor run` and an unpacked bundle are identical from inside the process. The detection is a pure function taking the environment, the Sandstorm flag and a file-exists callback, so all nine of its tests run here without a snap, a container or a grain - including that an empty SNAP is not a snap, that an empty WEKAN_PACKAGING falls through rather than blanking the field, and that an unreadable root answers bundle.zip instead of throwing an admin's Version page away. The headings are SMALLER than the pane title above them, and a test compares the two font sizes rather than trusting the CSS to stay that way: five headings at 1.25rem would read as five pane titles and "Version" would be lost among them, and an unstyled h3 - the browser default here - is larger still. Six new English strings; the other languages fall back to English until translated, as usual. tests/clientBundleImports.test.cjs caught the new stylesheet before it could matter: package.json sets meteor.mainModule, so a .css nobody imports is simply not in the bundle. It is imported from client/features/settings.js now. Thanks to xet7 ! |
||
|
|
2cc0d42ddf |
Filesystem integrity: is that still the file WeKan stored, and did this server stop cleanly?
Attachments and avatars are files under WRITABLE_PATH, and the database holds one document per file. NOTHING checked that the two still agree. A file can be replaced, truncated, back-dated or deleted by anything that reaches the filesystem - a bad restore, a sync tool, a container rebuild, a shell on the volume - and WeKan would keep serving whatever is there now, silently. A baseline is recorded per file in the existing WeKan database (no new files under WRITABLE_PATH): path, size, modification time, and md5, sha256 AND sha512. Three digests, because they answer different questions. md5 is what other tools print, so an admin can compare against a backup with what they already have - it is never alone, its collision resistance is gone. sha256 is the working digest. sha512 earns its place on the day the two DISAGREE: two digests over the same bytes cannot, so when they do, the bytes were not read the same way twice - a failing disk, a partial write, a truncated copy - which is a different problem from a substitution and is its own critical finding. ed25519 is the fourth check and it is NOT a hash - it is a signature, and it answers the one thing three digests cannot: who says these are the right hashes? Anybody who can rewrite a file can rewrite a row of hashes. Each entry is signed over a canonical line (fixed field order, no JSON, whose escaping is not guaranteed stable) and verified on every scan. A record that does not match its signature is critical and is NEVER explained away by an ordinary edit. The key comes from WEKAN_INTEGRITY_PRIVATE_KEY, which WeKan never stores - that is the configuration that means something against an attacker who reaches the database too - or is generated and kept in the database, which detects filesystem-only tampering and is honest about being no more than that. A MALFORMED supplied key is reported rather than silently replaced by a generated one, which would look like it was working while checking nothing the operator meant. The scan is paced by policy, not by hope: once a day, checked hourly; nothing starts or continues at or above 60% CPU; 50 ms between files plus 20 ms per megabyte; a fifteen-minute budget, after which it stops and continues tomorrow; and ONE read per file for all three digests. A run that stopped early does not report the files it never reached as missing. The finding is a change WITH NO RECORD SAYING WHY. Files change when people use WeKan, and those changes are accounted for, reported once at info and re-baselined so they do not repeat daily. A change with nothing to explain it is at least medium and is deliberately NOT re-baselined, so it keeps showing until somebody looks. A modification time that moved BACKWARDS is called out separately: nothing does that by accident. Crashes and downtime, in the same stream, because a crash leaves nothing behind: the process is gone, so it cannot write a message about being gone. A heartbeat every minute is the only thing that works, and the NEXT start reads it. A first run and a clean stop record nothing - reporting every deliberate restart is how a Problems page becomes one nobody opens. A short gap with no clean-shutdown mark is a note; a long one is a high-severity "it stopped without shutting down cleanly, and here is how long it was down". Uncaught exceptions and unhandled rejections land here too, with their cause, before the process goes. Admin Panel / Problems / Filesystem integrity is the new stream, with the Username / IP address / Attempts columns. The baseline itself is never published and never client-writable: it is a map of every file on the server, and the key document is a private key. tests/fileIntegrity.test.cjs, 34 checks: every digest case including same-size substitution and disagreeing digests, the ed25519 forgery attempt, the canonical line, explained vs unexplained, and the pacing - including that an unreadable clock does not start a scan, which it did until the test said so. Thanks to xet7 ! |
||
|
|
d577f07700 |
Canary tokens: who tried to override permissions, and from where.
The security event log said what a guard DID - a request blocked, a filename
sanitized - which answers "is WeKan defending itself" and not the question an
admin asks next: who did that, and from where. It also could not tell a browser
that got confused from somebody working through the Hall of Fame one entry at a
time.
A CANARY is a tripwire at a point that only a permission-override attempt
reaches. Ordinary use never gets there - the code path runs when a request asks
for something the rules forbid - so a trip is not noise, and it is worth an
admin's attention with the actor attached. Design:
docs/Security/Remediation/WeKan.md §12.
Three properties, each enforced by a test:
SILENT. Tripping one changes NOTHING the caller can observe. tripCanary()
always returns false and tripCanaryDeny() always returns true, so a call site
reads as the refusal it replaces:
if (forbidden) return false; // before
if (forbidden) return tripCanary('card.vote-field', { userId });
The return value is decided before any reporting is attempted and the reporting
is wrapped, so a canary can never throw into, delay or disturb the request it
watches. The REST handler re-throws the ORIGINAL error object. This is not
politeness: a canary that announces itself is a map of which paths are watched,
and a probe would simply avoid them.
BOUNDED. A canary sits where an attacker can loop, so one row per attempt would
be a denial of service they get for free. models/lib/canaryTokens.js - pure, no
Meteor, no clock of its own - records the first trip of a (canary, actor) pair
at once, COUNTS the rest of the window, flushes one summary carrying the total
when the window closes, and stops writing after 60 summaries for a pair that
never gives up. The tracked-pair map is capped at 5000 and evicts the LEAST
RECENTLY seen, so a long-running attacker is not pushed out by a passing one and
a botnet varying its address cannot grow it. Idle pairs are swept on a timer. A
thousand attempts in a minute cost ONE row, and a suppressed trip costs one map
lookup. The username lookup is cached and capped, and neither it nor the insert
is awaited on the caller's path.
ATTRIBUTED. Every event carries userId, username, ip and count. The username is
denormalised at write time on purpose: it is what the account was CALLED when it
tried, so a rename does not rewrite history and a deletion does not erase it.
The address uses the same spoofing-safe resolver as the login throttle -
X-Forwarded-For only as far as HTTP_FORWARDED_COUNT says to trust it - or an
attacker could write a colleague's address into the security log by sending a
header. `detail` says what was attempted in the words of the feature, never the
payload.
Seventeen canaries are wired at the permission checks that refuse the attempts
behind BoardBleed, ParentBleed, ChecklistBleed, PathBleed and CommentBleed, plus
the direct vote/poker field writes and a stored path that points outside the
storage root. All server-side: no Playwright, no browser, nothing to install.
Admin Panel / Problems / Security gains Username, IP address and Attempts
columns, and both new columns are searchable - the thing an admin does with one
security event is pivot on it.
tests/canaryTokens.test.cjs (25 checks) drives the limiter through bursts, an
endless probe, eviction order and junk input; tests/canaryCoverage.test.cjs (18)
pins every canary to its call site and asserts none of them changes what the
caller gets back.
Thanks to xet7 !
|
||
|
|
c687daadf4 |
Five controls that had drifted away from what they belong to.
The screenshots in #6465 (comment 5187985815, images only, each with the fault circled): "Checkbox is misplaced" - Admin Panel people table. The select-all box and the "all users" it labels were two loose inline nodes in a centred table heading: the box is replaced content with its own baseline, and at the width that column happens to have, it landed on the word. They are one <label for> now, an inline-flex row with a gap that cannot collapse - which also makes the word click the box. "This checkbox is crazy" - Member settings. The rescue-card-description row carried a `b ` spacer and `.left`, which is float: inline-start. A float inside a flex container is ignored and the spacer became a stray flex item, so the box drifted up beside the "Card settings" heading instead of sitting with its own text. It is now the same shape every other checkbox row in that file uses: .flex anchor, .materialCheckBox, span. "(2/5) <-- move this up here" and "Make this same height as the lanes left and right" - one cause, not two. The WIP counter is already inside the h2 right after the title; the title is a `+viewer`, and .viewer is display: block with a 22px min-height, so it pushed everything after it onto a second line AND reserved a band under it, which is what made that list's header taller than its neighbours'. Inline in the heading, the counter stays where the markup already puts it. Same treatment the quick-access header and the table view already give their viewers. "Please move the button down. This is too close ... panic ;-)" - the backup schedule's Save sat directly under the 1..28 day buttons, close enough to hit while aiming for a date. The gap goes on the form-group that FOLLOWS the day grid, so it applies where that grid is and nowhere else. "The alignment is out of place" - the attachment move button. This one is normalisation rather than a measured fix: the row is align-items: flex-end, so a margin of the button's own offsets it from the controls it acts on; that margin is zeroed and the button aligns with the controls explicitly. Whether that is the whole of what was circled needs a browser, and the test says so. tests/uiSpacingReports.test.cjs pins each cause, including the premise behind the WIP fix (.viewer really is a 22px block). Six of its nine assertions fail on the previous commit; the three that pass there are the premises, which is the point of stating them separately. Not verified in a browser: this sandbox has none. Each fix is read off the markup and CSS against what the screenshots show. Thanks to Alishara and xet7 ! |
||
|
|
c5a4092418 |
Admin reports by URL: keep the subscription the autorun's count.set killed.
Opening an admin report by its address - /admin/problems/files typed,
bookmarked or refreshed - drew the column headers, "No results" and a
"1 / 1" pager over data that was plainly there, while the count method
reported five.
|
||
|
|
78b2f9ebcd |
Admin Panel reports: subscribe again once the login lands.
Opening a report BY ITS ADDRESS - /admin/problems/files typed, bookmarked or refreshed - drew the column headers, "No results" and a "1 / 1" pager over data that was plainly there. Reached by clicking the menu entry it worked, so this only ever happened to the URL. A full page load resumes the login from localStorage ASYNCHRONOUSLY, and the route sets `problemsOpenPane` before that lands. The subscription was therefore made with no user; the publication's isAdmin check answered `this.ready()` with no rows; and nothing re-subscribed, because the autorun that opens the pane did not depend on the user. The count METHOD, called later from the same page, happily reported five - which is what made this look like a publication bug rather than a timing one. The autorun depends on Meteor.userId() now. openReportPane() returns early when the pane is already open, so re-running it after the login would do nothing at all - hence the second branch, which re-subscribes the report that is already open now that there is a user to subscribe as. Found by the e2e test's own diagnosis, added in the previous run for exactly this purpose: "attachments in minimongo: 0; report_pages index: no report-files index doc" - neither half arrived, which of the three possibilities it lists is the one meaning the publication returned early or never ran. ALSO, a release-build bug of my own from earlier today: build-extra-arches had no actions/checkout. It calls releases/check-arch-binaries.sh and releases/record-provenance.sh and mounts $(pwd)/releases into the container - none of which exist without one, so every one of the six extra architectures would have stopped at "No such file or directory". The checkout goes before the artifact download, because actions/checkout cleans the workspace and would remove the bundle. And releases/repack-bundle-for-arch.sh: the amd64 bundle turned into one architecture's zip, lifted out of that job so it is one script rather than one job's inline steps. Only build-amd64 runs Meteor; arm64, win64, mac-arm64 and the six extra architectures are all this same bundle with its native modules rebuilt, its Node.js swapped and its database binaries replaced. That is what lets a release be completed one architecture at a time without rebuilding the rest, and it had better be the same script or a bundle added later would differ from the ones beside it. Thanks to xet7 ! |
||
|
|
5b91c99b11 |
The left menu fits its column on a phone, and node/ is ignored.
Spec 43 (All Boards on a phone) still failed in all three browsers with the same numbers as before: the menu 260px wide over a 157px column, lying across the boards. max-width: 100% was not enough, and that is the part worth knowing: a grid item's default min-width is `auto`, which is its content's intrinsic minimum, and a MINIMUM BEATS A MAXIMUM. The cap did nothing until the item was allowed to shrink to it. `min-width: 0` is the same pair the right-hand column beside it has carried all along, for the same reason and with the same comment. Nothing inside the menu needs the intrinsic width held open - the workspace name already ellipses through its own min-width: 0. Two guards followed the format rather than the other way round. Both were written against a release with forty entries and rejected v10.55 for being four dependabot bullets and nothing else: CLAUDE.md keeps a dependency batch as plain bullets, so a release can legitimately have no <details> at all, and padding one bump into a block whose body repeats its summary would be the noise that rule exists to prevent. They count entries OR bullets now. The empty Files report (spec 41) is NOT fixed - it is made legible. The helper that fills that table caught every exception and returned [] in silence, which renders exactly like "there is nothing to show": headers, "No results", and nothing anywhere recording that it threw. It logs now. The publication says one line when it matches nothing, whatever DEBUG is set to, because a publication answering with nothing and a publication never running look identical from the outside - which is why three runs have not told us which this is. And node/ - a 2.2G clone of the Node.js 24.x fork the runtime is built from - joins the other local-only clones in .gitignore, rooted like they are. Thanks to xet7 ! |
||
|
|
920d42b6db |
The left menu is resized by dragging its inner edge.
The menu's inner edge - the right one while reading left to right, the left one under a right-to-left language - now carries a grip, and dragging it changes the width. It is the same control the right board sidebar has on its own inner edge: the same 6px strip, the same col-resize cursor, the same nodragscroll so a drag resizes the menu instead of panning the page behind it, and the same sign flip on the delta so the widening drag mirrors under RTL rather than needing a second rule kept in step. ONE number, on <html>. The width is a CSS custom property, --wekan-left-menu-width, and everything that needs it reads that: the Admin Panel's menu, the All Boards one - whose grid track is auto, so the track follows the menu - and the grip itself, which sits at calc(width - 3px) from the row's inline start. An inline width on one element could not have done that: the menu is a different element in a different template on each page. The default is the number in the stylesheet, and a breakpoint that wants a different default overrides the VARIABLE, never the menu's width - a rule naming .side-menu would beat a dragged width, which arrives as an inline property on <html>, at exactly that one screen size. For the same reason the client REMOVES the property when nobody has dragged it rather than writing the default into it. The Admin Panel menu's own width was min(250px, 32vw), which only ever resolved to 250px above the 800px breakpoint; it is the shared 260px now, because the two pages draw one menu and a menu has one width. The grip is positioned against the row/grid around the menu, not inside it: the menu is its own scroll area, and a handle within it would scroll away with the entries. Being absolutely positioned it is neither a flex item nor a grid item, so it adds no column and no gap - which is why the shared menu template can carry it as a second root and every Admin Panel pane gets it without naming it. Clamped to 160px..min(600px, window - 240px), with no drag on a phone, where the menu is full width above the content, and none while it is folded, where there is no edge to drag. The All Boards menu also takes max-width:100% now, because the phone rules cap its track at 210px and a fixed width ran out past it. Remembered in the same three layers as the fold: a Session value first, then profile.leftMenuWidth, then the wekan-left-menu-width COOKIE when nobody is signed in - the same cookie mechanism the fold uses rather than the localStorage the right sidebar's width uses, so one reader's menu is not remembered in two different places. Saved once, when the drag ends; while dragging, the property is written directly so the edge follows the pointer without a database write per pixel. The server method clamps again and refuses NaN, which passes check(width, Number) and would otherwise store a width no page could recover from. Thanks to xet7 ! |
||
|
|
8ef151696d |
Folded, the left menu is gone - and the pane title brings it back.
Folded, the menu was a narrow strip with the caret alone in it. A strip is still
a column: it holds width, it keeps the page from starting at the window edge,
and a caret alone in it is a target that has to be aimed at.
Folded now means gone - no column and no strip - and the way back is the PANE
TITLE beside it: the caret moves to the inline start of the heading, and the
caret and the title are ONE target, so clicking anywhere on it brings the menu
back. Nothing is lost by drawing nothing, because the way back is the largest
thing on the page rather than the narrowest. The heading is drawn even for a
pane with no title of its own - paneTitle() returns {} when no entry is active -
so a folded menu can never be a menu you have lost.
One caret template still, included in both places on both pages, so they cannot
drift. Beside a title it is handed the pane's text as paneTitleKey / paneLabel
rather than the titleKey / label paneTitle() itself uses, so the caret at the
top of the menu, which inherits whatever context the menu sits in, can never
pick a title up by accident. It is an anchor with no href, so it carries
role="button", tabindex="0" and a keydown handler for Enter and Space: without
them the menu could be folded with a mouse and only with a mouse. Its tooltip
and aria-label are one string from a helper that names the pane as well beside a
title, because an aria-label REPLACES the text inside the element and the bare
word would have silenced the heading.
Which element takes the collapsed class differs by page, and that is the point.
The Admin Panel marks its menu: it is a flex row, and a hidden flex item closes
the row up by itself. All Boards marks the GRID, because display:none takes an
element out of a grid but the TRACK it was placed in remains - hiding only the
menu would have left the boards in the auto column with an empty 1fr one beside
them. The grid drops to one column and hides the menu in the same rule, with
!important, because the phone rules set both tracks with an !important of their
own and a phone would otherwise be the one screen still holding an empty column
open.
Thanks to xet7 !
|
||
|
|
5df6f28421 |
Left menus fold away, with the caret a list already has.
At the top of both left menus - All Boards and the Admin Panel - there is now a caret that folds the menu away, and the same caret brings it back. It is the control a list has on a board: pointing down while the thing is open and right once it is folded, with the same two words in its tooltip, so there is nothing new to learn. Folded, the menu is a strip holding only its caret and the page beside it takes the width back. Folded rather than hidden outright: a menu with no way back is a menu you have lost. Everything but the caret goes through a :not() on the caret rather than a list of names, so a row added later cannot be left sticking out of a narrow strip. On All Boards the width moved from the grid track onto the menu itself, because a fixed 260px column would hold the gap open beside a folded menu. One state for both pages: they draw one menu, and a reader who folds it away on one of them has said what they want on the other. It is a Session value first, so the fold is instant rather than waiting for a round trip, then profile.leftMenuCollapsed on the user document, and a cookie when nobody is signed in - a public board has this menu too - through the same cookie helpers the public list and swimlane collapse states already use. One caret template for both menus, so the two cannot drift into two different carets, and the helper that reads the state is global because the panel that takes the class is a different element in a different template on each page. Thanks to xet7 ! |
||
|
|
40325c88fd |
Left menus keep the neutral panel with the themed selected row.
Both left menus - All Boards and the Admin Panel - are a light grey card, and the entry you are on is filled with the theme colour with a white label and icon: the same treatment the selected tab gets in the bar above it. A menu is chrome, and tinting the whole card fights the content beside it. The panel, the labels, the hover, the dividers, the group headings and the counts are all as they were, and every theme's own header rule names the selected row again - including the colour slide of a clear* theme, which a --theme-accent value cannot carry. The guards and docs/Design/Page/Left-Menu.md describe this arrangement. Thanks to xet7 ! |
||
|
|
83e832e9e7 |
Left menus: the menu carries the theme, and the selected row is the white one.
Both left menus - All Boards and the Admin Panel - were a light grey card with one row filled in the theme colour. That made the filled row the only part of the page answering to the theme, so a menu read as a plain grey column with a coloured stripe in it rather than as a side of the app, next to the header bar it sits under. Inverted: the PANEL is the theme colour with white labels and icons, and the row you are on is a white block cut out of it with dark text. It is also the easier selection to find - the eye goes to whatever differs from its surroundings, and one white row in a coloured column differs more than one coloured row in a white one. The menu is the colour of the first header bar above it, including the colour SLIDE of a clear* theme, which a --theme-accent value cannot carry. Every theme's own header rule now names both menus: before this only six of them named the All Boards menu, so most themes coloured one menu and left the other one plain. No theme rule may name the selected row any more - it would paint that row the same colour as the menu behind it and leave nothing to show which row is selected - and a guard checks that. Hover on an unselected row is a wash of white over the theme colour rather than solid white, which would be indistinguishable from the selected row. The dividers, the group headings and the counts went with the rows, for the same reason: a dark rule on a coloured panel is a rule nobody can see. Two pairs of duplicate count rules were merged while doing this. Each had a base rule and a colour override with the same selector, which is how a guard came to read the wrong one. Documented in docs/Design/Page/Left-Menu.md. Thanks to xet7 ! |
||
|
|
39dcdcb79e |
Header labels: measure whether they fit, instead of guessing from the width.
The labels were hidden below 1100px, and a width cannot answer the question. A board carries ten controls, All Boards four, an Admin Panel page four tabs, and the words are as long as the reader's language makes them. xet7's screenshots show both failures at once: at 2266px the labels were shown and the bar wrapped anyway, and at 1810px they were hidden with a whole row to spare. fitHeaderLabels() shows the labels, asks the bar whether it wrapped - its last item sitting lower than its first - and hides them if it did. A tolerance rather than equality, because items of different heights sit on slightly different offsets within one row and align-items: center moves them. It always measures from the SHOWN state. Hiding the labels is what makes the bar fit, so measuring after hiding would answer "it fits", show them again, and do that once per frame forever. Removing the class before measuring costs one reflow per resize and is the whole reason this cannot oscillate - the guard pins that ordering, because it is the one thing here that is not obvious from reading. It runs from the same place that publishes --wekan-header-height, which already has a ResizeObserver on this bar - and wrapping is exactly what that observer exists to catch. Also in this commit, from the same screenshots and the same session: The pager buttons are FILLED with the theme and their arrows white, instead of an outline on transparent that put the theme in a 1px border and left the button a ghost beside solidly themed chrome. They read --theme-accent-fill, a new variable, because --theme-accent is one COLOUR and a colour-slide theme's fill is a gradient: a button reading the accent came out flat while the header above it slid. activeFill() resolves it - a custom pair beats the theme's own slide, the way a custom colour beats an accent - and the pressed state darkens that fill rather than replacing it, which keeps a slide sliding. And both left menus run from directly under the header to the bottom of the window, flush to its left edge. The Admin Panel's row carried a top padding that put grey above the menu; the main body carries it now, because content is not meant to be flush against a bar. Both menus lost their border and corner on the three flush sides: a rounded corner on a flush edge shows the grey behind it, which is the gap being removed. All Boards' grid uses column-gap, since a gap is between tracks and never insets the menu from the window edge. One correction of mine: activeFill's comment claimed it answers null for an unknown theme. accentOf answers '' and activeFill defers to it, so it answers '' too. The comment now says so - the two functions sit side by side and a reader should not have to remember which returns which kind of nothing. Thanks to xet7 ! |
||
|
|
574c72370f |
Search shuts the panel it opened, and the Admin Panel tabs get their names.
Search was the same shape as Filter: it only ever OPENED, so clicking it while the sidebar was already showing search did nothing visible and the only way back was the sidebar's own X, somewhere else on screen from the thing you just clicked. The two now share one rule. models/lib/filterButton.js is models/lib/sidebarViewButton.js, because a module named after Filter answering for Search would be a name that lies, and one toggleSidebarView() helper applies it - two copies of "which way does this click go" would eventually be two answers. The exception stays Filter's alone, and is now named as what it is rather than assumed: with a filter ON the sidebar is the one place that says what is being hidden from the board. Search has no such case - its results are inside the panel and it hides nothing from the board - so it passes false and always toggles. The Admin Panel's four tabs carry their name beside the icon, each from the same key its tooltip uses, and lose it below 1100px with every other label in the bar. Thanks to xet7 ! |
||
|
|
03cb79bdd7 |
Admin Panel under /admin, and a header that says where you are.
The four pages sat at the TOP level - /settings, /people, /attachments - as if they were pages of the app rather than of the Admin Panel, and /attachments is also the path the file server serves attachments from (server/routes/universalFileServer.js), so the panel and the files were claiming one address. They are under /admin now: /admin/settings/version, /admin/people/login, /admin/problems/database, /admin/attachments/backup. The default pane is named too. It used to be left implicit in a bare page URL - /settings rather than /settings/version - so the address of "Settings" and the address of "Settings showing Version" were one string. The address is meant to say where you are, and the first pane is somewhere too. The bare /admin/settings still resolves; it redirects to the pane's own address rather than being a second name for it. Every path the panel used to answer on redirects - the bare old address, the old one with a pane in it, and /setting, /information, /translation. They are built from the same map the URLs are, so a page cannot be given an address without also being given its redirect, and a bookmarked /settings/global-webhooks keeps its pane instead of landing on the top of the panel. The title beside the house icon names the same three things: Admin Panel / Settings / Version. The page's words are the tab's own key and the pane's words are the menu row's own label, so the title, the tab that is marked active, and the row that opened the pane cannot say different things about one place. The pane title is read from the URL rather than from the page, because the header is a separate Blaze instance from the Admin Panel's pages and must not import them - doing that once ran a page module before its own template was registered, and the throw aborted every module after it. That makes ADMIN_PANE_TITLES a second copy of the menus' labels, and a guard checks every entry of it against the real menu entry for that pane. The button of the page you are ON keeps the hover background, permanently and a shade darker. The tabs had marked themselves .active all along, but the only rule that drew it was scoped to #header-main-bar - the second bar, which those tabs no longer live in - so the state had been computed and invisible since they moved. Darker than the hover rather than equal to it: hovering the tab you are already on must still look like a hover. --wekan-header-height measured #header - the SECOND bar - from when every page had one. Most pages have none now, so on those the variable was 0 and everything laid out against it started at the top of the WINDOW, underneath the first bar: the All Boards sidebar covered it. It measures both bars now, as the BOTTOM of the lowest rather than a sum of heights, so any margin between them counts and a bar that is absent contributes nothing without a special case - and each bar has its own ResizeObserver, because the first one wrapping to a second row is a resize of that element and of nothing else. A divider after the notification bell. Everything before it belongs to the page - its controls, its view menu, the panel's tabs; everything after belongs to you - help, your account, the sidebar toggle. Without it the run of icons reads as one list of unrelated things. The URLs went through a hyphenated shape - /admin-settings-version, /allboards-starred - before xet7 asked for the slash form instead. All Boards is back to exactly what it was; only the Admin Panel moved. Guards: tests/adminUrls.test.cjs pins the /admin prefix, that every pane is named in its URL including the default, that each page records the path it used to answer on, that the three redirect shapes exist and carry the pane along, and that every pane title matches the real menu entry's label - both directions, and a translation key has to be a real one. tests/headerBars pins the divider and the darker active mark; tests/sidebarBelowHeader pins that the height covers both bars. tests/adminOldUrlRedirect's route-body helper now understands a route whose path is an expression, since the panel's four take theirs from adminRoutePath(page) so the route and the links cannot disagree. Thanks to xet7 ! |
||
|
|
f83234f0d8 |
Admin Panel: its four tabs are icons in the first header bar.
Fifth of the header restructure, and the answer to the question I had left open: the panel's tabs are navigation BETWEEN its four pages rather than controls of one, so they do not belong in a right sidebar with a page's controls. They belong where you can always see which of the four you are on - the first header bar, immediately left of the notification bell. Icon only, each named by a translated tooltip, because that bar is a single row shared with the logo, the starred boards, the notification bell and the user menu; four labelled buttons would not fit beside them. They link by route NAME, as they did. The tab bar goes with them, and its four route references. "Admin Panel" is already what the first bar says on all four routes - models/lib/pageTitles.js has mapped them since the first step - so the panel is named once, there, rather than by an h1 of its own. Which routes ARE the Admin Panel is read from the one place that already lists them, adminUrls.js, rather than spelled out again in the header. Three guards followed. The same mistake as last time was caught by the same guard: settingHeader.js still registered onCreated, onDestroyed and helpers on a template that no longer existed, which throws at module load and aborts every module after it - they are on adminPanelTabs now. The security-log guard checked for a `.setting-header-btn.problems`, and the multitenancy guard checked that Settings and Problems sit behind the site-admin check; both properties are unchanged and both now read the markup where it is. Remaining: the board's own second header bar, which is the last one with controls in it. Thanks to xet7 ! |
||
|
|
841479774e |
Admin Panel: a URL for every left-menu entry.
The panel was four addresses - /setting, /people, /admin-reports, /attachments - each opening whichever pane its page happened to open first. Which pane you were looking at was ReactiveVar state and nothing else, so a pane could not be linked to a colleague, bookmarked, opened in a second tab or reached with the back button, and /setting always landed on Version even if you had just been in Global Webhooks. Every entry has its own now: /settings/visibility, /settings/global-webhooks, /people/roles, /admin-reports/cpu, /attachments/s3. Lowercase, words separated by -, and the DEFAULT pane keeps the bare page URL - /settings, not /settings/version - so there is one address for "the Settings page" rather than two that show the same thing. The Settings path is plural: /setting was the odd one out beside /people, /attachments and /admin-reports, and it still resolves, as a redirect. The slug is NOT derived from the pane id. The ids are internal and read like it - tableVisibilityMode-setting, layout-setting, report-cpu - while a URL is something a person types and pastes into a chat, and a name derived from another name is wrong the moment the two spellings differ, which is what allBoardsMultiselectionSidebar was. So models/lib/adminUrls.js is an explicit map, and the guard checks it against the real menus in BOTH directions: every slug names a pane the page has, and every menu entry has a slug. Neither failure shows up until somebody clicks that row. A slug that is not one falls back to the page's default rather than rendering an empty panel, because a URL is typed. The route resolves the slug and hands the pane id to the page, which reads it in an autorun - reactive, not a one-shot read, because following a link to another pane while the page is open runs the route action again WITHOUT re-creating the template. A menu click does the same in reverse: open the pane, then go to its URL. go, not replace, so Back returns to the previous pane instead of leaving the Admin Panel, and only when the path would actually change. Each page now has ONE function that opens a pane by id, used by both the URL and the click. /information and /translation redirected to /setting and handed their pane over in a Session value the page consumed once. They redirect to the pane's own address now. Two guards pinned that Session mechanism and now pin the URLs, each saying why it changed. Writing the map turned up that the Settings page's pane list still named registration-setting, the Login pane that moved to People - which its own guard caught, correctly. Written down in docs/Design/Page/Admin-Panel-URLs.md, with every URL listed. Thanks to xet7 ! |
||
|
|
54915db250 |
/public is its own read-only table page, not All Boards with a different query.
docs/Design/Page/Public.md is the design; it describes only what is different
about this page and links back to docs/Design/Page/Table.md for everything shared,
which is that page's own rule.
WHAT IT WAS. /public rendered `boardList` - the All Boards page - with its query
swapped for `{ permission: 'public' }`. That brought the whole of All Boards with
it: the Starred / Templates / Remaining menu counting the user's OWN boards beside
a grid that was not, the workspaces tree, the org and team filters,
Multi-Selection with its archive and duplicate actions, the sort popup, board
dragging, and an "Add board" tile that made a private board from a page about
public ones. Multi-Selection offered to archive boards the visitor has no rights
to at all.
WHAT IT IS. Only the table. Two columns - board title and board description - ten
rows a page, paged and counted on the server. No left menu, no create, no
selection, no drag, and nothing on the page changes anything: a row's only action
is to open its board.
It supplies a rowTemplate rather than a text-cell column spec, because a row is a
LINK and carries its board's colour class and background image - so a board is
recognised here the way it is on All Boards (#5157) - and a text cell can express
neither. Read-only is about what the page can CHANGE: the row template renders one
anchor and no control.
WHAT A PAGE COSTS. Six fields for ten boards, not ten board documents: title and
description for the columns, slug for the link, color and backgroundImageURL for
the row. `members` is deliberately absent - it is the largest field on a busy
board and this page shows no avatars. The selector is built on the SERVER and
takes nothing from the client: public, not archived, a real board rather than a
template container, and not an internal ^Subtasks^ board. A search goes in as its
own $and term rather than replacing the title clause, or it would drop that last
exclusion.
Not carried over from the tile: member avatars, the per-list card counts, and the
spent-time clock. What a visitor needs of a board they do not belong to is what it
is called and what it is for; the rest is the inside of a board they have not
opened, and each costs a query the page would otherwise not make - the clock in
particular answers by looking for cards, which this page does not publish, so it
would read false for every board on every instance.
client/lib/reportPages.js now declares the DDP-only page-index collection, because
`new Mongo.Collection(name)` throws if the name is taken and it was declared
inside adminReports.js - so the second page to need it could not have one. The
guard in tests/adminPageRows.test.cjs that pinned that declaration is updated with
the reason: what it protects (declared once, from the shared constant, never a
typed string) is unchanged, it just lives in a different file.
tests/publicBoardsPage.test.cjs pins the route, that none of the All Boards chrome
is on the page, that a row carries no control, the two columns and one cell each,
that the labels are translation keys that exist, that paging is ten a page on the
server and the rows drawn are the ids the server named, exactly which six fields
the publication sends, that the selector is server-built and survives a search,
the row colouring, the shared collection, that the files are registered in the
bundle, and that every path the design doc names exists.
Thanks to xet7 !
|
||
|
|
efa534fddf |
Board roles: one capability table, three roles fixed, and a Roles Status pane that shows it.
What each role may do was spelled out THREE times - in the server allow helpers,
in the client's canModify* helpers, and in prose in the docs - and the three had
drifted apart. Every place they disagreed was a role that did not do what its name
says. models/lib/boardRoleCapabilities.js is that table now, in code, and
everything reads it: the allow rules, the UI helpers, the new Admin Panel pane and
the documentation. There is nowhere left for a fourth opinion to appear.
THE THREE GAPS, fixed:
* "Comment only, assigned" (isCommentAssignedOnly) had FULL WRITE ACCESS.
Nothing outside the card publications read that flag and it was not in the
write rule, so the role could create and edit cards, lists and checklists - it
was "Normal, assigned only" under another name. It is comment-only now, like
the role it is named after; the two differ only in what they see.
* "No comments" (isNoComments) could not write ANYTHING. The write rule excluded
it, so the role blocked editing as well as commenting - a second read-only
role under a name that says otherwise, and one the UI still offered the edit
buttons for. It blocks commenting only now, which is what the name and the
board schema both say it is for.
* The write rule did not exempt board admins. Every has*() helper on the board
ignores a flag on an admin; that one read the raw flags, so an admin who also
carried isNoComments silently lost write access. Not reachable from the Web
UI, which writes all eight flags at once, but reachable over the REST API,
which takes them individually. memberRoleOf() resolves isAdmin first.
The UI helpers were part of the same drift - canModifyCard() did not exclude
isNoComments while the server did, and canModifyBoard() excluded neither
isNoComments nor isWorker - so each disagreement was a button offered to somebody
whose write the server then refused. All three ask the same table now.
A FOURTH gap found while building the table, NOT fixed: a Worker cannot move a
card, which is the one thing the role is for. Moving a card is a card UPDATE, so
it goes through the write rule, which excludes Worker. The fix is not a table
edit - it means letting a role write SOME fields of a card and not others, and
"assign himself" means validating that a member change only ever adds the caller.
That is a field-level policy on the path every card update takes and wants
deciding on purpose. It is recorded under "Known gaps" with what it would take.
ROLES STATUS, at Admin Panel / People / Roles, below the Save button: a READ-ONLY
table of what each role may do - which cards it sees, and whether it may comment,
create and edit, or change the board's settings. It is the shared table page
(docs/Design/Page/Table.md), so it looks and behaves like every other Admin Panel
table, with no markup of its own; it has no rowTemplate, no actions and no
editable cell, because a role's capabilities are a property of the code and not a
setting. Every string is a translation key, the Yes/No of each cell included - the
values are booleans, and a hard-coded "Yes" would be English in every language.
The "Invite to board" column reads the pane's WORKING copy, so the table follows
the checkboxes above the Save button as they are ticked, before saving, which is
the point of putting it there.
docs/Design/Page/Table.md listed Roles among the panes that do NOT use the shared
design, "so the gap is visible rather than forgotten" - it has a table now, so it
moved to the list of pages that use it, and the exclusion covers the two panes
that are still nothing but a form.
Two guards were checking the shape of the old code rather than what it guaranteed,
and are updated with the reason in the test: listDragPermission read the flag
exclusions out of canModifyBoard's own body (it has none now, so it checks the
BEHAVIOUR - anonymous is falsy, and each excluded role still cannot drag a list),
and tablePage counted the pager handlers file-wide, which also forbade a handler
on a different template - a separate event map is not a duplicate key.
tests/boardRoles.test.cjs is the suite: the module itself including each fixed
gap, that the server rules and the UI helpers ARE the table and name no flag
themselves, that every cell of the documentation matches it, that the
assigned-only column matches the publication scope, that the remaining gap is
still real and the three fixed ones are recorded as fixed, and that the Roles
Status pane renders from the table, is read-only, is the shared template, follows
the working copy, and translates every string it shows.
Thanks to xet7 !
|
||
|
|
ca0e36e371 |
Database problems: show what the database actually said.
A database problem arrived in Admin Panel / Problems / Database problems with an empty Category, Name and Action, a severity of warning, and a detail that said "The database returned an error WeKan has no rule for. Read the message below" - with no message anywhere below, or above, or on the page at all. So the row said that something happened and nothing about what. Nothing was wrong with the classifier or the recorder. EventLog has a SimpleSchema attached, and collection2 cleans every insert against it with filter:true, so a field the schema does not declare is dropped silently on the way to the database. The four fields the database stream uses - type (the rule id), db (which database said it), kind and message - were never added to that schema, so they were the four things thrown away, and they are exactly the four the page shows in Category, Name, Action and the message it told the admin to read. The other four streams were unaffected because they only ever write schema fields. The schema declares them now, and a test pins the general rule instead of the one instance: for each of the five event loggers, every key of the document it inserts must be declared in the EventLog schema, so the next field somebody adds to a logger cannot vanish the same way. The message is shown too - the Detail cell carries WeKan's reading of the error and then the database's own sentence, which is the one thing an admin can search for or paste into an issue - and the stream search looks at message, db, kind and type, so searching for "postgresql" or for a phrase out of the message finds the row that displays it. The unclassified advice no longer promises a message "below": the message follows in the same cell. Because that message is now stored and displayed, it loses its credentials first. A database that refuses a login or cannot be reached quotes the connection URL back, password and all - "failed to connect to mongodb://wekan:s3cret@mongo:27017" - so classifyDatabaseError redacts the userinfo of any URL in the message before returning it, keeping the host, the port and the database name, which are what makes the message useful. It is done there rather than in the recorder so no future caller can forget it. The message is also sanitized like every other stream's detail: one line, control characters out, capped. Thanks to xet7 ! |
||
|
|
75d193d58f |
Fix #6536 impersonate error, and #6538: say when ROOT_URL will send unusable email links.
#6536 - "Impersonate User doesn't work": nothing happened, and the log said "Match error: Expected string, got null". The popup calls the server with the id from its data context, and when there is none it called with `undefined`, which arrives as null and fails the argument check. The client does not call at all without an id now, and says so in the console; the method marks its argument as audited (this app runs with audit-argument-checks) and then answers a missing id with "impersonate: a user id is required" instead of "Match failed", which named neither the method nor what was missing. isImpersonated got the same treatment. The impersonation itself is unchanged, including that only an admin may do it. #6538 - "Bad URL in Wekan mail": the invitation mail contained `http://127.0.0.1/b/...`. Every link WeKan sends is built from ROOT_URL, so when that is left at localhost the mail goes out with the SENDER's own machine in it - unusable for everyone who receives it, with nothing failing and no error to look at. WeKan says it once at startup now, naming the setting and what to set it to, for an unset ROOT_URL and for one pointing at localhost / 127.0.0.1 / [::1]. A warning, not a refusal: a single-machine install where localhost IS the address is perfectly valid. Thanks to ahlgrimma, BastienGraziani and xet7 ! Fixes #6536, Fixes #6538. |
||
|
|
4332677fbe |
The converted checkbox rows are rows, not full-height columns.
`.flex` is `display: flex; height: 100%`, which is right for a pane column and wrong for an anchor that is ONE ITEM of a row: it stretched to the row's height and pulled the box away from its words. The storage rows and the Backup include row now place their items - centred, only as tall as they need - whether the item is a label around a native checkbox or the material one that replaced it. Thanks to Alishara and xet7 ! |