← Commit history
Cargo.lock+1−1
@@ -10,7 +10,7 @@ checksum = "320119579fcad9c21884f5c4861d16174d0e06250625266f50fe6898340abefa"  [[package]] name = "adom-shotlog"-version = "0.29.5"+version = "0.29.6" dependencies = [  "axum",  "base64",
Cargo.toml+1−1
@@ -1,6 +1,6 @@ [package] name = "adom-shotlog"-version = "0.29.5"+version = "0.29.6" edition = "2021" description = "Screenshot log viewer and CLI for Adom" license = "MIT"
README.md+1−1
@@ -56,7 +56,7 @@ adom-shotlog open -c my-project --skinny        # a ~20% right-side column  ### Refer to a shot by name -Every card shows its **ref** (`#42`) in a slim strip above the thumbnail (never on the image, so a screenshot of the thumbnail stays clean). Say "#42 is the one" to your AI and it knows exactly which shot you mean. An AI iterating on variants can also give each shot a **handle**:+Every card shows its **ref** (`#42`) in a slim strip above the thumbnail (never on the image, so a screenshot of the thumbnail stays clean). Next to the ref is the shot's capture **date and time** (`#42 · Nov 30 · 12:10 PM`, with the year for shots from another year); hover it for the full local stamp and time zone. Say "#42 is the one" to your AI and it knows exactly which shot you mean. An AI iterating on variants can also give each shot a **handle**:  ``` adom-shotlog inject -c hero -d "hero variant G, tighter crop" --tag heroG variant-g.png
VERSION+1−1
@@ -1 +1 @@-0.29.5+0.29.6
bin/adom-shotlog
⋯ 1 unchanged line ⋯
package.json+2−2
@@ -1,7 +1,7 @@ {   "slug": "adom-shotlog",-  "version": "0.29.5",-  "changelog": "0.29.5: each card header now shows the shot's capture date and time next to its number (#4 · 11:58 AM for today, Nov 18 9:03 AM earlier this year, the year added for older shots), with the full local date, time and time zone on hover, and the same time in the zoom view (PR #7, Drew Owens).",+  "version": "0.29.6",+  "changelog": "0.29.6: every shot now shows its date as well as its time, today's shots included (#210 · Nov 30 · 12:10 PM; the year is added for other years), in the card header, the classic meta line and the zoom view, with the full stamp on hover. The CLI lists (channels, shots) gain a date and time column next to the age.",   "type": "app",   "title": "Shotlog - Screenshot Log",   "description": "See the shots your AI never showed you, and know it actually SAW them. adom-shotlog streams every screenshot the AI gathers into a live gallery (webview/pup/browser/phone), reports whether a human is really watching and on which surface, and ingests Adom Bridge child-window arrays via --meta.",
page.json+2−2
@@ -1,7 +1,7 @@ {   "slug": "adom-shotlog",-  "version": "0.29.5",-  "changelog": "0.29.5: each card header now shows the shot's capture date and time next to its number (#4 · 11:58 AM for today, Nov 18 9:03 AM earlier this year, the year added for older shots), with the full local date, time and time zone on hover, and the same time in the zoom view (PR #7, Drew Owens).",+  "version": "0.29.6",+  "changelog": "0.29.6: every shot now shows its date as well as its time, today's shots included (#210 · Nov 30 · 12:10 PM; the year is added for other years), in the card header, the classic meta line and the zoom view, with the full stamp on hover. The CLI lists (channels, shots) gain a date and time column next to the age.",   "type": "app",   "title": "Shotlog - Screenshot Log",   "description": "See the shots your AI never showed you, and know it actually SAW them. adom-shotlog streams every screenshot the AI gathers into a live gallery (webview/pup/browser/phone), reports whether a human is really watching and on which surface, and ingests Adom Bridge child-window arrays via --meta.",
src/html/index.html+8−10
@@ -282,7 +282,7 @@ body.compact .card-popups .ph { padding-top: 4px; } .card-refbar .rb-del .lbl { font-size: 10.5px; padding: 0 2px; } @media (hover: none) { .card-refbar .rb-del { opacity: .8; } } .card-refbar .rb-tag { color: var(--accent-bright); background: rgba(0,184,176,.12); border: 1px solid rgba(0,184,176,.45);-  border-radius: 5px; padding: 0 6px; max-width: 70%; min-width: 0; flex: 0 1 auto; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }+  border-radius: 5px; padding: 0 6px; max-width: 70%; min-width: 2.5em; flex: 0 1000 auto; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } /* caption pill (gold): an annotated shot carries a longer caption from the    AI that sent it. It starts the caption here, cut to fit the narrow    sidebar, and hovering it reveals the full info overlay, like the ⓘ. */@@ -1039,22 +1039,20 @@ body:not(.compact) .card-refbar .rb-cap { display: none; }     toast.classList.toggle('lifted', !!document.querySelector('.cdown')); // never under the countdown card     clearTimeout(toastTimer); toastTimer=setTimeout(()=>toast.classList.remove('show'), ms||1800); }   function esc(s){ return String(s).replace(/[&<>"']/g,c=>({'&':'&amp;','<':'&lt;','>':'&gt;','"':'&quot;',"'":'&#39;'}[c])); }-  function fmtTime(ts){ const d=new Date(ts), h=d.getHours(), mm=String(d.getMinutes()).padStart(2,'0');-    return (h%12||12)+':'+mm+(h<12?'am':'pm'); }-  function fmtDate(ts){ const d=new Date(ts), mo=['Jan','Feb','Mar','Apr','May','Jun','Jul','Aug','Sep','Oct','Nov','Dec'][d.getMonth()];-    return mo+' '+d.getDate()+', '+fmtTime(ts); }+  // Date AND time, always (Drew, 2026-11-30: "shotlog needs not just time but also date").+  // "Nov 30 · 12:10 PM" this year, "Nov 18, 2025 · 9:03 AM" any other year. One format for+  // the card header, the classic meta line and the zoom view; the tooltip has the full stamp.   function fmtCardTime(ts, now){     const d=new Date(ts);     if (!ts || isNaN(d.getTime())) return '';     const ref = now || new Date();     const h = d.getHours(), mm = String(d.getMinutes()).padStart(2,'0');     const clock = (h%12||12)+':'+mm+' '+(h<12?'AM':'PM');-    const sameDay = d.getFullYear()===ref.getFullYear() && d.getMonth()===ref.getMonth() && d.getDate()===ref.getDate();-    if (sameDay) return clock;     const mo = ['Jan','Feb','Mar','Apr','May','Jun','Jul','Aug','Sep','Oct','Nov','Dec'][d.getMonth()];-    if (d.getFullYear()===ref.getFullYear()) return mo+' '+d.getDate()+' '+clock;-    return mo+' '+d.getDate()+', '+d.getFullYear()+' '+clock;+    const day = mo+' '+d.getDate()+(d.getFullYear()===ref.getFullYear() ? '' : ', '+d.getFullYear());+    return day+' \u00b7 '+clock;   }+  function fmtDate(ts){ return fmtCardTime(ts); }   function fmtIsoLocal(d){     const p=n=>String(n).padStart(2,'0');     const off=-d.getTimezoneOffset();@@ -2322,7 +2320,7 @@ body:not(.compact) .card-refbar .rb-cap { display: none; }     }   }); -  // Refresh card header datetimes every minute so "today" shots gain their date after midnight.+  // Refresh card header datetimes every minute (a shot gains its year when the year rolls over).   setInterval(() => {     const now = new Date();     document.querySelectorAll('.card-refbar .rb-ts[data-ts]').forEach(el => {
src/main.rs+43−4
@@ -1027,6 +1027,23 @@ fn run_viewers(channel: &str, port: u16, url: Option<&str>) {  /// Print an overview of every channel: last activity, shot count, who's watching, /// and the source of the last shot. Newest-active first.+/// Local date AND time for the CLI lists, the same shape the gallery shows:+/// "Nov 30 12:10 PM" this year, "Nov 18, 2025 9:03 AM" any other year.+fn fmt_when<Tz: chrono::TimeZone>(d: &chrono::DateTime<Tz>, this_year: i32) -> String+where Tz::Offset: std::fmt::Display {+    use chrono::Datelike;+    if d.year() == this_year { d.format("%b %-d %-I:%M %p").to_string() }+    else { d.format("%b %-d, %Y %-I:%M %p").to_string() }+}+fn fmt_when_epoch(epoch: i64) -> String {+    use chrono::{Datelike, TimeZone};+    if epoch <= 0 { return "-".into(); }+    match chrono::Local.timestamp_opt(epoch, 0).single() {+        Some(d) => fmt_when(&d, chrono::Local::now().year()),+        None => "-".into(),+    }+}+ fn run_channels(port: u16, since_min: Option<i64>, limit: usize) {     let val = match http_get(port, "/api/channels") {         Ok(v) => v,@@ -1040,7 +1057,7 @@ fn run_channels(port: u16, since_min: Option<i64>, limit: usize) {         if m < 1 { "just now".into() } else if m < 60 { format!("{m}m ago") }         else if m < 1440 { format!("{}h ago", m / 60) } else { format!("{}d ago", m / 1440) }     };-    println!("{:>9}  {:>5}  {:<20}  {}", "ACTIVITY", "SHOTS", "WATCHING", "CHANNEL");+    println!("{:>9}  {:<21}  {:>5}  {:<20}  {}", "ACTIVITY", "LAST SHOT", "SHOTS", "WATCHING", "CHANNEL");     let (mut shown, mut watched, mut total) = (0usize, 0usize, 0usize);     for row in &rows {         total += 1;@@ -1060,7 +1077,8 @@ fn run_channels(port: u16, since_min: Option<i64>, limit: usize) {         let ch = row["channel"].as_str().unwrap_or("?");         let shots = row["shots"].as_u64().unwrap_or(0);         let ago = if last_epoch == 0 { "—".into() } else { fmt_ago(age) };-        println!("{ago:>9}  {shots:>5}  {watching:<20}  {ch}");+        let when = fmt_when_epoch(last_epoch);+        println!("{ago:>9}  {when:<21}  {shots:>5}  {watching:<20}  {ch}");         shown += 1;     }     println!("\n{total} channels · {watched} with a live viewer right now.");@@ -1098,7 +1116,7 @@ fn run_shots(channel: &str, port: u16, limit: usize, tagged_only: bool, json: bo     };     let total = rows.len();     let tagged_total = rows.iter().filter(|r| has_tag(r)).count();-    println!("{:>6}  {:<16}  {:>9}  {}", "REF", "HANDLE", "AGE", "DESCRIPTION");+    println!("{:>6}  {:<16}  {:>9}  {:<21}  {}", "REF", "HANDLE", "AGE", "WHEN", "DESCRIPTION");     for row in picked.into_iter().rev() {         let id = row["id"].as_u64().unwrap_or(0);         let tag = row["tag"].as_str().filter(|t| !t.is_empty()).unwrap_or("-");@@ -1109,7 +1127,8 @@ fn run_shots(channel: &str, port: u16, limit: usize, tagged_only: bool, json: bo         let desc = row["description"].as_str().unwrap_or("");         let desc = if desc.chars().count() > 58 { format!("{}...", desc.chars().take(55).collect::<String>()) } else { desc.to_string() };         let tag = if tag.chars().count() > 16 { format!("{}..", tag.chars().take(14).collect::<String>()) } else { tag.to_string() };-        println!("{:>6}  {:<16}  {ago:>9}  {desc}", format!("#{id}"), tag);+        let when = fmt_when_epoch(epoch);+        println!("{:>6}  {:<16}  {ago:>9}  {when:<21}  {desc}", format!("#{id}"), tag);     }     println!("\n{total} shots, {tagged_total} with a handle. Every shot is addressable by its ref: tell the human \"#{}\" and they see exactly that card.", rows.last().and_then(|r| r["id"].as_u64()).unwrap_or(0));     if tagged_total == 0 && total > 2 {@@ -1232,3 +1251,23 @@ fn send_request(port: u16, request: &str) -> Result<serde_json::Value, String> {      serde_json::from_str(body).map_err(|e| format!("Invalid JSON: {e}")) }++#[cfg(test)]+mod when_tests {+    use super::fmt_when;+    use chrono::DateTime;++    #[test]+    fn this_year_shows_month_day_and_time() {+        let d = DateTime::parse_from_rfc3339("2026-11-30T12:10:00-06:00").unwrap();+        assert_eq!(fmt_when(&d, 2026), "Nov 30 12:10 PM");+        let d = DateTime::parse_from_rfc3339("2026-03-05T00:07:00-06:00").unwrap();+        assert_eq!(fmt_when(&d, 2026), "Mar 5 12:07 AM");+    }++    #[test]+    fn another_year_adds_the_year() {+        let d = DateTime::parse_from_rfc3339("2025-11-18T09:03:00-06:00").unwrap();+        assert_eq!(fmt_when(&d, 2026), "Nov 18, 2025 9:03 AM");+    }+}
tools/test-card-time.cjsadded+36
@@ -0,0 +1,36 @@+#!/usr/bin/env node+// Unit test for the viewer's date+time label (src/html/index.html, fmtCardTime).+// Every place the gallery shows a shot's time must show its DATE too.+// Usage: node tools/test-card-time.cjs      (exit 0 = pass)+const fs = require('fs'), path = require('path'), assert = require('assert');+const html = fs.readFileSync(path.join(__dirname, '..', 'src', 'html', 'index.html'), 'utf8');+const grab = name => { const m = html.match(new RegExp('  function ' + name + '\\([\\s\\S]*?\\n  }\\n'));+  if (!m) throw new Error('cannot find ' + name + ' in index.html'); return m[0]; };+const { fmtCardTime, fmtDate, fmtTimeTooltip } = new Function(+  grab('fmtCardTime') + html.match(/  function fmtDate\(ts\)\{[^\n]*\n/)[0] + grab('fmtIsoLocal') + grab('fmtTimeTooltip') ++  'return { fmtCardTime, fmtDate, fmtTimeTooltip };')();+const now = new Date(2026, 10, 30, 12, 30);+const t = (y, mo, d, h, mi) => new Date(y, mo, d, h, mi).toISOString();+let n = 0; const eq = (a, b, why) => { assert.strictEqual(a, b, why); n++; };++eq(fmtCardTime(t(2026, 10, 30, 12, 10), now), 'Nov 30 · 12:10 PM', 'a shot taken TODAY still shows its date');+eq(fmtCardTime(t(2026, 10, 30, 0, 5), now),   'Nov 30 · 12:05 AM', 'midnight hour');+eq(fmtCardTime(t(2026, 10, 29, 23, 59), now), 'Nov 29 · 11:59 PM', 'yesterday shows the real date');+eq(fmtCardTime(t(2026, 0, 3, 9, 3), now),     'Jan 3 · 9:03 AM',   'earlier this year: no year');+eq(fmtCardTime(t(2025, 10, 18, 9, 3), now),   'Nov 18, 2025 · 9:03 AM', 'another year adds the year');+eq(fmtCardTime(t(2027, 0, 1, 13, 0), now),    'Jan 1, 2027 · 1:00 PM',  'a later year adds the year too');+eq(fmtCardTime('', now), '', 'empty input');+eq(fmtCardTime('not-a-date', now), '', 'invalid input');+// The classic meta line uses the same label.+const real = new Date(); real.setHours(8, 7, 0, 0);+eq(fmtDate(real.toISOString()), fmtCardTime(real.toISOString()), 'classic meta line == card header label');+assert.match(fmtCardTime(real.toISOString()), /^[A-Z][a-z]{2} \d{1,2} · 8:07 AM$/); n++;+// The tooltip keeps the full stamp: year, seconds and the ISO form.+const tip = fmtTimeTooltip(t(2026, 10, 30, 12, 10));+assert.match(tip, /2026/); assert.match(tip, /\n2026-11-30T12:10:00[+-]\d\d:\d\d$/); n += 2;+// Every time display in the viewer goes through the dated label (no time-only helper left).+assert.ok(!/function fmtTime\(/.test(html), 'time-only fmtTime helper must be gone'); n++;+assert.ok(!/if \(sameDay\) return clock/.test(html), 'no time-only branch for today'); n++;+for (const use of ["ts.textContent=fmtDate(e.timestamp)", "fmtCardTime(e.timestamp);", "add('ts', fmtCardTime(e.timestamp)"]) {+  assert.ok(html.includes(use), 'viewer no longer renders: ' + use); n++; }+console.log('OK: ' + n + ' card-time checks passed');