Excise the Changelog feature
Kigi never publishes CDN changelogs, so the entire inherited feature
was dead weight: the welcome-menu Changelog row, the hero-box info
slot (bullets + clickable CTA), /release-notes with its /changelog
alias, and the ChangelogManager CDN-fetch/disk-cache pipeline
(Effect::FetchChangelog, TaskResult::ChangelogFetched, startup and
post-login fetch kickoffs, AppView cache fields, mouse hover/click
handling). Welcome menu is now [Import] / New worktree / Resume
session / Quit; the hero box keeps title + version + subtitle and its
layout math simplifies to 3 + menu rows (verified equivalent by the
surviving boundary tests). Action::ShowReleaseNotes and the DocViewer
modal stay — /docs uses them. builtin.rs keeps deleting stale
CHANGELOG.{json,md} caches written by kigi ≤ 0.1.0.
kigi-shell-base drops its reqwest 'blocking' feature (only the deleted
module used it). -1206 lines net.
Gates: fmt clean, workspace check/clippy --all-targets 0/0, kigi-tui
lib 6609 / shell-base 56 / shell util:: 258 all passing, welcome pty
e2e (3 tests incl. braille logo) passing.
This commit is contained in:
1 parent
6e26d15428
commit
10d0c0816f
19 files changed
+66
-1206
No files matched your search
@@ -41,7 +41,6 @@ pub mod plan;
|
||||
pub mod plugin;
|
||||
pub mod queue;
|
||||
pub mod recap;
|
||||
pub mod release_notes;
|
||||
pub mod remember;
|
||||
pub mod rename;
|
||||
pub mod resume;
|
||||
@@ -121,7 +120,6 @@ pub fn builtin_commands() -> Vec<Arc<dyn SlashCommand>> {
|
||||
Arc::new(usage::UsageCommand),
|
||||
Arc::new(queue::QueueCommand),
|
||||
Arc::new(tasks::TasksCommand),
|
||||
Arc::new(release_notes::ReleaseNotesCommand),
|
||||
Arc::new(config_agents::ConfigAgentsCommand),
|
||||
Arc::new(personas::PersonasCommand),
|
||||
Arc::new(gboom::GboomCommand),
|
||||
|
||||
@@ -1,60 +0,0 @@
|
||||
//! `/release-notes` -- view release notes for the current version.
|
||||
|
||||
use crate::app::actions::Action;
|
||||
use crate::slash::command::{CommandExecCtx, CommandResult, SlashCommand};
|
||||
|
||||
/// Show release notes for the current pager version.
|
||||
pub struct ReleaseNotesCommand;
|
||||
|
||||
impl SlashCommand for ReleaseNotesCommand {
|
||||
fn name(&self) -> &str {
|
||||
"release-notes"
|
||||
}
|
||||
|
||||
fn aliases(&self) -> &[&str] {
|
||||
&["changelog"]
|
||||
}
|
||||
|
||||
fn description(&self) -> &str {
|
||||
"View release notes for the current version"
|
||||
}
|
||||
|
||||
fn usage(&self) -> &str {
|
||||
"/release-notes"
|
||||
}
|
||||
|
||||
fn run(&self, _ctx: &mut CommandExecCtx, _args: &str) -> CommandResult {
|
||||
let changelog = kigi_shell::util::changelog::ChangelogManager::new().fetch();
|
||||
match changelog.markdown {
|
||||
Some(content) => CommandResult::Action(Action::ShowReleaseNotes {
|
||||
title: "Release Notes".to_string(),
|
||||
content: content.trim().to_string(),
|
||||
}),
|
||||
None => CommandResult::Error("No release notes available (offline).".to_string()),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(test)]
|
||||
mod tests {
|
||||
use super::*;
|
||||
|
||||
#[test]
|
||||
fn release_notes_metadata() {
|
||||
let cmd = ReleaseNotesCommand;
|
||||
assert_eq!(cmd.name(), "release-notes");
|
||||
assert_eq!(cmd.aliases(), &["changelog"]);
|
||||
assert!(!cmd.takes_args());
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn release_notes_returns_action_or_error() {
|
||||
let models = crate::acp::model_state::ModelState::default();
|
||||
let mut ctx = super::super::tests::make_ctx(&models);
|
||||
let result = ReleaseNotesCommand.run(&mut ctx, "");
|
||||
assert!(
|
||||
matches!(result, CommandResult::Action(_) | CommandResult::Error(_)),
|
||||
"expected Action or Error, got {result:?}"
|
||||
);
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user