Skip to content

vt_data auto-update, persist setting, add stdlib/fmt fallbacks & CI fixes (7 commits)#364

Merged
No0ne558 merged 7 commits intoViewTouch:masterfrom
No0ne558:master
Apr 9, 2026
Merged

vt_data auto-update, persist setting, add stdlib/fmt fallbacks & CI fixes (7 commits)#364
No0ne558 merged 7 commits intoViewTouch:masterfrom
No0ne558:master

Conversation

@No0ne558
Copy link
Copy Markdown
Contributor

@No0ne558 No0ne558 commented Apr 9, 2026

Short summary

  • This PR bundles the last 7 commits which together:
    • Ensure vt_data auto-update respects the authoritative fixed settings and UI toggle (including when restarting from non-server displays).
    • Persist the UI toggle immediately so restarts honor the user preference.
    • Prevent creation of preset/default employees when employee.dat already exists.
    • Add robust fallbacks for std::to_underlying and formatting APIs so the project builds across multiple stdlib/toolchain combinations.
    • Misc CI/build fixes (includes <algorithm> for std::clamp, guard macros, and {fmt}/snprintf fallback).

Commits included

  • 4147b5a ci: fallback to {fmt} or snprintf when std::format unavailable (2026-04-09)
    • Files: cpp23_utils.hh
  • 0970e08 ci: include so std::clamp is available (2026-04-09)
    • Files: cpp23_utils.hh
  • bec572e ci: guard std::to_underlying with feature-test macro (2026-04-09)
    • Files: vt_enum_utils.hh
  • 6e76d97 fix(enum): fallback for std::to_underlying on older stdlibs (2026-04-09)
    • Files: vt_enum_utils.hh
  • 52526cc chore: commit remaining changes (2026-04-09)
    • Files: manager.cc
  • 474afbf docs(changelog): add default-employee creation note (2026-04-09)
    • Files: changelog.md
  • 2096430 chore(changelog): document vt_data auto-update fixes; respect fixed settings and non-server restarts (2026-04-09)
    • Files: changelog.md, manager.cc, settings_zone.cc

What changed (high-level)

  • Startup/update flow:
    • Startup autoupdate now requires both the early .viewtouch_config.autoupdate flag and the authoritative fixed settings auto_update_vt_data to run.
    • FindVTData() now respects auto_update_vt_data and will skip downloads when disabled.
    • Added logging for autoupdate suppression and restart origin for auditing.
  • Settings/UI:
    • The auto-update UI switch now calls settings->Save() immediately so restarts see the updated preference.
  • Default users:
    • Preset/default employees are created only when employee.dat is missing.
  • Build/compatibility:
    • Added a portable fallback for converting enums to underlying values when std::to_underlying isn't available.
    • Guarded uses of std::to_underlying with the feature-test macro.
    • Added formatting utility fallbacks: use std::format when available, fallback to {fmt} if present, else degrade to an snprintf-based fallback so older toolchains can compile.
    • Included <algorithm> to ensure std::clamp is available on older toolchains.

Files touched (aggregate)

  • manager.cc
  • settings_zone.cc
  • vt_enum_utils.hh
  • cpp23_utils.hh
  • changelog.md

@No0ne558 No0ne558 merged commit a5cdf94 into ViewTouch:master Apr 9, 2026
6 checks passed
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.

1 participant