Commit Graph

1137 Commits

Author SHA1 Message Date
vasilito 85ab930d1f 0.3.0: bump host Rust toolchain to nightly-2026-05-24 for upstream convergence 2026-07-06 18:05:06 +03:00
vasilito 53058e3e4e config/redbear-mini.toml: remove invalid respawn field, restore ptyd notify type for console readiness 2026-07-06 16:07:27 +03:00
vasilito aa3367acd2 W11: File size gauge on cursor row
Add a 6-cell mini-gauge at the right edge of the cursor row that
shows the cursor file's size as a fraction of the largest file
in the current directory. Uses block characters (filled/empty)
in the accent colour over the cursor background. Only renders
for non-directory entries on the active panel, so directories
and the '..' parent entry skip the gauge.

This gives an instant visual sense of relative file sizes
without needing to read the numeric size column.

Tests: 1388 pass, zero warnings.
2026-07-06 16:01:52 +03:00
vasilito 893374a992 W10: Disk space percentage in status line
Show the free-space percentage next to the disk indicator dot
so the user can quickly assess remaining capacity without doing
mental math from the size string.

Tests: 1388 pass, zero warnings.
2026-07-06 15:26:30 +03:00
vasilito dc32c6ccbf W10: Active panel focus indicator bar
Add a bright accent-coloured 1-column bar on the inner left edge
of the active panel. This is a premium TUI pattern (also used by
bottom, lazygit, btop) that gives a much clearer visual focus
indicator than a border colour change alone.

The bar uses the same active_border_color as the panel border so
it stays thematically consistent. The panel inner content shifts
right by one column to accommodate the bar without losing content.

Tests: 1388 pass, zero warnings.
2026-07-06 15:23:38 +03:00
vasilito 203c40ab53 redoxfs: bump submodule pointer for no_std Vec fix 2026-07-06 15:20:07 +03:00
vasilito 4325c67471 W8b: Error flash on status line for visual feedback
When a critical operation fails (chmod/chown/rmdir/view), the status
line pulses its background between status_bg and theme.error for 400ms.
This gives the user immediate visual confirmation that something went
wrong, even if the message text is short or they aren't looking at
the status bar.

- StatusLine::set_error() — sets message + triggers flash
- StatusLine::error_flash_progress() — remaining fraction (0.0..=1.0)
- blend_bg() — RGB linear interpolation between two Color values
- rgb() — named-color → RGB tuple for interpolation

Wired into 4 critical error paths in dialog_ops.rs (chmod, chown,
rmdir, view). Other transient messages continue to use set_message().

Tests: 1388 pass (was 1384), zero warnings.
2026-07-06 15:19:03 +03:00
vasilito b4fc7d9869 verify-fork-versions: fix patch file parsing to use --numstat 2026-07-06 15:08:41 +03:00
vasilito 4d4f940916 W9 Phase 3: Add InsertOtherFile, InsertCurTagged, InsertOtherTagged
Complete MC Ctrl-X chord parity for the PutCurrent/Other variants:

- Cmd::InsertOtherFile (C-x C-r) — insert other panel cursor filename
- Cmd::InsertCurTagged (C-x t) — insert active panel marked filenames
- Cmd::InsertOtherTagged (C-x C-t) — insert other panel marked names

Direct keymap bindings for the same actions:
- Alt-' — InsertOtherFile
- Alt-t — InsertCurTagged
- Ctrl-Alt-G — InsertOtherTagged

Added 3 unit tests covering each command's dispatch + cmdline insertion.

Tests: 1384 pass (was 1381), zero warnings.
2026-07-06 15:05:21 +03:00
vasilito 29f08c949a base/config: fix scheme daemon service types, console respawn, init hidden-file skip, pcid timeout 2026-07-06 15:04:51 +03:00
vasilito c1cf86a38a W9: Fix Ctrl-X chord semantics to match MC
MC parity audit found 4 semantic bugs in dispatch_ctrl_x_followup:
  l -> Link (hard link, was Cmd::Symlink)
  s -> Symlink (absolute symlink, was Cmd::SymlinkRelative)
  v -> SymlinkRelative (relative symlink, was Cmd::SymlinkEdit)

