From 812de13f6207fdcf504bcdb0d27a80059e6affaa Mon Sep 17 00:00:00 2001 From: Chili Palmer Date: Tue, 21 Jul 2026 19:46:57 +0200 Subject: [PATCH] fix: clean up some problems from the implementations --- README.md | 2 +- crates/bds-core/src/engine/git.rs | 4 +++- crates/bds-core/src/render/site.rs | 8 +++++++- crates/bds-core/tests/m4_generation_engine.rs | 6 +++--- crates/bds-ui/src/platform/script_host.rs | 2 +- specs/metadata.allium | 1 + 6 files changed, 16 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index fae5816..71a174b 100644 --- a/README.md +++ b/README.md @@ -20,7 +20,7 @@ The project is under active development. Core blogging workflows are broadly ava - Local MCP automation over stdio or a localhost-only stateless HTTP endpoint, with project resources, read/search/count tools, inert write proposals, explicit desktop approval, and opt-in Claude Code/Copilot configuration. - A fully localized Ratatui terminal workspace, available locally through `bds-cli tui`/`BDS_MODE=tui` and remotely through authenticated SSH shell sessions, with shared post/template/script editing and publishing, project/search/command overlays, settings, tags, Git, reports, task progress, live multi-client locale updates, and airplane-mode AI gating. - `bds-cli server` hosting the shared application engines over a loopback-by-default, public-key-only SSH service, with restrictive private key material, live authorization updates, terminal-session transport, CLI-change synchronization, ordered domain/task events, and native desktop remote-project selection. -- bDS2-compatible Markdown/Liquid rendering with native macros, canonical multilingual and flat page routes, recursive menus, calendar archives, feeds, a root hreflang sitemap, Pagefind, and incremental site generation through cancellable section task groups. +- bDS2-compatible Markdown/Liquid rendering with native macros, descriptive category archive titles, canonical multilingual and flat page routes, recursive menus, calendar archives, feeds, a root hreflang sitemap, Pagefind, and incremental site generation through cancellable section task groups. - Navigable generated-route preview in the app or system browser, with draft database overlays and published filesystem content. - Optional one-shot AI translation, description, analysis, taxonomy, and language-detection operations run in background tasks with editor-level waiting indicators, using independent online and local OpenAI-compatible profiles. Each profile has secure credentials, persistently discovered chat/title/image model selections, explicit tool/vision overrides, chat testing, and status-bar airplane-mode routing. - Persistent conversational AI with safe Markdown, streamed and cancellable responses, model/session/token tracking, bounded project-aware blog tools, and localized conversation management in the Chat workspace. Allowlisted render tools add persistent native cards, charts, forms, lists, metrics, mind maps, tables, and tabs without executing assistant-provided HTML or JavaScript. diff --git a/crates/bds-core/src/engine/git.rs b/crates/bds-core/src/engine/git.rs index 8dbe05e..862145f 100644 --- a/crates/bds-core/src/engine/git.rs +++ b/crates/bds-core/src/engine/git.rs @@ -915,7 +915,9 @@ fn terminate_child(child: &mut std::process::Child) { let _ = child.kill(); } -fn prepend_tool_paths(_command: &mut Command) { +fn prepend_tool_paths(command: &mut Command) { + #[cfg(not(target_os = "macos"))] + let _ = command; #[cfg(target_os = "macos")] { let mut paths = vec![ diff --git a/crates/bds-core/src/render/site.rs b/crates/bds-core/src/render/site.rs index 92b5808..119aedf 100644 --- a/crates/bds-core/src/render/site.rs +++ b/crates/bds-core/src/render/site.rs @@ -674,6 +674,12 @@ fn build_language_routes( for (category, records) in category_posts { let slug = slugify(&category); + let display_name = category_settings + .get(&category) + .and_then(|settings| settings.title.as_deref()) + .map(str::trim) + .filter(|title| !title.is_empty()) + .unwrap_or(&category); routes.extend(paginated_route_specs( &records, per_page, @@ -682,7 +688,7 @@ fn build_language_routes( language_root_prefix(language, metadata) ), page_title.clone(), - Some(json!({"kind": "category", "name": category})), + Some(json!({"kind": "category", "name": display_name})), category_settings .get(&category) .and_then(|settings| settings.list_template_slug.clone()), diff --git a/crates/bds-core/tests/m4_generation_engine.rs b/crates/bds-core/tests/m4_generation_engine.rs index 5aaf011..f96f206 100644 --- a/crates/bds-core/tests/m4_generation_engine.rs +++ b/crates/bds-core/tests/m4_generation_engine.rs @@ -609,7 +609,7 @@ fn generation_respects_category_list_settings_and_writes_bundled_images() { db.conn(), &make_list_template( "featured-list", - "FEATURED:{% for day_block in day_blocks %}{% for post in day_block.posts %}[{{ post.title }}|{{ post.show_title }}]{% endfor %}{% endfor %}", + "FEATURED:{% if archive_context %}{% if archive_context.kind == 'category' %}{{ archive_context.name }}{% endif %}{% endif %}:{% for day_block in day_blocks %}{% for post in day_block.posts %}[{{ post.title }}|{{ post.show_title }}]{% endfor %}{% endfor %}", ), ) .unwrap(); @@ -629,7 +629,7 @@ fn generation_respects_category_list_settings_and_writes_bundled_images() { ( "featured".to_string(), CategorySettings { - title: None, + title: Some("Featured Archive".to_string()), render_in_lists: true, show_title: false, post_template_slug: None, @@ -692,7 +692,7 @@ fn generation_respects_category_list_settings_and_writes_bundled_images() { let featured_html = std::fs::read_to_string(dir.path().join("category/featured/index.html")).unwrap(); - assert!(featured_html.contains("FEATURED:[Featured Post|false]")); + assert!(featured_html.contains("FEATURED:Featured Archive:[Featured Post|false]")); let rss = std::fs::read_to_string(dir.path().join("rss.xml")).unwrap(); assert!(rss.contains("hidden-post")); diff --git a/crates/bds-ui/src/platform/script_host.rs b/crates/bds-ui/src/platform/script_host.rs index 98e9588..71c7937 100644 --- a/crates/bds-ui/src/platform/script_host.rs +++ b/crates/bds-ui/src/platform/script_host.rs @@ -60,7 +60,7 @@ fn preview_post_target() -> &'static Mutex> { #[cfg(target_os = "macos")] fn title_bar_metrics() -> Value { - json!({"macos_left_inset": 72}) + serde_json::json!({"macos_left_inset": 72}) } #[cfg(not(target_os = "macos"))] diff --git a/specs/metadata.allium b/specs/metadata.allium index 5d6d2ec..3585598 100644 --- a/specs/metadata.allium +++ b/specs/metadata.allium @@ -28,6 +28,7 @@ surface PublishingPreferencesSurface { } value CategoryRenderSettings { + title: String? render_in_lists: Boolean show_title: Boolean post_template_slug: String?