Repository navigation
fix(mobile): mark audit report timestamps UTC and translate audit actors - #8248
Conversation
The audit report's period line is labelled UTC, but the generated-at line
formatted only a date in UTC with no clock and no zone, so a reader west of
UTC saw a generation day their own calendar had not reached. Both the
generated-at line and each event timestamp now use one formatter that prints
the date, the clock and an explicit UTC marker in the app language.
Expand a finding and the event actor printed the server's English display
name ("Kilo system"). System and masked actors now render catalog labels in
the app language, chosen from the actor discriminator the report already
sends; a masked actor's kind is a new optional field so a localized client
does not have to match an English string, and a real user's name is still
shown verbatim.
|
bot: Android emulator ( Observed in the rendered screen:
Event labels ( |
Code Review SummaryStatus: No Issues Found | Recommendation: Merge Executive SummaryIncremental review of Overview
Verification of previous findings (all fixed)
The test still renders exactly one tree per test, so the shared module-scope renderer cannot leak a previous tree. No production-code leak was introduced: the incremental changes touch only a comment and locale values. Files Reviewed (6 changed files in this increment)
Notes: reviewed at Previous Review Summary (commit 72d2105)Current summary above is authoritative. Previous snapshots are kept for context only. Previous review (commit 72d2105)Status: 6 Issues Found | Recommendation: Address before merge Executive SummaryNo functional defect in the new UTC formatting or masked-actor labeling; the findings are non-blocking localized-copy inconsistencies in four catalogs, one misleading comment, and missing test-renderer cleanup. Overview
Issue Details (click to expand)SUGGESTION
Files Reviewed (91 files)
Notes: verified that Reviewed by deepseek-v4.1-flash-1017 · Input: 44.1K · Output: 3.5K · Cached: 244.6K Review guidance: REVIEW.md from base branch |
Review follow-ups: the Oromo catalogs call a system "Sirna", Malay and Igbo admin labels reuse "Pentadbir" and "Onye nchịkwa", and Yoruba writes "Alákòóso"/"Olùmúlò". The timestamp comment now names the real formatter, and the new mounted suite unmounts its renderer like its siblings.
…mestamp-actor # Conflicts: # apps/mobile/src/i18n/locales/fi.json

Change
Two copy gaps in the Security Agent audit report (
apps/mobile/src/components/security-agent/audit-report-screen.tsx), both against the report's own UTC period line:generatedAtin UTC but only as a date, so a reader west of UTC saw a generation day their own calendar had not reached yet. OneformatUtcTimestamphelper now prints the date, the clock (the language's own 12/24-hour cycle) and an explicitUTCmarker, and the same helper formats every event timestamp in an expanded finding. The existingsecurityAgent.auditReport.generatedcopy keeps its{{generatedAt}}placeholder, so no catalog sentence changed.displayName("Kilo system"). System actors and masked actors now render catalog labels (actorSystem,actorMaskedUser,actorMaskedKiloAdmin), chosen from the actor discriminator instead of the English string. A real user's display name is still shown verbatim.For the masked case the report carries an additive optional
maskedKind('kilo_admin' | 'user'), so a localized client can tell the two masked identities apart without matching English copy. A response that predates the field falls back to the generic masked-user label, and the apps/web rendering is unchanged.Three English keys were added to
apps/mobile/src/i18n/locales/en.jsonand translated in all 86 other catalogs. German values:Kilo-System,Maskierter Benutzer,Kilo-Administrator.Event labels ("Imported", "Analysis completed") are localized by #8072, which is merged into this branch, so this change does not duplicate that work.
Verification
pnpm --filter kilo-app exec vitest run src/components/security-agent— 21 files, 301 tests pass on the merged head, including the newaudit-report-screen-timestamps.mounted.test.tsx(UTC marker and clock on the generated line; system, masked and named actor labels).NODE_ENV=test pnpm --filter web exec jest src/lib/security-agent/db/security-audit-report.test.ts— 27 tests pass with the newmaskedKind.pnpm --filter kilo-app check:i18n(87 catalogs matchen.json),check:plurals,typecheck,lint,check:unused;pnpm --filter web typecheck;pnpm format:changed.omp36), device localede-DE, device time zoneAmerica/Los_Angeles(local date 19.10.2026), local dev stack, owned fake account, audit rows seeded in the local database only. Header:Der Bericht wurde am 20.10.2026, 03:08 UTC erstellt.directly under23.7.2026 – 20.10.2026 · UTC. Expanded finding:30.9.2026, 02:54 UTC · Kilo-System2.10.2026, 02:54 UTC · Kilo-Administrator3.10.2026, 02:54 UTC · Maskierter Benutzer4.10.2026, 02:54 UTC · Drain Test UserProxy answers
The owner's proxy gave these answers in the owner's place.
Answer: In the formatted value, no catalog change
Confidence: 0.75 · Precedent: Speed and least work: "do the least amount of work possible, with no drop in quality" (an earlier session). This matches the brief's value-embedded example and the existing period-line pattern, and avoids platform-dependent
Intlzone-name output.Answer: Add time and UTC marker to event lines
Confidence: 0.60 · Precedent: Autonomy and decisions: fix the class, not the single symptom, on every affected surface (earlier sessions).
Answer: Localize masked labels as well
Confidence: 0.55 · Precedent: UX and design quality: the mobile app must always respect i18n, plus fix the class (earlier sessions). Key on the actor type or mask, and keep real user display names unchanged.