From 72f2c829ca1a93016c22f2c443ce9e4649811bcb Mon Sep 17 00:00:00 2001 From: Chili Palmer Date: Sat, 30 May 2026 14:17:59 +0200 Subject: [PATCH] B1-3: distill Technology, MCP, and Data Maintenance settings sections into editor_settings spec --- SPECGAPS.md | 4 ++-- specs/editor_settings.allium | 43 +++++++++++++++++++++++++++--------- 2 files changed, 35 insertions(+), 12 deletions(-) diff --git a/SPECGAPS.md b/SPECGAPS.md index 6a12a7a..1b10758 100644 --- a/SPECGAPS.md +++ b/SPECGAPS.md @@ -62,7 +62,7 @@ Gap categories: **SC** = spec correct, fix code | **CS** = code correct, update |---|---|---|---| | ~~B1-1~~ | ~~Chat inline surfaces (9 types: card, chart, form, list, metric, mindmap, table, tabs, text/json)~~ | `tool_surfaces.ex` | **Resolved:** added InlineSurface value type with all 9 discriminators, supporting value types (SurfaceAction, ChartSeries, MindmapNode, FormField, FieldOption, TabPanel), inline_surfaces on ChatMessage, InlineSurfaceRendering guarantee, and surface_form_debounce_ms config to editor_chat.allium; updated StructuredRenderTools invariant in ai.allium to list all 9 types | | ~~B1-2~~ | ~~Auto-translation system (AutoTranslation.maybe_schedule, media cascade, batch fill)~~ | `lib/bds/posts/auto_translation.ex` | **Resolved:** distilled into translation.allium — added `AutoTranslationControlSurface` (PostSavedForAutoTranslation reactive + FillMissingTranslationsRequested batch triggers), three rules (`ScheduleAutoTranslation` draft-per-missing-language + media cascade, `AutoTranslatePost` upsert/auto-publish primitive, `AutoTranslateMediaCascade` linked-media per-language tasks, `FillMissingTranslations` published-only batch emitting `ProgressReported` + `FillMissingTranslationsCompleted`), three invariants (`AutoTranslationGatedByEndpoint`, `AutoTranslationSkipsDoNotTranslate`, `AutoTranslationOnlyMissingLanguages`), and `auto_translation_task_group_name` config; `allium check` passes | -| B1-3 | 3 extra settings sections (Technology, MCP, Data Maintenance) | `lib/bds/ui/settings_editor/` | Distill into spec | +| ~~B1-3~~ | ~~3 extra settings sections (Technology, MCP, Data Maintenance)~~ | `lib/bds/desktop/shell_live/settings_editor/` | **Resolved:** distilled into editor_settings.allium — added `SettingsTechnologySection` (semantic_similarity toggle + read-only scripting-runtime note, saved with project metadata), `SettingsDataSection` (rebuild_targets), and `technology_section`/`data_section` on `SettingsView`; reconciled `SettingsMCPSection`/`MCPAgentRow` to code (dropped non-existent status badge; added `is_supported`/`config_path`; only Claude Code + GitHub Copilot supported); updated TechnologySection/MCPSection/DataMaintenanceSection guarantees (7 rebuild buttons incl. Rebuild Embedding Index) and SettingsRebuild rule entity_type (+embedding); `allium check` passes | | B1-4 | Style/Theme as separate tab (`:style`), not settings section | `lib/bds/ui/style_editor.ex` | Distill into spec | | B1-5 | `published_*` snapshot fields on Post for diffing | `lib/bds/posts/post.ex:61-65` | Add to post.allium entity | | B1-6 | Full rendering subsystem (Liquex, Filters, Labels, LinksAndLanguages, PostRendering) | `lib/bds/rendering/` | Distill into spec | @@ -193,7 +193,7 @@ All reconciled to follow code. Specs must be self-consistent and match code. 1c. ~~**A1-17**~~ — blogmark deep-link handler resolved: `BDS.Desktop.DeepLink` receives OS `bds2://` URL events and `BDS.Blogmark` parses them, runs the transform pipeline, and creates+opens a draft post (macOS `Info.plist` scheme registration documented, pending an app-bundle pipeline) 2. **D1-1 through D1-18** — untested invariants/guarantees 3. **C-1 through C-3** — internal spec inconsistencies (reconcile to code) -4. **B1-1 through B1-6** — major code behaviors missing from spec (B1-1, B1-2 resolved) +4. **B1-1 through B1-6** — major code behaviors missing from spec (B1-1, B1-2, B1-3 resolved) 5. **A2-1 through A2-17** — spec drift (code is normative, update spec) 6. **D2-1 through D2-17** — untested rules 7. **D3-1 through D3-11** — partial test coverage diff --git a/specs/editor_settings.allium b/specs/editor_settings.allium index 13a0beb..c025ac9 100644 --- a/specs/editor_settings.allium +++ b/specs/editor_settings.allium @@ -16,8 +16,10 @@ value SettingsView { editor_section: SettingsEditorSection? categories: List ai_section: SettingsAISection? + technology_section: SettingsTechnologySection? publishing_section: SettingsPublishingSection? mcp_section: SettingsMCPSection? + data_section: SettingsDataSection? } value SettingsProjectSection { @@ -62,6 +64,12 @@ value SettingsAISection { system_prompt: String -- textarea (12 rows) + Save + Reset to Default } +value SettingsTechnologySection { + semantic_similarity_enabled: Boolean -- checkbox: enable duplicate search + related-post embeddings + -- Scripting runtime is fixed at the application layer; no runtime switch is exposed. + -- Saved together with project metadata (settings_project form). +} + value SettingsPublishingSection { ssh_mode: String -- select: scp | rsync ssh_host: String -- text input @@ -70,13 +78,19 @@ value SettingsPublishingSection { } value SettingsMCPSection { - status: String -- port number or "Not running" agents: List } value MCPAgentRow { agent_name: String -- Claude Code, Claude Desktop, GitHub Copilot, etc. - is_installed: Boolean -- Add/Remove toggle + is_supported: Boolean -- false agents show a disabled button + "not supported yet" note + is_installed: Boolean -- toggle label: Remove when installed, else Add + config_path: String? -- agent config file path (nil when unsupported) +} + +value SettingsDataSection { + -- Action-only section: rebuild buttons + Open Data Folder. No persisted fields. + rebuild_targets: List -- posts | media | scripts | templates | links | thumbnails | embedding } invariant SettingsProtectedCategories { @@ -88,6 +102,8 @@ invariant SettingsMCPAgents { -- MCP section has exactly 7 agent rows in this order: -- Claude Code, Claude Desktop, GitHub Copilot, Gemini CLI, -- OpenCode, Mistral Vibe, OpenAI Codex. + -- Only Claude Code and GitHub Copilot are supported; the rest render a + -- disabled toggle and a "not supported in the rewrite yet" note. } config { @@ -120,9 +136,11 @@ surface SettingsViewSurface { SettingsAISystemPromptReset() SettingsPublishingSaved(publishing_data) SettingsPublishingCleared() + SettingsTechnologySaved(technology_data) SettingsMCPAgentToggled(agent_name) SettingsRebuildRequested(entity_type) SettingsRegenerateThumbnailsRequested() + SettingsEmbeddingIndexRebuildRequested() SettingsOpenDataFolderRequested() StyleThemeSelected(theme_name) StyleApplyRequested(theme_name) @@ -174,22 +192,27 @@ surface SettingsViewSurface { -- Per-model info: max output tokens, context window (when available). @guarantee TechnologySection - -- Section 5: scripting capabilities are configured at the application level; - -- this section does not expose implementation-specific runtime choices. - -- Semantic Similarity toggle. + -- Section 5: Semantic Similarity toggle + -- ("Enable duplicate search and related-post embeddings"). + -- Scripting Runtime row is read-only descriptive text: scripting capabilities + -- are configured at the application layer and expose no runtime switch here. + -- Save button persists with project metadata (settings_project form). @guarantee PublishingSection -- Section 6: SSH Mode (scp/rsync), Host, Username, Remote Path. -- Save + Clear buttons. @guarantee MCPSection - -- Section 7: Status badge (port or "Not running"). - -- 7 agent rows with Add/Remove toggle each. + -- Section 7: 7 agent rows, each with the agent label, its config-file path + -- as a subtitle (or "not supported yet" note), and a toggle button. + -- Supported agents (Claude Code, GitHub Copilot) toggle Add/Remove, + -- writing/removing the bDS server entry in the agent config file. + -- Unsupported agents render a disabled button. @guarantee DataMaintenanceSection - -- Section 8: 6 rebuild buttons (Posts from Files, Media from Files, + -- Section 8: 7 rebuild buttons (Posts from Files, Media from Files, -- Scripts from Files, Templates from Files, Links, - -- Regenerate Missing Thumbnails). + -- Regenerate Missing Thumbnails, Rebuild Embedding Index). -- Open Data Folder button. -- Each rebuild executes immediately (no confirmation). -- Runs as background task with progress in Tasks panel. @@ -203,7 +226,7 @@ surface SettingsViewSurface { rule SettingsRebuild { when: SettingsRebuildRequested(entity_type) - -- entity_type: posts | media | scripts | templates | links | thumbnails + -- entity_type: posts | media | scripts | templates | links | thumbnails | embedding -- Executes immediately (no confirmation dialog) -- Runs as background task with progress visible in Tasks panel -- On completion: wholesale replaces store data for that entity type