Skip to content

Add ISO yyyy-mm-dd date format option - #6

Open
adeldegan-cli wants to merge 3 commits into
LextZip:mainfrom
adeldegan-cli:main
Open

Add ISO yyyy-mm-dd date format option#6
adeldegan-cli wants to merge 3 commits into
LextZip:mainfrom
adeldegan-cli:main

Conversation

@adeldegan-cli

Copy link
Copy Markdown

Adds a third choice to the Date format dropdown in the web interface: ISO 8601 (yyyy-mm-dd) with a 24-hour clock, alongside the existing European and US formats.

Changes:

  • New iso value for regionFormatKey, rendered as %a %Y-%m-%d (e.g. Sun 2026-08-17)
  • Option added to the settings page dropdown
  • Validation updated in loadStoredSettings() and handleSave() so the new key round-trips through Preferences
  • Existing europe/us behavior unchanged; unknown values still fall back to europe

Tested on an ESP32-2432S028R (CYD, ST7789 variant): builds clean, format selectable and persists across reboots, date renders correctly on the display.

🤖 Generated with Claude Code

Adds a third date format choice (ISO 8601: yyyy-mm-dd with 24h clock)
alongside the existing European and US formats, selectable from the
web interface.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Copilot AI lite review requested due to automatic review settings August 17, 2026 17:15

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds an ISO-style date format option to Deskbuddy’s web settings and ensures the preference is persisted/validated, enabling users to choose yyyy-mm-dd formatting (with the existing weekday prefix) alongside the existing EU/US options.

Changes:

  • Added iso as a valid regionFormatKey value and included it in settings validation/fallback logic.
  • Updated date rendering to select among EU/US/ISO strftime patterns.
  • Added an ISO option to the web UI “Date format” dropdown.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread desk_buddy_github.cpp
String textColorKey = "standard";
String unitKey = "metric"; // metric = C/mm, imperial = F/in
String regionFormatKey = "europe"; // europe = 24h + dd.mm.yyyy, us = 12h + mm/dd/yyyy
String regionFormatKey = "europe"; // europe = 24h + dd.mm.yyyy, us = 12h + mm/dd/yyyy, iso = 24h + yyyy-mm-dd
adeldegan-cli and others added 2 commits August 19, 2026 13:02
- New 5th nav page 'Ctrl' with two integrations, each hidden unless its
  token is set in secrets.h:
  - NIM Hub: shows the running timer (elapsed, description, paused state,
    polled every 10s while the page is visible), with Pause/Resume and
    Stop & Save buttons. Stop & Save posts the time entry first and only
    then deletes the timer, and never retries the save, so a failed second
    step can't double-log hours.
  - Hermes Ear: shows listening state (polled every 5s) with a single
    Start/Stop toggle against the Jetson's LAN control API.
- WiFi + API credentials move to a gitignored secrets.h
  (secrets.h.example documents the format); the sketch falls back to
  placeholder defines so the public repo still compiles.
- SETUP_GUIDE: secrets.h instructions + Huge APP partition note (the
  sketch passed 94% of the default partition).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Lag fix — button presses froze the UI for 2-6s because every action ran
2-3 sequential HTTPS calls (each a fresh TLS handshake) on the UI thread,
and the 10s background poll blocked touch handling too:
- All controls HTTP now runs on a FreeRTOS worker task pinned to core 0;
  the UI enqueues a command and keeps drawing ('Working...' feedback is
  immediate, results repaint when the worker finishes)
- Persistent WiFiClientSecure with setReuse keeps the TLS session alive
  between calls, cutting each request to a single round trip
- Pause/resume now apply the timer from the action response instead of
  re-polling; stop&save skips the re-poll on success
- Shared Strings guarded by a mutex; primitives are atomic on Xtensa

Weather and Notes pages parked per request — nav is now Home/Status/Ctrl
via a NAV_PAGES mapping table; the page code stays compiled and both
pages restore by uncommenting their NAV_PAGES/NAV_NAMES entries and
dispatch cases. Weather data still refreshes for the Home widgets.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants