chore(client): checkpoint deployed features and unfinished server management

User requested a checkpoint and stopped all agents. Deployed artifacts remain the last verified releases; unfinished settings/categories/forums are preserved as WIP. See TODO/roadmap for verification and remaining release/updater work.
This commit is contained in:
Loki 2026-11-01 15:31:21 +01:00
parent 15f03bf8df
commit f04691c3cd
Signed by: boba
GPG key ID: 253067914055423B
90 changed files with 9599 additions and 371 deletions

View file

@ -16,8 +16,8 @@ pub struct AppearancePreferences {
impl Default for AppearancePreferences {
fn default() -> Self {
Self {
mode: "dark".into(),
custom_css: ThemeSpec::builtin("dark").to_css(),
mode: "black".into(),
custom_css: ThemeSpec::builtin("black").to_css(),
font_size: 16.0,
}
}
@ -48,7 +48,7 @@ impl AppearancePreferences {
}
pub fn resolve(&self) -> Result<ThemeSpec, String> {
if !["light", "dark", "black", "custom"].contains(&self.mode.as_str()) {
if self.mode != "custom" && !super::BUILTIN_THEME_IDS.contains(&self.mode.as_str()) {
return Err(crate::ui::i18n::text("Unknown theme."));
}
if !self.font_size.is_finite() || !(12.0..=22.0).contains(&self.font_size) {
@ -139,6 +139,26 @@ pub fn export_css(path: &Path, theme: &ThemeSpec) -> Result<(), String> {
mod tests {
use super::*;
#[test]
fn new_profiles_default_to_extra_dark_and_explicit_choices_survive() {
assert_eq!(AppearancePreferences::default().mode, "black");
assert_eq!(
serde_json::from_str::<AppearancePreferences>("{}")
.unwrap()
.mode,
"black"
);
for id in super::super::BUILTIN_THEME_IDS
.into_iter()
.chain(["custom"])
{
let json = serde_json::json!({"mode": id}).to_string();
let prefs: AppearancePreferences = serde_json::from_str(&json).unwrap();
assert_eq!(prefs.mode, id);
assert!(prefs.resolve().is_ok(), "{id}");
}
}
#[test]
fn saved_custom_palette_and_text_size_survive_reload() {
let directory = std::env::temp_dir().join(format!("vnox-theme-{}", uuid::Uuid::new_v4()));