Make Project Management a native feature

- Move the storage and model of the plugin into src/lib/features/pm/ as pure TypeScript, so the skill can still bundle them.
- Move the DOM interface onto the host menus, the shared tooltip, and the host icons.
- A ribbon button opens Project Management. Board tabs keep the owner runestone.pm and the board-<hex> view IDs through view patterns.
- Read only .runestone/pm/. Offer the plugin migration, with backups, for legacy notes.
- A save, move, or delete reads only that card again. Watcher paths reach the feature.
- Add Settings → Project Management and the projectManagement section. View states move to localStorage.
- Background reads the boards from workspace.json. Remove api.backgrounds and the boards service.
- Add yaml 2.9.1. Use the host markdown-it.
- Move 18 plugin test files to tests/unit/features/pm/ and add native tests.
This commit is contained in:
Knotty Wyvern
2026-10-29 20:54:29 -07:00
parent e6deecc092
commit e66f089176
100 changed files with 14412 additions and 290 deletions
+8 -1
View File
@@ -1,11 +1,17 @@
<script lang="ts">
// The left ribbon: the app tools (new browser tab, terminal, plug-in views, commands), then the plugin view shortcuts.
// The left ribbon: the app tools (new browser tab, terminal, Project Management, plug-in views, commands), then the
// plugin view shortcuts.
// While the side pane is closed, the workspace switcher, Help, and Settings
// move from the bar at the bottom of the pane (LeftPane.svelte) to the bottom of the ribbon, so they stay reachable.
import { t } from "$lib/i18n";
import IconButton from "$lib/ui/IconButton.svelte";
import PluginAccessMenu from "$lib/plugins/PluginAccessMenu.svelte";
import { openPluginView, pluginEditorActive, pluginSidebar, pluginView } from "$lib/plugins/external";
import { featureEntry } from "$lib/features/catalog";
import { featureSwitches } from "$lib/features/state";
/** Project Management is a native feature. Its button opens the default board of the workspace, or All tasks. */
const pm = featureEntry("pm").owner;
import { commandShortcut } from "./workbenchKeys";
let { items, actions, workspaceAnchor = $bindable(), onChooseWorkspace, onHelp, onSettings,
@@ -30,6 +36,7 @@
<div class="ribbon-tools">
{#if canOpenBrowser}<IconButton icon="globe" label={$t("New browser tab")} side="right" disabled={browserOpening} onclick={onOpenBrowser} />{/if}
{#if terminalEnabled}<IconButton icon="terminal" label={$t("Terminal")} side="right" active={terminalOpen} onclick={onToggleTerminal} />{/if}
{#if $featureSwitches.pm}<IconButton icon="kanban" label={$t("Project Management")} side="right" active={$pluginEditorActive && $pluginView?.owner === pm && !$pluginView?.document} onclick={() => openPluginView(pm, "planning")} />{/if}
<PluginAccessMenu surface="open" compact side="right" />
<PluginAccessMenu surface="commands" compact side="right" />
</div>
+5 -1
View File
@@ -13,6 +13,7 @@
import { featureErrors } from "$lib/features/loader";
import { TERMINAL_SHORTCUTS } from "$lib/features/terminalKeys";
import TerminalSettings from "$lib/features/TerminalSettings.svelte";
import ProjectManagementSettings from "$lib/features/ProjectManagementSettings.svelte";
import { invoke, isTauri } from "@tauri-apps/api/core";
import { confirm } from "@tauri-apps/plugin-dialog";
import { onMount, untrack, type Snippet } from "svelte";
@@ -77,7 +78,8 @@
keywords: `${$installedPlugins.plugins.find(row => row.manifest.id === tool.owner)?.manifest.name ?? tool.owner} settings configuration`,
})));
const terminalSection = $derived($featureSwitches.terminal ? [{ id: "terminal" as const, label: $t("Terminal"), icon: "terminal" as const, keywords: "terminal shell profile default font size scrollback lines cursor blink powershell bash cmd" }] : []);
const matches = $derived([...sections, ...(browserEnabled ? [{ id: "browser" as const, label: $t("Browser"), icon: "globe" as const, keywords: "browser profiles search cookies cache web privacy" }] : []), ...terminalSection, ...pluginSections].filter(item => `${item.label} ${item.keywords}`.toLowerCase().includes(query.trim().toLowerCase())));
const pmSection = $derived($featureSwitches.pm ? [{ id: "project-management" as const, label: $t("Project Management"), icon: "kanban" as const, keywords: "project management kanban board priority levels default board" }] : []);
const matches = $derived([...sections, ...(browserEnabled ? [{ id: "browser" as const, label: $t("Browser"), icon: "globe" as const, keywords: "browser profiles search cookies cache web privacy" }] : []), ...terminalSection, ...pmSection, ...pluginSections].filter(item => `${item.label} ${item.keywords}`.toLowerCase().includes(query.trim().toLowerCase())));
const selected = $derived(matches.find(item => item.id === section) ?? matches[0]);
const selectedPlugin = $derived(pluginSections.find(item => item.id === selected?.id));
@@ -235,6 +237,8 @@
<BrowserSlot kind="settings" />
{:else if selected.id === "terminal"}
<TerminalSettings />
{:else if selected.id === "project-management"}
<ProjectManagementSettings />
{:else if selectedPlugin}
{#key selectedPlugin.id}<PluginSettings owner={selectedPlugin.owner} id={selectedPlugin.view} />{/key}
{:else}
+3 -3
View File
@@ -128,11 +128,11 @@
} else if (change.type === "deleted") {
removePluginDocuments(change.path);
void documents?.refresh();
notifyPluginWorkspace();
notifyPluginWorkspace([change.path]);
} else if (change.type === "changed") {
void documents?.refresh();
notifyPluginWorkspace();
} else if (change.type === "internal") notifyPluginWorkspace();
notifyPluginWorkspace(change.paths);
} else if (change.type === "internal") notifyPluginWorkspace(change.paths);
}));
async function openBacklink(entry: Backlink) {