fix: drop the em dash from user-facing copy

Anti-slop audit-002, item 13 (R-02). Every em dash in text the user sees
(web UI labels, toasts, tooltips, empty and error states, chat steps,
API messages, notifications and channel replies) became a period, comma,
colon or parentheses. Model prompts, logs, comments, regexes and the lone
dash that marks an empty value are unchanged. Text the client matches
against server copy (the default workspace summary, the quiet-night dream
summary) accepts the old wording too, so cached and saved data still match.
This commit is contained in:
shumeiko.it
2026-10-27 14:53:12 +01:00
parent 3ae3cc81fc
commit 25ad379e38
149 changed files with 449 additions and 412 deletions

View File

@@ -41,7 +41,9 @@ export interface DreamDay {
narrative?: string;
}
export const QUIET_NIGHT_SUMMARY = 'A quiet night — your memory was already tidy.';
export const QUIET_NIGHT_SUMMARY = 'A quiet night. Your memory was already tidy.';
/** The same summary as saved before the copy changed; read() upgrades it. */
const LEGACY_QUIET_NIGHT_SUMMARY = 'A quiet night — your memory was already tidy.';
/** Local calendar date (not UTC): "last night" must match the user's clock. */
export function localDateString(d: Date = new Date()): string {
@@ -159,7 +161,12 @@ export class DreamJournal {
try {
const raw = fs.readFileSync(path.join(this.dir, `${date}.json`), 'utf8');
const parsed = JSON.parse(raw) as DreamDay;
if (parsed?.date && Array.isArray(parsed.events)) return parsed;
if (parsed?.date && Array.isArray(parsed.events)) {
// Older days keep the previous wording; show and compare the current one.
return parsed.summary === LEGACY_QUIET_NIGHT_SUMMARY
? { ...parsed, summary: QUIET_NIGHT_SUMMARY }
: parsed;
}
} catch {
/* missing or corrupt file → treated as absent */
}