Commit Graph

1167 Commits

Author SHA1 Message Date
vasilito 8667fded2e fix: bump base submodule for fbcond write buffering during handoff 2026-07-06 23:06:27 +03:00
vasilito 914b2314e6 W35: Viewer auto-scroll context margin
The viewer's ensure_cursor_visible scrolled the cursor to the
exact top or bottom edge of the viewport. Add a 2-line context
margin so the cursor sits 2 lines from the top (when scrolling
down) or 2 lines from the bottom (when scrolling up). Premium
polish — keeps the surrounding lines visible for context.

Tests: 1399 pass, zero warnings.
2026-07-06 22:58:55 +03:00
vasilito 0a16b05232 W34: Goto line history with Up/Down arrows
Similar to the search history (W31), the goto-line prompt now
keeps a history of recently-visited line numbers. Up/Down arrows
cycle through the history; Down past the newest entry clears
back to the live input.

- Editor::goto_history: Vec<u32> field (max 50 entries)
- Editor::goto_history_cursor: Option<usize> navigation position
- Editor::push_goto_history(line) / goto_history_up() /
  goto_history_down() / reset_goto_history_cursor()
- GotoLine prompt commit pushes the line to history
- Up/Down arrows in the GotoLine prompt cycle through history
- push_goto_history skips consecutive duplicates

Added 2 unit tests covering: walk backwards/forwards, dedup.

Tests: 1399 pass (was 1397), zero warnings.
2026-07-06 22:43:08 +03:00
vasilito 4826d9f950 chore: bump userutils submodule to use local redox-rt fork 2026-07-06 22:33:10 +03:00
vasilito c9ad1e8deb W33: Mode-change flash in status bar
When the editor mode changes (e.g. Esc → Normal, i → Insert),
the mode tag in the status bar flashes to the accent colour
for ~300ms. Provides instant visual feedback for mode changes.

- Editor::mode_flash: Option<Instant> field
- Editor::trigger_mode_flash() / mode_flash_progress()
- Editor::set_mode() helper that triggers the flash on actual
  mode changes (no-op when setting the same mode)
- All self.mode = Mode::* sites in handlers.rs updated to use
  set_mode() so the flash triggers consistently
- status_spans uses accent + cursor_fg for the mode tag while
  the flash is active

Added 1 unit test verifying flash triggers on mode change and
NOT on setting the same mode.

Tests: 1397 pass (was 1396), zero warnings.
2026-07-06 22:15:54 +03:00
vasilito 5d869d0c45 Merge remote-tracking branch 'origin/0.3.0' into 0.3.0 2026-07-06 21:52:37 +03:00
vasilito 3e8ad78299 redbear-power: sync version 0.2.5 → 0.3.0 2026-07-06 21:52:02 +03:00
vasilito 652c1e6039 W32: Active panel title shows free space %
Append a 'N% free' indicator to the active panel's border
title using the existing disk_free() helper. Inactive panels
keep the plain path-only title. The percentage is shown as
an integer (0-100) which fits comfortably in the border even
on narrow terminals.

Tests: 1396 pass, zero warnings.
2026-07-06 21:45:50 +03:00
vasilito ab3685cd17 redbear-power: premium --help text — all v1.44 controls documented 2026-07-06 21:44:52 +03:00
vasilito f568f9cbb2 W31: Search history with Up/Down arrow keys
MC has search history navigation in the find prompt via arrow
keys. TLC's SearchState already had a history() list but no
way to navigate it without using the Alt-/ popup.

Add history_up() / history_down() / reset_history_cursor() to
SearchState. Wire Up/Down in the Find/Replace prompt to cycle
through the history. Down past the newest entry clears the
prompt back to the live pattern.

Added 3 unit tests covering: walk backwards, walk forward with
stop signal, empty history.

Tests: 1396 pass (was 1393), zero warnings.
2026-07-06 21:42:00 +03:00
vasilito daa126cc07 W30: Closing bracket pair highlight (also check before cursor)
The existing bracket_flash only triggered when the cursor was
ON a bracket character. This meant that after typing a closing
bracket (the most common trigger scenario), the cursor sits
AFTER the bracket and the flash doesn't fire.

Update update_bracket_flash to also check the character BEFORE
the cursor (pos - 1) and use it as a fallback. The pair position
is adjusted accordingly (the match is at pos - 1 for the before-
cursor case).

Tests: 1393 pass, zero warnings.
2026-07-06 21:31:23 +03:00
vasilito f557692754 0.3.0: bump base submodule for bootstrap Cargo.lock +rb0.3.0 2026-07-06 21:04:29 +03:00
vasilito e8950c2760 W29: Confirmation dialog (P1 audit gap)
The F9 audit found that Cmd::OptionsConfirm was a single-boolean
toggle (cycle on/off) instead of MC's proper confirmation dialog
with per-operation checkboxes. The ConfirmDialog already existed
in confirm_dialog.rs with 4 toggles (delete, overwrite, execute,
exit) but wasn't wired into the F9 menu.

Wire the existing ConfirmDialog:
- DialogState::Confirm(Box<ConfirmDialog>) variant
- Cmd::OptionsConfirm now opens the dialog pre-populated with
  the current safe_delete / safe_execute settings
