pulse: 1× local vs 3× remote, local cards don't trigger all-tab dot
Locally-created cards (editor, quick capture, duplicate) now get a single subtle pulse instead of the triple-pulse reserved for relay- synced cards. Local cards also never trigger the unread dot on the fixed "all" bucket tab — the user just created them, there's nothing "unseen" about their own work. state.js: new state.recentlyCreatedIds Set. Populated by editor.js doSave (POST), app.js quick capture (POST), and context-menu.js duplicate (both date-rename and copy paths). board.js renderBoard diff: new card ids are checked against recentlyCreatedIds at diff time. Local ids go into a renderBoard- local newLocalIds set (never into state.unseenCardIds). Remote ids go into unseenCardIds as before. board.js drain block (end of renderBoard): two-phase drain. Phase 1: newLocalIds → pulseCards(local, 'card-pulse-local') with 900ms timeout, works in any bucket. Consumed recentlyCreatedIds entries are deleted. Phase 2: remaining unseenCardIds (remote only) → pulseCards(remote, 'card-pulse-new') with 2400ms timeout, only on activeBucket=all. decorateAllUnreadDot() reads only state.unseenCardIds which now contains exclusively remote ids → no dot from local card creation. style.css: new .card-pulse-local class — same @keyframes but animation-iteration-count:1. Anim-fast/slow overrides added. chore: bump version to 0.9.16 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
1 parent
088c225202
commit
ce6ca73ea0
7 files changed
+51
-17
No files matched your search
@@ -37,6 +37,11 @@ export const state = {
|
||||
// accent pulse on the cards themselves once the user looks at them.
|
||||
// Updated by board.js renderBoard() — see the diff there.
|
||||
unseenCardIds: new Set(),
|
||||
// Ids of cards the user just created locally (editor save, quick
|
||||
// capture, duplicate, undo-recreate). These get a single-pulse (1x)
|
||||
// instead of the triple-pulse (3x) that relay-synced cards get.
|
||||
// Consumed by renderBoard's diff — once used, the id is removed.
|
||||
recentlyCreatedIds: new Set(),
|
||||
|
||||
// Detail / editor
|
||||
editingId: null,
|
||||
|
||||
Reference in new issue
Block a user