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
+3 -2
View File
@@ -8,7 +8,7 @@ use crate::error::{Error, Result};
use crate::plugins::{legacy_packages, LegacyPackage};
/// The packages that native features replace. A request for another ID fails.
pub const LEGACY_PACKAGES: [&str; 4] = ["runestone.git", "runestone.bg-slideshow", "runestone.terminal", "runestone.pdf-viewer"];
pub const LEGACY_PACKAGES: [&str; 5] = ["runestone.git", "runestone.bg-slideshow", "runestone.terminal", "runestone.pdf-viewer", "runestone.pm"];
fn check(ids: &[String]) -> Result<()> {
if ids.len() > LEGACY_PACKAGES.len() {
@@ -36,12 +36,13 @@ mod tests {
assert!(check(&["runestone.git".into(), "runestone.bg-slideshow".into()]).is_ok());
assert!(check(&["runestone.terminal".into()]).is_ok());
assert!(check(&["runestone.pdf-viewer".into()]).is_ok());
assert!(check(&["runestone.pm".into()]).is_ok());
assert!(check(&LEGACY_PACKAGES.map(String::from)).is_ok());
assert!(check(&[]).is_ok());
for id in ["runestone.csv-viewer", "../plugin-state", "runestone.git/..", ""] {
assert!(check(&[id.into()]).is_err(), "{id}");
}
let too_many = ["runestone.git", "runestone.bg-slideshow", "runestone.terminal", "runestone.pdf-viewer", "runestone.git"].map(String::from);
let too_many = ["runestone.git", "runestone.bg-slideshow", "runestone.terminal", "runestone.pdf-viewer", "runestone.pm", "runestone.git"].map(String::from);
assert!(too_many.len() > LEGACY_PACKAGES.len());
assert!(check(&too_many).is_err());
}
+1 -1
View File
@@ -21,7 +21,7 @@ pub const FILE_NAME: &str = "settings.json";
pub const SCHEMA: u64 = 1;
/// The known sections. `customThemesLegacy` keeps the original version 1 themes from before their conversion.
/// `features` holds the switches of the native features. `background` and `terminal` hold the settings of the Background and Terminal features.
pub const SECTIONS: [&str; 8] = ["general", "appearance", "customThemes", "customThemesLegacy", "language", "features", "background", "terminal"];
pub const SECTIONS: [&str; 9] = ["general", "appearance", "customThemes", "customThemesLegacy", "language", "features", "background", "terminal", "projectManagement"];
/// The appearance section can hold an image data URL of up to 3,000,000 characters.
pub const MAX_FILE_BYTES: usize = 8 * 1024 * 1024;
pub const CHANGED_EVENT: &str = "settings-changed";