- Dispatch handler processes ConfirmResult::Confirm by saving the
  settings to runtime.safe_delete / safe_execute
- Added RuntimeConfig::safe_execute field with default Some(false)
- Added dialog_title() and render() arms for DialogState::Confirm

Tests: 1393 pass, zero warnings.
2026-07-06 21:02:26 +03:00
vasilito b018e777ee 0.3.0: bump syscall submodule for legacy filter wrappers 2026-07-06 20:59:17 +03:00
vasilito 80eb79c4d8 0.3.0: bump submodules for Cargo.lock +rb0.3.0 refresh 2026-07-06 20:42:15 +03:00
vasilito a965521cba W28: Editor F9 Format menu (P1 audit gap)
The F9 audit found the editor had no Format menu at all. MC
has a dedicated Format menu with paragraph format, sort,
insert date/time, and external formatter entries.

Add a Format menu to the editor F9 menubar with 'Format paragraph'
(wired to the existing Editor::format_paragraph method, also
reachable via Alt-P). Sort, insert date/time, and external
formatter are documented as follow-ups.

- EditorCmd::FormatParagraph variant
- dispatch_editor_cmd handles it by calling format_paragraph()
- Format menu inserted between Edit and Search in the menubar

Updated 2 existing tests that counted menus (6→7) and checked
menu index (2→3 for Search after Format).

Tests: 1393 pass, zero warnings.
2026-07-06 20:35:38 +03:00
vasilito f966f6e449 0.3.0: bump relibc submodule to dual-toolchain VaList probe 2026-07-06 20:35:09 +03:00
vasilito c2dfeea1e8 W27: VFS link submenu in Panel menu (FTP/Shell/SFTP)
The F9 audit found that the Panel menu (Left/Right) was missing
the MC-style VFS link entries (FTP link..., Shell link...,
SFTP link...). The ConnectionDialog already supported all three
kinds but the user could only reach them via the catch-all
Cmd::Connection which defaulted to FTP.

Add three new Cmd variants (ConnectFtp, ConnectShell, ConnectSftp)
that each open the ConnectionDialog pre-set to the matching
ConnectionKind. Wire them into the Panel menu (Left/Right)
between 'External panelize' and 'Reload', separated by a
separator so the group reads as a VFS submenu.

Tests: 1393 pass, zero warnings.
2026-07-06 20:22:57 +03:00
vasilito ae113df83c W26: Wire viewer F9 menubar into viewer display
Press F9 in the viewer to toggle the menubar at the top of the
viewer. The menubar occupies the top row, and the viewer content
shifts down by 1 row when the menubar is open.

- Viewer::menubar: Option<ViewerMenuBar> field
- Viewer::render: calls mb.render() at the top when menubar is open
- Viewer::handle_key: F9 toggles, other keys route to menubar when open
- Viewer::execute_menubar_cmd: dispatches ViewerCmd to existing
  viewer methods (ToggleHex, ToggleMagic, ToggleWrap, ToggleGrowing,
  Search, SearchNext, SearchPrev, Goto)

Bookmark / file navigation / close commands are documented as a
planned follow-up — still reachable via their keyboard shortcuts.

Tests: 1393 pass, zero warnings.
2026-07-06 20:03:22 +03:00
vasilito 033f29a4af 0.3.0: mark redoxfs as snapshot fork (has Red Bear modifications) 2026-07-06 19:50:11 +03:00
vasilito d42da2343e 0.3.0: bump base submodule syscall references to +rb0.3.0 2026-07-06 19:49:19 +03:00
vasilito d986481cf2 0.3.0: bump bootloader/installer/redoxfs/userutils/redox-scheme to +rb0.3.0; update kernel upstream map 2026-07-06 19:48:34 +03:00
vasilito 6a2c782925 0.3.0: bump libredox submodule version to +rb0.3.0 2026-07-06 19:43:33 +03:00
vasilito 2a5a2f37d5 0.3.0: bump relibc and syscall submodules (converged + VaList fixes) 2026-07-06 19:41:59 +03:00
vasilito 6915dce88d 0.3.0: bump kernel submodule for build fixes (syscall aliases, FADT cast) 2026-07-06 19:05:49 +03:00
vasilito 1dce1568bf 0.3.0: bump syscall submodule for WITH_FILTER legacy constants 2026-07-06 19:01:59 +03:00
vasilito eec98d3ff7 0.3.0: bump syscall submodule for SYS_SENDFD legacy constant 2026-07-06 19:00:06 +03:00
vasilito dade04a383 0.3.0: bump syscall submodule for O_CLOEXEC/F_DUPFD_CLOEXEC ABI constants 2026-07-06 18:52:25 +03:00
vasilito 4de2f6ae3e 0.3.0: bump kernel and syscall submodules to upstream-latest +rb0.3.0 convergence 2026-07-06 18:45:59 +03:00
vasilito bd395e4cfa 0.3.0: update fork-upstream-map for kernel/relibc 0.6.0 and +rb0.3.0 suffix 2026-07-06 18:45:57 +03:00
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