- Ya
- 30 Agosti 2026, 20:22 UTC
- Mwandishi
- kamo
- Ahadi ya
- 0357c52
A smart folder is a saved search that sits where a folder sits: name a question once ("unread, with an attachment") and it is one click away, current every time, across every folder. Nothing is moved and nothing is changed. All of it was built and none of it was wired. Three breaks, each enough on its own. SmartFolderModal had no importer, so there was no way to create one — and the sidebar section was gated on already having one, which left the only entry point behind the thing it created. Clicking one called onFolderSelect('__smart__' + id) into setSelectedFolder with no branch anywhere downstream, so loadMessages asked IMAP for a folder literally named __smart__<uuid> and errored. __label__ had the identical bug. And the endpoint returned raw index rows the list cannot render, fixed in EmailService alongside this. virtualFolders.ts now owns the encoding both sides share. loadMessages branches on it; search substitutes the inbox, because the mail server cannot be asked to search a saved query; and the three realtime refreshes reload on any folder's change while a saved query is open, since matching by name meant one never refreshed at all. A row's counterparty is judged by the row's own folder too — by the view's, every outgoing message in a smart folder was labelled with the reader's own address. Also: the icon a folder is saved with is now the icon it shows (the picker offered its names as literal text — buttons reading "inbox", "zap" — and the sidebar drew a funnel regardless); text conditions get the operator the server has always supported; and SmartFolderCondition stops borrowing the filter-rules field union, which is a different set of names and forced every condition through `as any`. Verified: npm test — 4202 pass, and the 13 failures are the same chat/@kamo failures origin/main has without this change. tsc and eslint byte-identical to baseline. Dictionary keys pushed first, at d91e6b66.