Changeset e9c9ae1 in Klonkt for src/assets/css/reply-editor.css


Ignore:
Timestamp:
07/19/2026 10:48:15 PM (7 weeks ago)
Author:
Robin <roboburr@…>
Branches:
main
Children:
ff3b8ce
Parents:
5190152
git-author:
Robin <roboburr@…> (07/19/2026 10:47:10 PM)
git-committer:
Robin <roboburr@…> (07/19/2026 10:48:15 PM)
Message:

Feature: mentions bar with conversation partners (klonkt-demo-u02)

Implicit mentions leave the text and become an editable "To:" bar above the
reply editor: the parent author plus the thread's ancestor authors as chips.
Removing a chip stops addressing that partner (no mention anchor, no Mention
tag, no inbox ping); explicit @mentions typed in the text keep working via the
existing resolveMentionsInText path.

  • getInteractions: each thread node gets "participants" (author + ancestor chain via the byId map, own nodes skipped, deduped, capped at 8) and carries actor_uri now.
  • reply-editor partial: the bar renders server-side with a hidden "mentions" JSON field carrying the full list, so the no-JS path addresses everyone; the JS removes chips and mirrors the remaining list into the field.
  • deliverReply({mentions}): undefined = legacy parent-only behavior; an array (possibly empty) = the kept list drives the mention prefix, the Mention tags (mentionTags reads the content anchors) and the per-actor inbox pings. to_actor/to_handle follow the kept list (parent when kept, else the first chip, else null -> the note addresses Public only).
  • deliverOutboxUpdate: an edit reuses the OLD content's leading mention anchors instead of rebuilding just to_actor, so co-mentions survive edits (legacy rows fall back as before).
  • Interact page passes the target author as the single chip. Full-screen mobile keeps the top bar above the mentions bar (flex order).

4 new tests (participant chains, multi-chip tags + to_actor, empty bar goes
Public-only, co-mentions survive edits); 97 green. Browser-verified: bar shows
@bob + @alice on a nested reply, removing @alice updates the hidden field, the
sent reply mentions and addresses only @bob; no console errors.

Co-Authored-By: Claude Opus 4.8 <noreply@…>

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/assets/css/reply-editor.css

    r5190152 re9c9ae1  
    2929  background: transparent; color: inherit; max-width: 10rem;
    3030}
     31
     32/* Mentions bar (u02): conversation partners as removable chips. */
     33.re-mentions { display: flex; flex-wrap: wrap; align-items: center; gap: .35rem; }
     34.re-mentions-label { font-size: .78rem; color: color-mix(in srgb, var(--ink, #000) 55%, transparent); }
     35.re-mention {
     36  display: inline-flex; align-items: center; gap: .2rem;
     37  padding: .15rem .3rem .15rem .55rem; border-radius: 999px; font-size: .8rem;
     38  background: color-mix(in srgb, var(--accent, #06c) 14%, transparent);
     39  border: 1px solid color-mix(in srgb, var(--accent, #06c) 30%, transparent);
     40  max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
     41}
     42.re-mention-del { border: none; background: none; color: inherit; font-size: 1rem; line-height: 1; cursor: pointer; padding: 0 .25rem; }
    3143
    3244/* Media attachments (chips under the editor). */
     
    6476  gap: .6rem;
    6577}
     78.re-form.re-full .re-head { order: -1; }   /* the top bar stays topmost, above the mentions bar */
    6679.re-form.re-full .re-editor { flex: 1; min-height: 0; overflow-y: auto; border: none; padding: .4rem .1rem; }
    6780.re-form.re-full .re-editor:focus { border: none; }
Note: See TracChangeset for help on using the changeset viewer.