Added 2 ctrl+letter chord entries:
  ctrl-s -> SymlinkEdit (edit symlink)
  ctrl-p -> InsertOtherPath (insert other panel path)

Added 3 chord aliases for MC-compatibility:
  p -> InsertCurPath (MC's PutCurrentPath)
  r -> InsertCurFile (MC's PutCurrentLink)
  ctrl-d, ctrl-s, ctrl-p handled via modifier check

Tests: 1381 pass, zero warnings.
2026-07-06 10:25:59 +03:00
vasilito 5ad5e86e5c W8a: Editor charset indicator + multi-segment status bar
Add 'Charset: UTF-8' to the editor status bar (TLC is UTF-8 native).
Upgrade status bar from a single-styled Span to a multi-segment Line
with per-segment accent colours so the status reads at a glance:
  - modified flag: warning colour (bold)
  - filename: accent colour
  - position (Ln/Col): info colour
  - tab/charset/eol labels: dim shadow colour
  - mode tag: warning colour

Tests: 1381 pass, zero warnings.
2026-07-06 10:13:54 +03:00
vasilito 11d3665d7d bootloader: migrate all patches to local fork, switch recipe to path source 2026-07-06 10:11:18 +03:00
vasilito 64325790de redbear-power v1.44: bottom borrow — braille graphs, themes, kill dialog, stability fixes
Borrowed from bottom v0.11.2 comparison assessment (17 implementation passes):

New modules:
- src/graph.rs: BrailleGraph widget (Canvas + Marker::Braille) for
  time-series rendering; RingHistory buffer with display_max() for
  stable y-axis scaling (nice rounding: 1,2,5,10,20,50,100...)
- src/kill.rs: process kill dialog with signal selection,
  Cell<usize> interior mutability pattern, 2s auto-close timer
- src/event.rs: typed Event enum (Key, Mouse, Tick, Resize, Terminate)

New features:
- Braille graphs: 5 widgets across 4 tabs (CPU%, Temp°C, PkgW,
  Net KiB/s, Disk KiB/s) with y-axis labels and reserved margin
- Theme system: dark/light/high-contrast presets, --theme CLI flag
  with validation, wired into panel_border(), BrailleGraph,
  header governor, cursor highlight
- Widget expansion (e key): full-screen tab toggle with hint bar
- Data freeze (f key): pause data updates with [FROZEN] indicator
- Process kill dialog (k key): SIGTERM/SIGKILL/SIGINT/SIGHUP
- --once mode: now renders 3 braille graphs + all text panels
- Double-refresh at startup for ≥2 graph data points
- Startup diagnostic to stderr (cores, governor, MSR, DMI name)

Stability fixes:
- MSR per-CPU failure cache (Mutex<Vec<bool>>) — avoids repeated
  doomed /dev/cpu/*/msr opens; auto-clears every ~30s (60 refreshes)
- skip_refresh guard: if refresh >200ms, skip next cycle to
  prevent refresh pile-up on slow MSR reads
- collector.rs: removed Barrier — threads start work immediately
  instead of waiting for all threads to spawn
- panic hook: restores terminal on panic
- IsTerminal check: clear error message before entering raw mode

Bug fixes:
- 4 key shadowing bugs found and fixed:
  'g' (governor vs. move-to-top) — removed unreachable arm
  'T' (tab-cycle vs. tree-toggle) — changed tree to 'y'
  'f' (freeze vs. process-filter) — changed filter to 'F'
- Key::Esc ordering: kill dialog → PID detail → quit
- process panel header updated ('y' for tree, 'F' for filter)

Build:
- Cargo.toml: [profile.release] lto=true, opt-level=3, codegen-units=1
  → 4.1 MB binary (was 6.1 MB, -33%)
- libc 0.2 dep for Linux kill() in kill dialog
- cargo fmt applied project-wide

Tests: 217 passed (was 198, +19 new)
- graph: 5 tests (RingHistory, display_max, 3 render smoke tests)
- kill: 6 tests (dialog lifecycle, selection wrap, auto-close, render)
- app: 8 integration tests (CPU detection, graph population, governor,
  temp source, expand toggle, freeze, skip-refresh)

Docs:
- local/docs/RATATUI-APP-PATTERNS.md updated to v1.44+ status:
  §13.14 current feature table, §15 braille graph pattern,
  §16 modal dialog pattern, §17 key audit pattern,
  §14 line counts updated (13,091 LoC, 27 modules, 217 tests),
  summary expanded to 13 rules
2026-07-06 10:09:31 +03:00
vasilito acc92b6841 redoxfs: migrate patches to local fork, switch recipe to path source 2026-07-06 07:57:38 +03:00
vasilito 4c4dd8fa74 userutils: switch recipe to path-only local fork, remove patch symlinks 2026-07-06 07:51:58 +03:00
vasilito d6b6e407b5 PLAN.md: §9.5 — W7 progress dialogs changelog 2026-07-06 07:47:07 +03:00
vasilito 9024b87934 W7: Progress dialogs for copy/move/delete
Spawn file operations on background threads and show the existing
ProgressDialog (gauge, sparkline, ETA, cancel button) while the
operation runs. The event loop polls the result channel every frame
and applies the outcome when the thread finishes.

- DialogState::Progress variant added
- PendingProgressOp tracks kind/sources/destination/result channel
- spawn_op_with_progress() spawns thread + shows modal progress
- tick_progress() polls channel, handles Ok/Err/Empty/Disconnected
- ProgressDialog Cancel key (Enter) cancels the OpHandle
- Tab toggles focus on the cancel button
- Wired into app.rs event loop (re-render every tick while running)

Tests: 1381 pass, zero warnings.
2026-07-06 07:45:47 +03:00
vasilito 5d6faeaac6 docs: mark submodule-inline-diff improvement resolved; all forks are declared submodules 2026-07-06 05:53:34 +03:00
vasilito 84bcc979de tlc: update PLAN.md with W6-series changelog entries 2026-07-06 05:20:56 +03:00
vasilito ca0ea881f4 tlc: W6 visual/UX gap fixes — CJK width, bracket flash, search wrap, tab indicator
W6a: Fix CJK/wide character width handling
  - visual_width() now uses UnicodeWidthChar::width() instead of hardcoding 1
  - count_wrapped_rows() iterates UTF-8 chars instead of raw bytes
  - Control char fallback returns 0 (combining marks) instead of 1

W6b: Render bracket match flash highlight
  - bracket_flash (computed but never rendered) now applies accent bg style
  - push_rendered_text() accepts bracket_offsets + bracket_style params
  - All 4 call sites updated (3 selection segments + 1 non-selection)

W6c: Add search wrap-around notification
  - Editor: SearchState.last_wrapped field, 'Search wrapped' message on wrap
  - Viewer: Search.last_wrapped field, flash_msg in footer_text
  - Both find_next/find_prev and step() detect and report wrap

W6d: Editor status bar tab width indicator
  - Added 'Tab:{}' to status_string showing current tab_width
  - Hardcoded widget defaults verified as dead code (render_popup uses theme)

1381 tests pass, zero warnings.
2026-07-06 05:18:10 +03:00
vasilito e8fa2ca97b config: re-enable diffutils and curl in redbear-mini; nghttp2: build with -fPIC for libcurl; relibc: bump submodule with float.h/getprogname fixes 2026-07-06 04:29:07 +03:00
vasilito 72059ea9ef tlc: update PLAN.md with V-series and W-series changelog entries
Updates status header (1381 tests, zero warnings), adds V/W rows to
sprint table, and adds §9.2 (Visual Polish) and §9.3 (Warning Cleanup +
Stub Fixes) detail sections.
2026-07-06 04:28:02 +03:00
vasilito 8a77a6ebde tlc: comprehensive W1-W5 fixes — dead dialogs, suspend, connection wiring, warning cleanup
W1: Fix 3 dead dialogs (DisplayBits/VfsSettings/LearnKeys) that could never close
    - Capture handle_key() return value, close on Cancel/Confirm
W2: Implement Cmd::Suspend with actual SIGTSTP via kill -TSTP 4035172
    - Add want_suspend field, ExternalAction::Suspend variant
    - Drop TUI, send SIGTSTP, recreate TUI on resume
W3: Wire Connection dialog to Panel::navigate_to_vfs()
    - Parse VFS URL, look up backend, redirect active panel
    - Store Encoding dialog selection on FileManager.display_encoding
W4: Wire CK_EditUserMenu (EditorCmd::EditUserMenu)
    - Opens user menu storage_path in editor via Editor::open()
    - Fix unreachable!() in SaveBeforeClose prompt rendering
W5: Add ErrorOutcome::SkipAll variant + Shift-S keybinding
    - Fix misleading doc comment about non-existent 'All' variants
    - Add SkipAll button in error dialog render

Also: Fix all 41 compiler warnings (unused imports/vars, missing docs on
public API, remove dead SPECIAL_LABELS constant, remove unused viewer_bold)

1381 tests pass, zero warnings.
2026-07-06 04:18:44 +03:00
vasilito f54b53fbfb config: ensure console getty services depend on ptyd
The getty binary opens a PTY via /scheme/pty during startup. Adding an
explicit requires_weak on 00_ptyd.service avoids races where getty runs
before the pseudo-terminal daemon is fully ready, which could delay or
prevent the login prompt from appearing.
2026-07-06 03:59:56 +03:00
vasilito 48a06bd3a8 kernel: bump submodule to d4d9961d (map FACS physical address before parsing)
FACS address from FADT is a physical address. The previous code dereferenced
it directly, causing a page fault after the FADT offset fix.
2026-07-06 02:26:51 +03:00
vasilito 2ae61a4499 kernel: bump submodule to 51f6a771 (fix FADT offsets and GS base hardening) 2026-07-06 02:01:43 +03:00
vasilito 193d2926d0 tlc: visual polish V1-V6 — focused borders, sparkline, size coloring, fractional gauge, color cache, disk-free
V1: Focused panel border — active uses theme.accent+BOLD, inactive uses darken(border,30)
V2: Transfer-rate sparkline in ProgressDialog — ring buffer, 0.5s throttle, block glyphs
V3: Dynamic file-size coloring — warmth gradient by size (GB+20, 100MB+12, 10MB+6, 1MB+3, <512B dim)
V4: Sub-cell fractional progress bars — 8x resolution via ▏▎▍▌▋▊▉█ glyphs
V5: Pre-resolve MC skin color pairs — global Mutex<HashMap> cache, null-separated key
V6: Disk-free indicator in status bar — df subprocess, green/yellow/red thresholds

1381 tests pass (+12 new)
2026-07-06 00:46:05 +03:00
vasilito e07f264ab7 tlc: update PLAN.md test count + parity to 100% 2026-07-06 00:06:45 +03:00
vasilito 748c5f7ac2 submodules: relibc semaphore cbindgen [export] exclude fix 2026-07-06 00:06:26 +03:00
vasilito dd10299209 submodules: relibc sem_open next_arg value fix 2026-07-06 00:03:47 +03:00
vasilito 290664d2e1 tlc: update PLAN.md with Sprint 5 G-series 2026-07-06 00:03:04 +03:00
vasilito 19d093129e tlc: Sprint 5 G-series — error dialog retry wiring + SFTP open_write
G1: Error dialog Retry now re-invokes the stored file operation (copy/move/
    delete) using the PendingErrorOp parameters. Previously Retry just logged
    'Retry not yet wired'. Copy/move/delete error paths now create a
    PendingErrorOp + ErrorDialog instead of silently setting a status message.
    Skip/Ignore/Abort outcomes produce appropriate status messages.

G2: SftpVfs::open_write now returns a working SftpWriter that buffers writes
    and flushes to the remote SFTP server via session.write(). Previously
    returned VfsError::Unsupported. The SftpWriter buffers in memory and
    writes on flush/drop, matching the existing open_read buffer pattern.

1369 tests pass (default and --features sftp).
2026-07-06 00:02:10 +03:00
vasilito 43bc027485 submodules: relibc sem_open VaList::next_arg fix 2026-07-06 00:01:40 +03:00
vasilito ec101f9d4b submodules: update Cat 2 fork pointers to local path deps and +rb0.2.5
- relibc: variadic sem_open and local fork path deps
- base: already at latest RedBear-OS submodule/base
- bootloader/kernel/libredox/userutils: pushed local path-dep fixes
- installer/redoxfs: diverged from remote submodule/*; local commits saved,
  divergence to be resolved after build
- driver-manager: add syscall path dependency
- AGENTS.md: document +rb build metadata and no-patches-for-local-forks rule
- remove dead patch symlinks from recipes/core/relibc (path-source local fork)
2026-07-05 23:58:20 +03:00
vasilito c00dc8a0e3 tlc: update PLAN.md with Sprint 5 F-series completion 2026-07-05 23:46:21 +03:00
vasilito 329708940b tlc: Sprint 5 F-series — chunked viewer rendering, xz2 decompression, stale comment cleanup
F1: Remove stale 'Phase N' / 'not yet wired' comments from vfs/local.rs,
    vfs/traits.rs, editor/usermenu.rs — the functionality they described as
    future work is already implemented.

F2: Replace placeholder stubs in viewer/hex.rs and viewer/text.rs with actual
    rendering for Chunked sources (files >= 1 MiB). hex.rs reads viewport-sized
    chunks via read_at(); text.rs reads up to 64 MiB cap for line offset mapping.
    check_growing() in viewer/mod.rs also reads Chunked content instead of
    returning empty Vec.

F3: Editor Settings dialog now shows actual toggle state (auto-indent,
    word-wrap, show-whitespace, save-on-quit) instead of '(TBD)' placeholder.

F4: Add xz2 crate dependency and TarKind::Xz decompression support.
    Feature-gated as 'xz2' (optional, follows bzip2 pattern). Uses
    XzDecoder::new_multi_decoder for multi-stream .tar.xz files.

1369 tests pass. Default build (without optional features) verified.
2026-07-05 23:44:41 +03:00
vasilito 08aa9768be tlc: update PLAN.md — Sprint 5 E1, correct stale parity numbers
Editor parity 35/35  (was 29/35 — D7 multi-cursor + D8 spell check)
Viewer parity 19/19  (was 17/19 — hex-edit + goto-in-hex verified)
File menu 23/23  (was 20/21 — E1 restructure)
Command menu 22/22  (was 17/20 — E1 restructure)
Options menu 10/10  (was 7/10 — E1 restructure)
MC parity ~99% (was ~98%)

All previously deferred LOW-priority items resolved:
- Multi-cursor  D7
- Spell check  D8
- PTY subshell  D6 (verified)
- Mouse support  D5
2026-07-05 23:21:18 +03:00
vasilito f73acfc1c0 tlc: E1 — F9 menu restructure for MC parity
Rewrite build_menus() to match MC filemanager.c menu structure exactly:
- File menu: 23 items (View, View file, Filtered view, Edit, Copy,
  Chmod, Link, Symlink, Relative symlink, Edit symlink, Chown,
  Advanced chown, Rename/Move, Mkdir, Delete, Quick cd, Select/
  Unselect/Invert group, Quit)
- Command menu: 22 items (User menu, Directory tree, Find file,
  Swap/Toggle panels, Compare dirs/files, Panelize, Dir sizes,
  Command history, View/edit history, Directory hotlist, Active VFS
  list, Background jobs, Screen list, Edit extension/menu/highlighting)
- Options menu: 10 items (Configuration, Layout, Panel options,
  Confirmation, Appearance, Display bits, Learn keys, Virtual FS,
  Save setup)
- Left/Right panel menus share panel_menu() helper

Add 6 new Cmd variants: ViewFile, DisplayBits, LearnKeysDialog,
VfsSettings, CommandHistory, OptionsConfirm with dispatch handlers
wiring to existing dialog state machines (D2/D3/D4) and new methods
(open_view_file_prompt, open_command_history, toggle_confirmations).

Update 2 menubar tests to match the new MC-faithful structure.

1369 tests pass.
2026-07-05 23:09:31 +03:00
vasilito 54de45d461 docs/scripts: enforce single-repo policy and +rb build-metadata suffix
- Update AGENTS.md single-repo rule to explicitly forbid creating any new
  Gitea repositories and to require deleting per-component repos.
- Change version suffix policy from pre-release -rb to build-metadata +rb
  in AGENTS.md, sync-versions.sh, apply-rb-suffix.sh, verify-fork-versions.sh.
- Update migration instructions to push to existing submodule/<component>
  branches inside RedBear-OS, not create new repos.
- Update BUILD-SYSTEM-IMPROVEMENTS.md and SLEEP-IMPLEMENTATION-PLAN.md to
  reference submodule/* branches instead of defunct per-component repos.
- Fix delete-per-component-repos.sh example to use a real historical repo.
2026-07-05 22:50:33 +03:00
vasilito 73cf268273 PLAN.md: Sprint 4 (D1-D8) complete — all 8 items done
Updated status header (98% MC parity), test counts (1369),
changelog with D5-D8 detail, risk register, sprint table.
2026-07-05 22:42:31 +03:00
vasilito 76df890074 D8: editor spell check with built-in dictionary
SpellChecker with ~300 common English words + programming terms.
Word tokenizer handles apostrophes, digits, underscores.
Editor integration: toggle_spell_check(), find_next_misspelled().
MC uses libaspell; TLC embeds dictionary for zero external deps.

17 new tests: check_word, check_line, case insensitive, editor
integration (toggle, find_next, disabled, correct text).
2026-07-05 22:39:29 +03:00
vasilito b8aac3c9bc D7: editor multi-cursor support
Add secondary_cursors field to Editor with insert_char_multi,
delete_back_multi, delete_forward_multi methods. Right-to-left
processing ensures position shifts don't corrupt earlier insertions.

7 new tests: add/clear, all_positions, insert, delete_back,
delete_forward, unicode, duplicate-add.
2026-07-05 22:29:19 +03:00
kellito 7a2b0d5160 tlc: D5 — Mouse support wiring (click + scroll + double-click)
Mirrors MC's panel.c:4080-4197 mouse handling. Wraps the
Tui screen in termion's MouseTerminal (enables GPM on Linux /
xterm mouse on others — without it mouse events never reach
ratatui). The translate_mouse function maps termion MouseEvent
to a MouseAction enum that the FileManager dispatches as
cursor moves / entries / scroll (deferring HistoryPrev/Next/
List and ToggleHidden which need dedicated Cmds not yet in
the keymap).

New APIs:
  - terminal::event::translate_mouse(event, panel_top,
    panel_height, panel_width) -> MouseAction
  - terminal::event::MouseAction (Click, DoubleClick,
    ScrollUp/Down, HistoryPrev/Next/List, ToggleHidden,
    Unhandled)
  - FileManager::handle_mouse_event(m, size) routes
    MouseAction to existing cursor_up_n / cursor_down_n /
    Panel::enter / Panel::set_cursor helpers.
  - app.rs routes TermEvent::Mouse through handle_mouse_event
    before the keyboard-dispatch path.

Tests (9 new in terminal::event::mouse_tests):
  - click_on_file_row_emits_click_action
  - click_below_panel_is_unhandled
  - click_on_header_history_prev_button (col 1)
  - click_on_header_history_next_button (col width-2)
  - click_on_header_toggle_hidden_button (col width-6)
  - scroll_up_emits_scroll_up
  - scroll_down_emits_scroll_down
  - click_on_column_name_row_is_unhandled (sort-by-column
    not yet wired)
  - click_respects_panel_top_offset (panel_top parameter
    works for menu-bar offset)

1345 passing (was 1336; +9 new).
2026-07-05 22:06:01 +03:00
kellito 47abccbc13 tlc: PLAN.md Sprint 4 / D-series changelog + cleanup
Updates:
  - Status banner: 4 sprints (1-3 + D1-D4), 1336 tests
    (was 1292), 139 .rs files (was 138; +1 for
    error_dialog.rs), MC parity ~96% (was ~93%)
  - §3.1: 14d row updated 19→23, total 44→49, added
    Sprint 4 row (4/8 in progress)
  - §3.2: removed stale duplicate lines, marked deferred
    items as "- deferred" per Sprint 4 status
  - Renamed duplicate §3.3 to §3.4 (F9 menu parity)
  - Renumbered §3.4 Editor parity -> §3.5, §3.5 Viewer
    parity -> §3.6
  - §3.5 Editor parity: 28/35 -> 29/35 (C18 code-block
    preservation done)
  - §3.6 Viewer parity: unchanged
  - §7 Risk Register: removed stale `_wONTFIX` line and
    PTY subshell line; added D-series and D1 retry rows
  - §9: added Sprint 4 row (4/8 in progress) and
    §9.1 Deferred Phase 14d items section (D5-D8) with
    per-item context (which file, what needs doing)
  - §4 changelog: added full Sprint 4 / D-series section
    at the top with per-item commit refs and tests added

PLAN.md: 624 lines (was 540; +84 for Sprint 4 details).
2026-07-05 21:15:30 +03:00
kellito 17804d9a6b tlc: D4 — Learn keys dialog
Mirrors MC's src/learn.c::learn_keys (mc/source/src/learn.c:393-422).
MC shows a grid of buttons; TLC is simpler: scrollable list of
captured keys with their resolved Cmd.

New file: src/filemanager/learn_keys_dialog.rs (LearnKeysDialog,
CapturedKey, 6 unit tests).

New DialogState::LearnKeys variant wired into dispatch, render,
is_finished, title. Keymap is stored at construction so the
dispatcher doesn't thread it through every key event.

Tests: 1336 passing (was 1330; +6 new).
2026-07-05 21:04:42 +03:00
kellito 927d737d9c tlc: D3 — Virtual FS settings dialog (timeout)
Mirrors MC's boxes.c::configure_vfs_box
(mc/source/src/filemanager/boxes.c:1120-1198). MC's dialog has
VFS timeout plus FTP options (anonymous password, directory
cache timeout, proxy host, passive mode); TLC has no FTP/SFTP in
the active build, so we expose the relevant 1-field subset:
  - Timeout for freeing VFSs (sec): 0..=10000, default 10
    (out-of-range falls back to 10 — matches MC's
    boxes.c:1193-1194 validation)

New file: src/filemanager/vfs_settings_dialog.rs
  - VfsSettings struct (free_timeout: u32)
  - parse_timeout() (handles negative as 0, > 10000 as None)
  - VfsSettingsDialog with Edit-keyed text input
  - 12 unit tests

New DialogState variant:
  DialogState::VfsSettings(Box<VfsSettingsDialog>)
  Wired into dispatch, render, is_finished, title.

Tests: 1330 passing (was 1318; +12 new).
2026-07-05 20:49:13 +03:00
kellito 6c771d88f9 tlc: D2 — Display bits dialog (8/7/UTF-8)
Mirrors MC's boxes.c::display_bits_box
(mc/source/src/filemanager/boxes.c:955-1004). MC exposes 4 modes
(UTF-8, Full 8 bits, ISO 8859-1, 7 bits); TLC is UTF-8 throughout
so we expose the relevant 3-state subset:
  - Full 8 bits: bytes pass through verbatim
  - 7 bits: high bit stripped (parity-stripped serial consoles)
  - UTF-8 (validated): pass through UTF-8, ? for invalid

New file: src/filemanager/display_bits_dialog.rs
  - DisplayBits enum with 3 variants
  - DisplayBitsDialog (radio-list, mirrors SortDialog)
  - from_config() / map_byte() / is_valid_utf8() helpers
  - 12 unit tests

New DialogState variant:
  DialogState::DisplayBits(Box<DisplayBitsDialog>)
  Wired into dispatch (handle_key), render, is_finished (false;
  the dispatcher captures Confirm/Cancel from handle_key), title.

Tests: 1318 passing (was 1306; +12 new).

Co-Authored-By: Claude <noreply@anthropic.com>
2026-07-05 20:42:36 +03:00
kellito 4a3d097b27 tlc: D1 — file-op error recovery dialog (Retry/Skip/Ignore/Abort)
Mirrors MC's filegui.c::file_progress_real_query_replace and the
FileProgressStatus enum (filegui.h:45-54): FILE_CONT, FILE_RETRY,
FILE_SKIP, FILE_ABORT, FILE_IGNORE.

New file: src/filemanager/error_dialog.rs
  - ErrorDialog with path + error message
  - R / S / I / A shortcuts (MC letter bindings)
  - Esc maps to Abort
  - 7 unit tests (one per shortcut + an 'other keys don't finish' guard)

New FileManager state:
  - pending_error_op: Option<PendingErrorOp>
    stores kind + sources + dst + flags for the in-flight op so
    the user can Retry / Skip / Ignore / Abort
  - PendingErrorOp struct (parallel to existing PendingFileOp)
  - pending_error_op initialized to None

New DialogState variant:
  DialogState::Error(Box<error_dialog::ErrorDialog>)
  Wired into dispatch (handle_key), render, is_finished, title.

Retry is currently a stub (logs a message) because the copy
engine's batch step resumption would require threading the
operation index into copy_many/move_many/delete_many. The dialog
scaffolding is complete and tested; the retry can be wired in a
follow-up sprint when the batch step API is added.

Tests: 1306 passing (was 1299; +7 new).
2026-07-05 20:32:50 +03:00
kellito 2db8636f8b tlc: lock-in tests for C8, C11, C12 (verified-already-done)
Adds regression tests for Sprint 3 items that were verified
already-done during recon but had no dedicated test coverage:

  - viewer::tests::hex_edit_apply_nibble_at_eof_is_safe_noop
    Locks in the C8 contract: apply_nibble at cursor past EOF
    is a safe no-op (no panic, no spurious modified flag).

  - viewer::tests::move_cursor_clamps_to_size
    Locks in the C8 cursor bounds invariant at move_cursor
    level: positive deltas clamp to file size, negative deltas
    clamp to 0 with no underflow.

  - filemanager::panel::tests::history_dedups_consecutive_entries
    Locks in the C11 contract: refreshing the same directory
    N times grows the history by 1 entry (consecutive dedup),
    not N.

  - filemanager::panel::tests::sort_field_mtime_round_trips_through_config
    Locks in the C12 contract: 'mtime' and 'time' config
    strings both resolve to the Mtime sort field, and the
    Panel reports the human-readable name 'Mtime'.

Tests (4 new, total 1299 passing):
  +hex_edit_apply_nibble_at_eof_is_safe_noop
  +move_cursor_clamps_to_size
  +history_dedups_consecutive_entries
  +sort_field_mtime_round_trips_through_config
2026-07-05 19:58:29 +03:00