Problem
Mothership dashboard renders timestamps via plain Date.prototype.toLocaleString(), which honours the browser's locale - on en-US browsers that produces American MM/DD/YYYY with 12h AM/PM (5/19/2026, 1:26 PM). Mixed locales between users + the rest of the dotbot client UI which uses an explicit international format makes timestamps inconsistent and ambiguous.
Target format
- Short weekday (
Tue)
- Short month name (
May) - month-day-year ordering matches the existing client decisions.js convention (month-short, day, year)
- 24h time, leading zeros on hour + minute
- No seconds, no AM/PM, no comma between date and time
Existing client convention to match
core/ui/static/modules/decisions.js _friendlyDate:
new Date(iso).toLocaleDateString(undefined, { month: 'short', day: 'numeric', year: 'numeric' });
That gives May 19, 2026 (no weekday, no time). Mothership dashboard needs the longer form with weekday + time. Same option-bag style, just more fields.
Where to fix
server/src/Dotbot.Server/wwwroot/js/dashboard.js line 289 - inst.createdAt rendered via new Date(inst.createdAt).toLocaleString(). Replace with an Intl.DateTimeFormat-based helper.
server/src/Dotbot.Server/wwwroot/js/dashboard.js line 817 - Last refresh: ${new Date().toLocaleTimeString()} renders 12h time on en-US browsers. Switch to 24h via the same helper or a hour12: false formatter.
- Any other
toLocaleString() / toLocaleDateString() / toLocaleTimeString() calls in server/src/Dotbot.Server/wwwroot/ that surface timestamps. Sweep with grep -rn toLocale wwwroot/.
- If the dashboard has any server-rendered timestamps in Razor / .cshtml, format them server-side with
IFormatProvider matching the JS shape so refresh-vs-initial-render look identical.
Suggested helper
One place to own the format. Drop in wwwroot/js/utils.js (or wherever shared dashboard helpers live):
const _dashboardDateFmt = new Intl.DateTimeFormat('en-GB', {
weekday: 'short',
month: 'short',
day: 'numeric',
year: 'numeric',
hour: '2-digit',
minute: '2-digit',
hour12: false,
});
// "Tue, May 19, 2026, 13:26" - en-GB gives day-month-year by default;
// post-process to month-day order without commas to match the target.
function formatDashboardDateTime(iso) {
if (!iso) return '-';
const d = new Date(iso);
if (isNaN(d)) return '-';
const parts = _dashboardDateFmt.formatToParts(d);
const get = type => parts.find(p => p.type === type)?.value ?? '';
return `${get('weekday')}, ${get('month')} ${get('day')} ${get('year')} ${get('hour')}:${get('minute')}`;
}
formatToParts decouples output from locale-specific punctuation / ordering. Caller just passes an ISO string.
Acceptance
Out of scope
- Timezone selection / per-user TZ preference - format stays browser-local. Future enhancement if needed.
- Client outpost UI - already uses the short-month convention; only touch if the same surface drifts.
- Internationalisation beyond English month/weekday names - dotbot's UI is currently English only.
Files likely touched
server/src/Dotbot.Server/wwwroot/js/dashboard.js
server/src/Dotbot.Server/wwwroot/js/utils.js (new helper) or wherever shared helpers live
server/src/Dotbot.Server/wwwroot/css/*.css only if column widths need adjusting for the longer string
Problem
Mothership dashboard renders timestamps via plain
Date.prototype.toLocaleString(), which honours the browser's locale - on en-US browsers that produces American MM/DD/YYYY with 12h AM/PM (5/19/2026, 1:26 PM). Mixed locales between users + the rest of the dotbot client UI which uses an explicit international format makes timestamps inconsistent and ambiguous.Target format
Tue)May) - month-day-year ordering matches the existing clientdecisions.jsconvention (month-short, day, year)Existing client convention to match
core/ui/static/modules/decisions.js_friendlyDate:That gives
May 19, 2026(no weekday, no time). Mothership dashboard needs the longer form with weekday + time. Same option-bag style, just more fields.Where to fix
server/src/Dotbot.Server/wwwroot/js/dashboard.jsline 289 -inst.createdAtrendered vianew Date(inst.createdAt).toLocaleString(). Replace with anIntl.DateTimeFormat-based helper.server/src/Dotbot.Server/wwwroot/js/dashboard.jsline 817 -Last refresh: ${new Date().toLocaleTimeString()}renders 12h time on en-US browsers. Switch to 24h via the same helper or ahour12: falseformatter.toLocaleString()/toLocaleDateString()/toLocaleTimeString()calls inserver/src/Dotbot.Server/wwwroot/that surface timestamps. Sweep withgrep -rn toLocale wwwroot/.IFormatProvidermatching the JS shape so refresh-vs-initial-render look identical.Suggested helper
One place to own the format. Drop in
wwwroot/js/utils.js(or wherever shared dashboard helpers live):formatToPartsdecouples output from locale-specific punctuation / ordering. Caller just passes an ISO string.Acceptance
Tue, May 19 2026 13:26regardless of browser locale.toLocaleString()/toLocaleDateString()/toLocaleTimeString()calls onDateobjects underserver/src/Dotbot.Server/wwwroot/for user-visible timestamps. (Calls on numbers, e.g.tokens.toLocaleString()for thousands-separators, are fine.)Out of scope
Files likely touched
server/src/Dotbot.Server/wwwroot/js/dashboard.jsserver/src/Dotbot.Server/wwwroot/js/utils.js(new helper) or wherever shared helpers liveserver/src/Dotbot.Server/wwwroot/css/*.cssonly if column widths need adjusting for the longer string