feat: add compact mode for minimal widget interface (#36)
Security Scan and Upload / Security & DefectDojo Upload (pull_request) Successful in 54s
CI / Lint & Test (pull_request) Failing after 5m38s
CI / Build Linux (pull_request) Has been skipped
CI / Build Windows (cross-compile) (pull_request) Has been skipped

Add a compact mode that shrinks the window to a small widget showing
just the character sprite, recent messages, and a quick input box.
Perfect for quick questions while working without the full UI.

- Add CompactMode.svelte component with minimal widget interface
- Add compact mode toggle in StatusBar (Ctrl+Shift+M shortcut)
- Save/restore window size when toggling compact mode
- Handle display scaling by converting physical to logical pixels
- Add compact_mode to config (Rust + TypeScript)
- Add required Tauri window permissions for resize operations
This commit is contained in:
2026-01-25 18:51:39 -08:00
committed by Naomi Carrigan
parent ff50b28641
commit c5e0d5302c
8 changed files with 730 additions and 37 deletions
+4 -1
View File
@@ -19,6 +19,9 @@
"core:tray:default",
"fs:default",
"fs:allow-read-text-file",
"fs:allow-write-text-file"
"fs:allow-write-text-file",
"core:window:allow-set-size",
"core:window:allow-set-always-on-top",
"core:window:allow-inner-size"
]
}
+8
View File
@@ -79,6 +79,9 @@ pub struct HikariConfig {
#[serde(default)]
pub streamer_hide_paths: bool,
#[serde(default)]
pub compact_mode: bool,
}
impl Default for HikariConfig {
@@ -101,6 +104,7 @@ impl Default for HikariConfig {
minimize_to_tray: false,
streamer_mode: false,
streamer_hide_paths: false,
compact_mode: false,
}
}
}
@@ -157,6 +161,7 @@ mod tests {
assert!(!config.minimize_to_tray);
assert!(!config.streamer_mode);
assert!(!config.streamer_hide_paths);
assert!(!config.compact_mode);
}
#[test]
@@ -177,6 +182,9 @@ mod tests {
character_panel_width: Some(400),
font_size: 16,
minimize_to_tray: true,
streamer_mode: false,
streamer_hide_paths: false,
compact_mode: false,
};
let json = serde_json::to_string(&config).unwrap();