Skip to content

Update Deps and Fix Typo#46

Open
GreasySlug wants to merge 4 commits into
mainfrom
update-deps
Open

Update Deps and Fix Typo#46
GreasySlug wants to merge 4 commits into
mainfrom
update-deps

Conversation

@GreasySlug

Copy link
Copy Markdown
Owner

No description provided.

GreasySlug and others added 4 commits November 24, 2025 18:57
Changed cfg condition from target_os="linux" to not(target_os="windows")
to support both Linux and macOS.

Generated with Claude Code

Co-Authored-By: Claude <noreply@anthropic.com>
- Update dependencies: tui 0.18 -> ratatui 0.29, crossterm 0.23 -> 0.29
- Replace tui:: imports with ratatui::
- Update API: Spans -> Line, f.size() -> f.area(), Frame<B> -> Frame
- Update Table API: widths() removed, highlight_style -> row_highlight_style
- Refactor KeyEvent creation to use KeyEvent::new() constructor

Generated with Claude Code

Co-Authored-By: Claude <noreply@anthropic.com>
- Fix typo: boader -> border in SettingTheme struct and related methods
- Rename movement commands to use full names (e.g., move_to_parent_dir -> move_to_parent_directory)
- Rename functions for clarity (e.g., default_vim_ctrl_movements -> default_vim_control_key_movements)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
- config.ron: fix typos (Yello->Yellow, hightlight->highlight, imput->input, experement->experiment, boader->border)
- Rename classifiy_kinds to classify_kinds
- Rename functions for clarity:
  - insert_new_statefuldir -> insert_new_state_full_directory
  - current_dir_path -> current_directory_path_from_environment
  - get_home_directory_path -> get_home_directory_path_from_environment
  - make_info_files_from_dirpath -> make_info_files_from_directory_path
  - create_dir_by_relpath -> create_directory_by_relative_path
- Update command names to use full directory naming

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates dependencies from the deprecated tui library to its successor ratatui (version 0.29.0), alongside fixing multiple typos throughout the codebase. The migration includes updating API calls to match ratatui's interface changes and improving function naming for better code clarity.

Key changes:

  • Migrated from tui 0.18.0 to ratatui 0.29.0 and updated related dependencies
  • Fixed typos including "boader" → "border", "classifiy" → "classify", and "denide" → "denied"
  • Renamed functions for better clarity (e.g., make_info_files_from_dirpathmake_info_files_from_directory_path)

Reviewed changes

Copilot reviewed 11 out of 11 changed files in this pull request and generated 7 comments.

Show a summary per file
File Description
Cargo.toml Updated dependencies to use ratatui 0.29.0, crossterm 0.29.0, ron 0.12.0, and chrono 0.4.42
src/ui.rs Migrated to ratatui imports, fixed "boader" → "border" typo, updated Frame and Table API usage
src/state.rs Updated imports to ratatui, renamed function call to use expanded naming
src/path_process.rs Fixed "classifiy" → "classify" typo, renamed functions for clarity, improved cross-platform support comments
src/main.rs Updated imports and function calls to match renamed path_process functions
src/load_config.rs Updated imports to ratatui, fixed "boader" → "border" typo, refactored string_to_keyevent, updated ron error types
src/keymapping.rs Updated function calls to use new directory naming convention
src/input_ui.rs Migrated to ratatui with DefaultTerminal type, updated Frame API usage
src/file_item_list.rs Fixed "classifiy" → "classify" typo in method name
src/application.rs Updated imports to ratatui, renamed methods, updated function references
config.ron Fixed typos in comments: "Yello" → "Yellow", "boader" → "border", "hightlight" → "highlight", "imput" → "input", "experement" → "experiment"
Comments suppressed due to low confidence (1)

src/load_config.rs:79

  • Inconsistent command naming: These lines use the old abbreviated form "move_to_parent_dir" and "move_to_child_dir", while lines 72 and 75 use the expanded form "move_to_parent_directory" and "move_to_child_directory". This inconsistency should be resolved to use the same naming pattern throughout the stacker mode configuration.
        ("left", "move_to_parent_dir"),
        ("right", "move_to_child_dir"),

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/input_ui.rs
.split(f.size())[0];
.split(f.area())[0];

let input_style = Style::default().bg(Color::LightYellow).bg(Color::White);

Copilot AI Nov 24, 2025

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Setting background color twice: .bg(Color::LightYellow).bg(Color::White) will result in only Color::White being applied since the second call overwrites the first. This appears to be a copy-paste error. If the intent was to set both background and foreground colors, use .bg(Color::LightYellow).fg(Color::White) instead.

Suggested change
let input_style = Style::default().bg(Color::LightYellow).bg(Color::White);
let input_style = Style::default().bg(Color::LightYellow).fg(Color::White);

Copilot uses AI. Check for mistakes.
Comment thread src/path_process.rs
@@ -61,29 +61,32 @@ pub fn current_dir_path() -> PathBuf {

// C:\Users\UserNmae

Copilot AI Nov 24, 2025

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Typo in comment: "UserNmae" should be "UserName"

Suggested change
// C:\Users\UserNmae
// C:\Users\UserName

Copilot uses AI. Check for mistakes.
Comment thread src/load_config.rs

pub fn string_map_to_user_keyboad(keybinds: &HashMap<String, String>) -> HashMap<KeyEvent, String> {
let mut keybind: HashMap<KeyEvent, String> = HashMap::new();
pub fn string_map_to_user_keybindings(

Copilot AI Nov 24, 2025

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Typo in function name: "keyboad" should be "keyboard"

Copilot uses AI. Check for mistakes.
Comment thread src/load_config.rs
) -> HashMap<KeyEvent, String> {
let mut keybindings: HashMap<KeyEvent, String> = HashMap::new();
for (key, cmd) in keybinds.iter() {
let user_keyboad = string_to_keyevent(key);

Copilot AI Nov 24, 2025

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Typo in variable name: "user_keyboad" should be "user_keyboard"

Copilot uses AI. Check for mistakes.
Comment thread src/load_config.rs
keybindings
}

pub fn multi_string_map_to_user_keyboad(

Copilot AI Nov 24, 2025

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Typo in function name: "keyboad" should be "keyboard"

Copilot uses AI. Check for mistakes.
Comment thread src/application.rs
use crate::load_config::{
load_user_config_file, multi_string_map_to_user_keyboad, SettingTheme, UserConfig, UserKeyCode,
UserKeybinds,
load_user_config_file, multi_string_map_to_user_keyboad, SettingTheme, UserConfig, UserKeybinds,

Copilot AI Nov 24, 2025

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Typo in imported function name: "keyboad" should be "keyboard"

Suggested change
load_user_config_file, multi_string_map_to_user_keyboad, SettingTheme, UserConfig, UserKeybinds,
load_user_config_file, multi_string_map_to_user_keyboard, SettingTheme, UserConfig, UserKeybinds,

Copilot uses AI. Check for mistakes.
Comment thread src/path_process.rs
pub fn current_directory_path_from_environment() -> PathBuf {
match current_dir() {
Ok(path) => path,
Err(e) => panic!("Permission denide: {}", e),

Copilot AI Nov 24, 2025

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Typo in error message: "denide" should be "denied"

Suggested change
Err(e) => panic!("Permission denide: {}", e),
Err(e) => panic!("Permission denied: {}", e),

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants