The TRENDS tab computes its window at page load:
const [trendsFrom] = useState(thirteenWeeksAgo); // today − 91 days
const [trendsTo] = useState(now); // today
So the requested window shifts by one day, every day. Two consequences, one already worked around and one still latent.
Worked around (#643). Alfred's read is stored against the exact grain:from:to key and joined by exact match, so a weekly schedule would have written a key matching only one day in seven. The schedule is daily for that reason alone — not because a daily refresh is otherwise wanted. That is a cadence chosen to compensate for an unstable key.
Still latent — timezone. The workflow derives to from workflow.now() (UTC) while the browser derives it from local time. At 04:00 local these agree for most offsets, but not all: at UTC+13, 04:00 local is the previous day in UTC, and the pre-computed read would be keyed one day off and never display. Home is UTC+2 so this does not bite today; it would on a far-east tenant.
The better fix is to stop the window moving: snap it to period boundaries — the last N complete weeks/months/quarters plus the current partial one. That would give a stable key, let the schedule fire on a natural cadence, remove the timezone hazard entirely, and stop the chart shifting subtly between page loads on the same data.
It would also mean the displayed window no longer silently changes underneath a reader comparing two visits.
Not urgent. The current arrangement works on every tenant in the fleet. Filed so the daily cadence is not mistaken for a considered choice about refresh frequency.
Related: #584.
The TRENDS tab computes its window at page load:
So the requested window shifts by one day, every day. Two consequences, one already worked around and one still latent.
Worked around (#643). Alfred's read is stored against the exact
grain:from:tokey and joined by exact match, so a weekly schedule would have written a key matching only one day in seven. The schedule is daily for that reason alone — not because a daily refresh is otherwise wanted. That is a cadence chosen to compensate for an unstable key.Still latent — timezone. The workflow derives
tofromworkflow.now()(UTC) while the browser derives it from local time. At 04:00 local these agree for most offsets, but not all: at UTC+13, 04:00 local is the previous day in UTC, and the pre-computed read would be keyed one day off and never display. Home is UTC+2 so this does not bite today; it would on a far-east tenant.The better fix is to stop the window moving: snap it to period boundaries — the last N complete weeks/months/quarters plus the current partial one. That would give a stable key, let the schedule fire on a natural cadence, remove the timezone hazard entirely, and stop the chart shifting subtly between page loads on the same data.
It would also mean the displayed window no longer silently changes underneath a reader comparing two visits.
Not urgent. The current arrangement works on every tenant in the fleet. Filed so the daily cadence is not mistaken for a considered choice about refresh frequency.
Related: #584.