From 522a4a3ce1163f227a6d330766f2f9254d34399e Mon Sep 17 00:00:00 2001 From: Sergio Arroutbi Date: Fri, 17 Apr 2026 15:47:49 +0200 Subject: [PATCH] Add FR-080: time format selection (12h/24h) Co-Authored-By: Claude Opus 4.6 Signed-off-by: Sergio Arroutbi --- spec/SDD-Keylime-Monitoring-Tool.md | 2 ++ spec/SRS-Keylime-Monitoring-Tool.md | 41 +++++++++++++++++++++++++++++ 2 files changed, 43 insertions(+) diff --git a/spec/SDD-Keylime-Monitoring-Tool.md b/spec/SDD-Keylime-Monitoring-Tool.md index d73ffed..2b436a8 100644 --- a/spec/SDD-Keylime-Monitoring-Tool.md +++ b/spec/SDD-Keylime-Monitoring-Tool.md @@ -1038,6 +1038,7 @@ Maximum 5 parallel concurrent log fetches to the Verifier API, enforced via Toki | `#[serde(default)]` on Keylime models | Tolerates missing/renamed fields across Keylime API versions without breaking deserialization | NFR-002 | | Timezone auto-detect with manual override | Default to browser timezone for zero-config; IANA dropdown for operators in different timezones than their fleet | FR-078 | | Explicit date format selection | Eliminates locale-dependent ambiguity (e.g., 04/05 = April 5 vs May 4); ISO 8601 default for cross-region consistency | FR-079 | +| Explicit time format selection (12h/24h) | Accommodates regional conventions (e.g., US 12-hour vs European 24-hour); 24h default avoids AM/PM ambiguity in operational contexts | FR-080 | --- @@ -1135,6 +1136,7 @@ Maximum 5 parallel concurrent log fetches to the Verifier API, enforced via Toki | FR-077 | 3.2.2, 3.7.3 | 1s polling via `refetchInterval`, `probe_verifier()`/`probe_registrar()` | | FR-078 | 3.8.2 | `visualizationStore`: timezone with auto-detect, IANA timezone dropdown in Settings | | FR-079 | 3.8.2 | `visualizationStore`: date format selection (6 formats), ISO 8601 default, applied to all timestamp rendering | +| FR-080 | 3.8.2 | `visualizationStore`: time format selection (12h/24h), 24h default, applied to all time-of-day rendering | ### 6.2 Non-Functional Requirements diff --git a/spec/SRS-Keylime-Monitoring-Tool.md b/spec/SRS-Keylime-Monitoring-Tool.md index be945d2..cedb218 100644 --- a/spec/SRS-Keylime-Monitoring-Tool.md +++ b/spec/SRS-Keylime-Monitoring-Tool.md @@ -113,6 +113,7 @@ The System transforms Keylime from a CLI-driven security tool into a visual oper | FR-077 | Webtool backend health check with polling | MUST | Integration Status - Backend Connectivity | | FR-078 | Timezone selection with auto-detect | SHOULD | Settings - Visualization | | FR-079 | Date format selection for timestamp rendering | MUST | Settings - Visualization | +| FR-080 | Time format selection (12h/24h) for timestamp rendering | MUST | Settings - Visualization | ### 2.2 Non-Functional Requirements @@ -2471,6 +2472,46 @@ Feature: Date Format Selection And the Settings > Visualization date format dropdown SHOULD show "YYYY-MM-DD" as the default ``` +### FR-080: Time Format Selection for Timestamp Rendering + +**Description:** The System MUST provide a time format setting in the Visualization Settings section, alongside the timezone (FR-078) and date format (FR-079) settings. The user MUST be able to select between a 24-hour format (`HH:mm:ss`, e.g., `14:30:00`) and a 12-hour format (`hh:mm:ss A`, e.g., `02:30:00 PM`). The default MUST be `24h`. The selected format MUST be persisted in localStorage via the visualization store. The selected format MUST be applied consistently to all time-of-day rendering across the dashboard, including the agent list, agent detail timeline, audit log, alerts, attestation timestamps, and dashboard charts. + +**Trace:** Settings - Visualization + +```gherkin +Feature: Time Format Selection + + Scenario: Select 12-hour time format + Given the user navigates to Settings > Visualization + When the user selects "12h" from the time format selector + Then all timestamps across the dashboard MUST render times in 12-hour format with AM/PM suffix + And the time format selector MUST show "12h" as the active selection + + Scenario: Select 24-hour time format + Given the user navigates to Settings > Visualization + When the user selects "24h" from the time format selector + Then all timestamps across the dashboard MUST render times in 24-hour format without AM/PM suffix + And the time format selector MUST show "24h" as the active selection + + Scenario: Time format persists across sessions + Given the user has selected "12h" as the time format + When the user closes and reopens the browser + Then the time format MUST remain "12h" + And all timestamps MUST render in 12-hour format without requiring reconfiguration + + Scenario: Time format applied to agent list timestamps + Given the user has selected "12h" as the time format + When the user navigates to the Agent Fleet list view + Then the "Last Attestation" column timestamps MUST render times in 12-hour format + And the "Registration Date" column timestamps MUST render times in 12-hour format + + Scenario: Default time format on first visit + Given the user has never configured a time format preference + When the user navigates to any page displaying timestamps + Then timestamps MUST render times in 24-hour format + And the Settings > Visualization time format selector MUST show "24h" as the default +``` + --- ## 4. Non-Functional Requirements Detail