aboutsummaryrefslogtreecommitdiffstats
path: root/docs/superpowers/plans/2026-08-03-post-0.1.0-usability-closed.md
diff options
context:
space:
mode:
Diffstat (limited to 'docs/superpowers/plans/2026-08-03-post-0.1.0-usability-closed.md')
-rw-r--r--docs/superpowers/plans/2026-08-03-post-0.1.0-usability-closed.md83
1 files changed, 83 insertions, 0 deletions
diff --git a/docs/superpowers/plans/2026-08-03-post-0.1.0-usability-closed.md b/docs/superpowers/plans/2026-08-03-post-0.1.0-usability-closed.md
index 7261bd9..fe212e2 100644
--- a/docs/superpowers/plans/2026-08-03-post-0.1.0-usability-closed.md
+++ b/docs/superpowers/plans/2026-08-03-post-0.1.0-usability-closed.md
@@ -8708,3 +8708,86 @@ Read-only, per the constraint above. The dialog's height is sized to its
content; that is a hand test, since the offscreen platform returns an
identical frame either way.
+
+## 169. A card shows the account only as a bar, with no fade and no avatar
+
+**Observed (user, from the notes):** "the left border of a card expresses the
+account the mail belongs to. the background color of the card should fade left
+to right from the account color to the current background color we are using (or
+to transparent to work both in light and dark themes). On the left we should
+leave room for an account avatar (a squircle), for now it could be extracted
+from the sender name "From: john doe" becomes "JD" in the avatar. As soon as we
+include khard (or some other vcard provider/manager) we will switch to images if
+the corresponding vCard has one."
+
+**Cause (verified in the code):** not a defect. Half of it shipped. The account
+colour is drawn as a solid bar down the left edge, `CardLayout::accentRect`
+placed by `CardLayout`, filled by `CardDelegate::paint()` with
+`CardDelegate::accentLineColour()`. There is no gradient anywhere on a card, and
+nothing draws an avatar: `CardLayout` reserves no rect for one, so the geometry
+would have to grow before the painting could.
+
+**Approach.** Two separable pieces, and the avatar is the one that changes the
+layout.
+
+- The fade is a `QLinearGradient` fill over the card rect, from the accent
+ colour to the pane's background. `accentLineColour()` already records why
+ blending toward the background is wrong for a CHIP; a card's background is
+ exactly where such a blend belongs, so the constraint does not carry over.
+ Both themes come free if the far stop is the palette's own base rather than
+ a literal.
+- The avatar needs a rect in `CardLayout`, which is where it becomes testable
+ without a painter, and it shifts `contentLeft` for every card. The initials
+ come from the display name already carried on the summary; a sender with no
+ display name (an address only) needs an answer before this is built.
+
+**Constraints.**
+
+- The vCard half is blocked on item 72, which is itself unspecified. Build the
+ initials only; do not design the image path in advance.
+- A gradient behind the text has to keep the text readable at the left edge in
+ both themes, which is the same failure mode `accentLineColour()` guards
+ against on a dark palette.
+- This is a looks question, so it is settled by the user looking at it rather
+ than by a test: assert the geometry in `CardLayout`, and hand the appearance
+ over per `tests-only-for-measurable-things`.
+
+## 172. A draft this application writes is tagged `unread`
+
+**Observed (user, 2026-08-27):** a draft they had edited was sitting in the
+Unread view. Reported first as "in the inbox view", corrected to Unread.
+
+**Cause (measured, 2026-08-27).** `ComposeWindow::saveDraftNow()` called
+`DraftStore::write(folder, bytes, "D", ...)`, and `DraftStore::write()` uses
+the flag string verbatim, so every draft this application wrote landed as
+`:2,D`. `maildir.synchronize_flags` is on, and notmuch tags any message
+lacking the `S` (seen) flag `unread`. A draft the user authored is seen by
+definition, so the tag was wrong the moment the file was written.
+
+**Why it looked intermittent, which is the part worth keeping.** The symptom
+heals itself: the next mbsync of that folder round-trips the file, adds `S`,
+and the tag goes away. On the developer's own mail two drafts written two
+minutes apart differed only in whether their folder had synced afterwards:
+one account's drafts folder had synced the next morning and its file read
+`,DS`, while the other's had last synced two minutes after the write and read
+`,D`. So only the newest draft in a folder that has not synced since shows
+it, and an investigation that measures an older draft finds nothing wrong.
+
+**A measurement trap sat in front of this and cost the first answer.**
+`notmuch search --output=tags` reports the union over a THREAD. A reply-draft
+attached to an inbox message therefore reads `draft inbox unread` while no
+single message carries both, which is the same union recorded for
+`ThreadSummary::tags` under item 110. The first pass here read that union as
+a draft carrying `inbox` and concluded there was no defect at all. Measure
+drafts with `--output=messages`; item 164's evidence is a thread-level
+reading and should be re-measured before it is worked on.
+
+**Fixed** by passing `"DS"`. `TestComposeWindow::aSavedDraftIsFlaggedSeen()`
+asserts both flags on the written filename, verified failing first (`got D`).
+
+`TestMainWindow::anAutosaveWritesADraftAndClearsTheDirtyFlag()` had to be
+repaired in the same commit: it asserted `endsWith(":2,D")`, pinning the whole
+flag set when its own comment said the point was the draft flag "not left
+bare". It therefore failed against the corrected behaviour. An
+over-specified assertion of this shape blocks the fix rather than the bug.
+