v0.3.4: Comment edit/delete, native notifications, forward-compatible protocol, UI fixes

Comment edit & delete:
- EditComment/DeleteComment BlobHeaderDiffOps with upstream+downstream propagation
- Trust-based: comment author can edit/delete, post author can delete
- Storage: edit_comment(), delete_comment() methods
- Frontend: inline edit (Enter/Escape), delete with confirm

Native notifications:
- tauri-plugin-notification for system notifications on all platforms
- Triggers for messages, new posts, reactions, and comments
- notif_reacts setting added, button-group toggles replace dropdowns
- _notifReady flag prevents startup spam

Protocol hardening:
- BlobHeaderDiffOp::Unknown variant with #[serde(other)] for forward compatibility
- Old nodes silently skip unknown ops instead of crashing

UI fixes:
- Self removed from Following list
- Offline follows in lightbox popup (auto-show if no one online)
- Sent DMs filtered from My Posts
- Comment threading scoped to closest .post (fixes duplicate ID issue)
- Select dropdown text legible in WebKitGTK (black on white options)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
Scott Reimers 2026-03-18 00:47:53 -04:00
parent ce176a2299
commit 0abc244ee9
18 changed files with 1616 additions and 67 deletions

View file

@ -1,5 +1,6 @@
* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: system-ui, sans-serif; max-width: 640px; margin: 0 auto; padding: 1rem; background: #1a1a2e; color: #e0e0e0; }
select option { color: #000 !important; }
body { font-family: system-ui, sans-serif; max-width: 640px; margin: 0 auto; padding: 1rem; background: #1a1a2e; color: #e0e0e0; color-scheme: dark; }
header { border-bottom: 1px solid #333; padding-bottom: 0.5rem; margin-bottom: 1rem; }
header h1 { font-size: 1.4rem; color: #7fdbca; }
#stats-bar { font-size: 0.8rem; color: #bbc; margin-top: 0.25rem; }
@ -21,8 +22,15 @@ header h1 { font-size: 1.4rem; color: #7fdbca; }
.overlay-close { background: none; border: none; color: #889; font-size: 1.4rem; cursor: pointer; padding: 0 0.3rem; line-height: 1; transition: color 0.15s; }
.overlay-close:hover { color: #e74c3c; }
.overlay-body { padding: 1rem; max-height: 70vh; overflow-y: auto; }
.overlay-body select { width: 100%; background: #1a1a2e; color: #e0e0e0; border: 1px solid #444; border-radius: 4px; padding: 0.4rem; font-size: 0.85rem; font-family: inherit; margin-bottom: 0.75rem; }
.overlay-body select { width: 100%; background: #1a1a2e; border: 1px solid #444; border-radius: 4px; padding: 0.4rem; font-size: 0.85rem; font-family: inherit; margin-bottom: 0.75rem; }
.overlay-body select:focus { outline: none; border-color: #7fdbca; }
.overlay-body select option { background: #fff; color: #000; }
.notif-row { margin-bottom: 0.6rem; }
.notif-label { display: block; font-size: 0.8rem; color: #bbc; margin-bottom: 0.3rem; }
.notif-opts { display: flex; gap: 0.3rem; flex-wrap: wrap; }
.notif-opt { background: #1a1a2e; color: #999; border: 1px solid #333; border-radius: 4px; padding: 0.25rem 0.6rem; font-size: 0.75rem; cursor: pointer; transition: all 0.15s; }
.notif-opt:hover { border-color: #555; color: #ccc; }
.notif-opt.active { background: #3b82f6; color: #fff; border-color: #3b82f6; }
.overlay-body label { display: block; font-size: 0.8rem; color: #bbc; margin-bottom: 0.25rem; }
/* Clickable activity peer IDs */
@ -189,9 +197,9 @@ header h1 { font-size: 1.4rem; color: #7fdbca; }
/* Visibility selector */
#visibility-row { display: flex; gap: 0.4rem; margin-top: 0.35rem; align-items: center; }
#visibility-select, #circle-select { background: #1a1a2e; color: #fff; border: 1px solid #444; border-radius: 3px; padding: 0.2rem 0.4rem; font-size: 0.75rem; font-family: inherit; -webkit-appearance: none; appearance: none; color-scheme: dark; }
#visibility-select, #circle-select { background: #1a1a2e; border: 1px solid #444; border-radius: 3px; padding: 0.2rem 0.4rem; font-size: 0.75rem; font-family: inherit; -webkit-appearance: none; appearance: none; }
#visibility-select:focus, #circle-select:focus { outline: none; border-color: #7fdbca; }
#visibility-select option, #circle-select option { background: #1a1a2e; color: #fff; }
#visibility-select option, #circle-select option { background: #fff; color: #000; }
/* Visibility badges on posts */
.vis-badge { font-size: 0.6rem; padding: 0.1rem 0.35rem; border-radius: 3px; margin-left: 0.4rem; font-family: system-ui, sans-serif; vertical-align: middle; }
@ -237,7 +245,8 @@ header h1 { font-size: 1.4rem; color: #7fdbca; }
.circle-members { font-size: 0.75rem; font-family: monospace; color: #bbc; display: flex; flex-wrap: wrap; gap: 0.3rem; }
.circle-member { background: #1e2040; padding: 0.2rem 0.5rem; border-radius: 3px; display: inline-flex; align-items: center; gap: 0.35rem; }
.circle-add-row { display: flex; gap: 0.3rem; margin-top: 0.4rem; }
.add-member-select { flex: 1; background: #1a1a2e; color: #e0e0e0; border: 1px solid #444; border-radius: 3px; padding: 0.2rem; font-size: 0.75rem; }
.add-member-select { flex: 1; background: #1a1a2e; border: 1px solid #444; border-radius: 3px; padding: 0.2rem; font-size: 0.75rem; }
.add-member-select option { background: #fff; color: #000; }
.empty-hint { color: #667; font-size: 0.8rem; font-style: italic; }
.hidden { display: none !important; }
@ -246,14 +255,16 @@ header h1 { font-size: 1.4rem; color: #7fdbca; }
.anchor-item { display: flex; align-items: center; gap: 0.35rem; padding: 0.3rem 0; border-bottom: 1px solid #1e2040; }
.anchor-item:last-child { border-bottom: none; }
.anchor-item .peer-label { flex: 1; display: flex; align-items: center; gap: 0.35rem; }
#anchor-add-select { flex: 1; background: #1a1a2e; color: #e0e0e0; border: 1px solid #444; border-radius: 3px; padding: 0.2rem; font-size: 0.75rem; }
#anchor-add-select { flex: 1; background: #1a1a2e; border: 1px solid #444; border-radius: 3px; padding: 0.2rem; font-size: 0.75rem; }
#anchor-add-select option { background: #fff; color: #000; }
/* DM compose */
#dm-compose textarea { width: 100%; padding: 0.5rem; background: #1a1a2e; color: #e0e0e0; border: 1px solid #333; border-radius: 4px; resize: none; font-family: inherit; font-size: 0.9rem; min-height: 60px; line-height: 1.5; transition: border-color 0.15s; margin-top: 0.5rem; }
#dm-compose textarea:focus { outline: none; border-color: #7fdbca; }
#dm-compose textarea::placeholder { color: #778; }
.dm-compose-row { margin-bottom: 0; }
#dm-recipient-select { width: 100%; background: #1a1a2e; color: #e0e0e0; border: 1px solid #444; border-radius: 4px; padding: 0.4rem; font-size: 0.85rem; font-family: inherit; }
#dm-recipient-select { width: 100%; background: #1a1a2e; border: 1px solid #444; border-radius: 4px; padding: 0.4rem; font-size: 0.85rem; font-family: inherit; }
#dm-recipient-select option { background: #fff; color: #000; }
#dm-recipient-select:focus { outline: none; border-color: #7fdbca; }
.dm-compose-footer { display: flex; justify-content: space-between; align-items: center; margin-top: 0.5rem; padding-top: 0.5rem; border-top: 1px solid #2a2a40; }
@ -294,6 +305,14 @@ header h1 { font-size: 1.4rem; color: #7fdbca; }
.last-seen { color: #666; }
.follows-section-header { font-size: 0.8rem; font-weight: 600; color: #888; padding: 0.5rem 0 0.25rem; border-bottom: 1px solid #2a2a40; margin-bottom: 0.3rem; margin-top: 0.5rem; }
.follows-section-header:first-child { margin-top: 0; }
.follows-offline-header { cursor: pointer; color: #5b8def !important; }
.follows-offline-header:hover { color: #7fdbca !important; }
.offline-lightbox { position: fixed; top: 0; left: 0; width: 100vw; height: 100vh; z-index: 999999; background: rgba(0,0,0,0.7); display: flex; align-items: center; justify-content: center; }
.offline-lightbox-content { background: #1a1a2e; border: 1px solid #333; border-radius: 12px; padding: 1rem; max-width: 500px; width: 90%; max-height: 80vh; overflow-y: auto; }
.offline-lightbox-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 0.75rem; }
.offline-lightbox-header h3 { color: #e0e0e0; font-size: 1rem; margin: 0; }
.offline-lightbox-close { background: none; border: none; color: #889; font-size: 1.4rem; cursor: pointer; }
.offline-lightbox-close:hover { color: #e74c3c; }
.peer-card-actions { display: flex; gap: 0.3rem; margin-top: 0.35rem; }
.peer-card-highlight { border-color: #7fdbca; animation: peerHighlight 2s ease-out; }
@keyframes peerHighlight { 0% { border-color: #7fdbca; box-shadow: 0 0 8px rgba(127, 219, 202, 0.3); } 100% { border-color: #2a2a40; box-shadow: none; } }
@ -390,7 +409,10 @@ header h1 { font-size: 1.4rem; color: #7fdbca; }
.comment-bubble { display: flex; gap: 0.35rem; align-items: baseline; padding: 0.2rem 0; font-size: 0.82rem; }
.comment-author { color: #7fdbca; font-weight: 600; white-space: nowrap; font-size: 0.78rem; }
.comment-text { color: #ddd; }
.comment-time { color: #777; font-size: 0.7rem; white-space: nowrap; }
.comment-time { color: #777; font-size: 0.7rem; white-space: nowrap; display: flex; align-items: center; gap: 0.3rem; }
.comment-edit-btn, .comment-delete-btn { background: none; border: none; color: #556; font-size: 0.65rem; cursor: pointer; padding: 0; }
.comment-edit-btn:hover { color: #5b8def; }
.comment-delete-btn:hover { color: #e74c3c; }
.comment-compose { display: flex; gap: 0.35rem; margin-top: 0.4rem; align-items: center; }
.comment-input { flex: 1; background: #1a1a2e; border: 1px solid #3a3a5a; border-radius: 0.35rem; padding: 0.3rem 0.5rem; color: #e0e0e0; font-size: 0.82rem; }
.comment-input:focus { border-color: #7fdbca; outline: none; }