Add inline doc comments and cargo doc to CI

This commit is contained in:
2026-06-01 14:13:35 +02:00
parent 51d3d714ba
commit 593ea7b51f
4 changed files with 20 additions and 2 deletions
+5
View File
@@ -33,6 +33,11 @@ const KNOWN_PATTERNS: &[(&str, &str)] = &[
///
/// Returns a deduplicated, ranked list. The first result is cached as
/// `save_path` in config.ini so subsequent launches skip the scan.
/// Auto-discover Subnautica 2 save folders across Steam, Xbox, Epic, and
/// custom installs. Checks both modern and legacy Steam paths.
///
/// Returns a deduplicated, ranked list. The first result is cached as
/// `save_path` in config.ini so subsequent launches skip the scan.
pub fn discover_save_folders() -> Vec<DiscoveredFolder> {
let mut found: Vec<DiscoveredFolder> = Vec::new();
let mut seen: std::collections::HashSet<PathBuf> = std::collections::HashSet::new();
+5
View File
@@ -293,6 +293,11 @@ pub fn extract_full_metadata(path: &Path) -> Result<FullMetadata> {
/// Extracted metadata from a GVAS save file.
#[derive(Debug, Clone, Default)]
/// Extracted metadata from a Subnautica 2 GVAS save file.
///
/// Each field corresponds to a named UE5 property inside the save binary.
/// Playtime is derived from the `PlaytimeData` structure when available,
/// falling back to a byte-scan heuristic.
pub struct SaveMetadata {
/// Internal slot name, e.g. "savegame_0"
pub slot_name: Option<String>,
+5
View File
@@ -92,6 +92,11 @@ pub fn recover_bak_to_sav(
// ── full backup ────────────────────────────────────────────────────────────
/// Create a full backup of the save folder to `NotAlterra_Backups/notalterra_copy_<timestamp>`.
/// Create a full backup of all `savegame_*` files.
///
/// Copies every `.sav` and `.bak` file from the save folder into a
/// timestamped subdirectory under `backup_root/NotAlterra_Backups/`.
/// Returns the number of files copied and the backup path.
pub fn create_full_backup(
save_folder: &Path,
backup_root: &Path,
+5 -2
View File
@@ -3,8 +3,11 @@
//! Design principles:
//! - Dashboard layout: header bar, main panel, status line
//! - Keyboard-first: arrow keys + Enter/Esc, no mouse dependency
//! - Semantic color: cyan=info, green=success, yellow=warning, red=error
//! - Adapts to terminal size; minimum 60×15
//! Terminal UI rendering for NotAlterra.
//!
//! Uses ratatui + crossterm to draw menu screens, picker lists, dialogs,
//! metadata inspectors, and the animated whale separator. All rendering
//! is stateless — callers pass in an [`AppState`] snapshot.
use ratatui::{
layout::{Alignment, Constraint, Direction, Layout, Rect},