feat(room): jump-to-date navigation (LC-325) #339
Loading…
Reference in a new issue
No description provided.
Delete branch "feat/lc-325-jump-to-date"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
What
A calendar control in the room header that jumps the feed to the first message on or after a chosen day, with a brief highlight. Implements LC-325 / LC-326. Lets a reader reach old context in a long room without hand-scrolling.
How
The room renders its full message history into
#messages(no pagination), and every row already carriesdata-lc-day="YYYY-MM-DD"(LC-244) andid="msg-{id}". So this is client-side only - no new route, DB query, or server render:room_header.html): a calendar-icon button toggling a small popover with a native<input type="date">, placed in the right-hand affordance cluster before the notify dropdown.auto_scroll.html, which already owns#messagesscroll + the.lc-msg-flashpermalink highlight, included once per chat page): onchange, find the first[data-lc-day]whose value is>= chosen(lexical compare onYYYY-MM-DDis chronological),scrollIntoView({ block: 'start' }), and flash it for 2s. On open it bounds the input'smin/maxto the room's first/last message day; it hides the control when the room has no messages, and shows an inline hint when the picked date is after the last message. Escape / outside-click close (mirrors the status picker). No-ops on pages without the control (DMs).Scope
auto_scroll.htmlhandler would already support a DM control, so adding one there is an easy follow-up - left out to keep this focused.Testing
just check(clippy standalone + saas, fmt; Askama compiles the templates) clean.just testandjust test-saasgreen. en/es parity verified for the three new keys. No server contract changed, so the gate is template compilation + the i18n coverage the suites already enforce.Operator impact
None. No new env var, config, or contract change; no
[operator-action]marker.🤖 Generated with Claude Code
Add a calendar control to the room header that jumps the feed to the first message on or after a chosen day. The full room history is already rendered into #messages, so this is purely client-side: the handler in auto_scroll.html finds the first [data-lc-day] row whose "YYYY-MM-DD" value is >= the picked date (lexical compare is chronological), scrollIntoView({block:'start'}), and reuses the permalink highlight (.lc-msg-flash). No new route, DB query, or server render. The native <input type="date"> popover bounds its selectable range to the room's actual first/last message day, hides itself when the room has no messages, and shows an inline hint when the chosen date is after the last message. Escape / outside-click close it (mirrors the status picker). The handler no-ops on pages without the control (DMs). en/es parity. #LC-325 #LC-326 Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>