Commit Graph
3 Commits
Author SHA1 Message Date
Lauri Ojansivu c56c03d202 Minicard avatars in the order people were added, each with its own colour.
The minicard floated every avatar to the end of its row, which drew them
in reverse: the person added first, whom a team treats as the responsible
one, came last, while the opened card showed them first. The avatars are a
wrapping row aligned to the end now, in the order they were added - still
wrapping right-aligned as #5081 asked. Each person's initials avatar has a
colour of their own, the same everywhere and every time
(models/lib/avatarColor.js), every colour keeping the initials readable at
WCAG AA, and the avatar's tooltip names the person.

Thanks to HolgerGH and xet7 !

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

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

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

Thanks to markusst1982 and xet7 !

Fixes #6745.
2026-10-09 13:28:08 +03:00
Lauri Ojansivu b9e00dbb85 Close two open issues the current code already answers.
Both were in the CHANGELOG's TODO Later list as "needs the running app", and
both are decided by files that can be read.

#5052, "Attachments cannot be opened (.eml)": a blank page in the browser and
nothing usable in Thunderbird, after a board was copied. Three mechanisms could
produce that and each is handled now.

  - The NAME. An unknown MIME used to append .bin (#6589), and Thunderbird will
    not open a .bin. Every type a mail file arrives as - message/rfc822,
    application/octet-stream, none at all - now keeps the extension, and the
    board copy names copies with the same function the upload used.
  - The SERVING. message/rfc822 is in neither the dangerous-types nor the
    safe-inline list, so it takes the "unknown types" branch: Content-Type
    application/octet-stream, Content-Disposition attachment, under the file's
    own name. Inline is what shows a browser a blank page for a type it cannot
    render.
  - The FILE. An attachment whose recorded versions[].path and on-disk name had
    diverged is found by the same search reading uses (#6589), so a copied
    board's attachments open even when the database's idea of the path is stale.

#5081, "Correct display of owner, member and assignee on mini cards": owner on
the very left, members next, assignees on the very right, wrapping to a second
right-aligned row when they do not fit. That is what the minicard renders
today, and the reason is the float - three groups that float to the inline end
are laid out RIGHT to left in DOM order, so the markup's assignees, members,
creator renders as creator | members | assignees. Each avatar floats as well,
so a row that does not fit wraps and stays right-aligned, and an empty group is
display:none rather than a gap.

tests/openIssuesVerifiedFromCode.test.cjs pins both, and #5052 is removed from
TODO Later.

Thanks to xet7 !

Fixes #5052,
Fixes #5081.
2026-08-13 19:05:59 +03:00