Commit Graph

760 Commits

Author SHA1 Message Date
vasilito 0ca2cdd1f4 uutils: bump libc 0.2.182 -> 0.2.186 for redox sa_flags c_int ABI
Fixes nix-0.30.1 crate build failure where SaFlags::from_bits_truncate()
expected i32 but libc-0.2.182 declared sa_flags as c_ulong (u64) on redox.
libc-0.2.186+ declares sa_flags as c_int (i32), matching relibc's header.

Also includes:
- Add nproc to feat_os_unix_redox feature list
- Remove redox-specific dev_t shims from fs.rs (now handled by libc)
- Add aarch64 locale workaround in locale.rs

Verified: repo cook uutils -> successful, coreutils ELF64 produced.
2026-06-20 14:45:24 +03:00
vasilito 35fab2c234 tlc: update tests + call sites for MC-only theme system
All  and  references updated to deref the LazyLock (). 1103 tests pass.

Editor render test now reads [editor] editlinestate from the MC .ini (with cursor_fg fallback) so the cursor-line color assertion matches the actual rendering.

Viewer match-highlight test reads [viewer] viewselected from the MC .ini (with warning fallback) — the test now matches the actual highlight bg color from julia256 (yellow on cyan).
2026-06-20 14:35:28 +03:00
vasilito 9c8583fd3a tlc: canonicalize skin_name to resolved theme name
FileManager.skin_name now stores the canonical MC skin name (e.g. "julia256") rather than the user-config alias (e.g. "default-dark"). When by_name() resolves a legacy alias to a real .ini skin, the resulting theme.name is what gets persisted.

apply_skin_selection follows the same rule.

Skin dialog tests use real MC skin names (dark, nicedark) and verify the catalog contains no TLC hardcoded presets (no more "default-dark", "mc-classic", etc. in the list).
2026-06-20 14:35:02 +03:00
vasilito 03b5f88bf6 tlc: MC .ini skins as ONLY theme source — drop all hardcoded palettes
Removes every hand-coded Theme constant. julia256 is the new default; sand256 is the light fallback. All 39 bundled MC skins are now reachable by name, and legacy aliases (default-dark, mc-classic, nord, etc.) resolve to real .ini skins.

Architecture:

  - DEFAULT_THEME / LIGHT_THEME are LazyLock<Theme> initialised on first use.

  - parse_theme now reads ALL MC sections: core, statusbar, buttonbar, dialog, error, filehighlight, viewer.

  - shadow field comes from [core] shadow (MC's gray;black pattern).

  - render_drop_shadow matches MC's tty_draw_box_shadow algorithm exactly: two background-recolor rectangles (2-col right strip + 1-row bottom strip offset by 2 cols), no glyph change.

Removes redbear_tui_theme import — TLC no longer has its own palette.
2026-06-20 14:34:42 +03:00
vasilito efbd295cce docs: redbear-power v1.2 — config file, AMD CCD, tabs, D-Bus methods
Updates the v1.1 §24 deferred items to "implemented in v1.2".

CONSOLE-TO-KDE-DESKTOP-PLAN.md:
- New §3.3.2 v1.2 section after v1.1, documenting:
  - Config file (TOML): /etc/redbear-power.toml + ~/.config/redbear-power.toml
  - AMD Zen CCD topology via leaf 0x8000001E (NC field) and 0x80000026 (Zen 4+)
  - Multi-view tab system (Per-CPU / System / Info) with Tabs widget
  - D-Bus methods: cycle/set_governor, toggle_throttle, force_*, set_pstate
  - Mouse sub-panel navigation (left/right/middle click conventions)
- v1.2 source state: 2758 LoC across 11 modules; 3.2 MB stripped binary

redbear-power-improvement-plan.md:
- New §25 "Status Update — v1.2 Deferred Items Implemented"
- Removes the v1.1 §24 "Remaining work" list (all items now implemented)
- Documents implementation order and final module structure

ISO rebuild status: still blocked by pre-existing upstream nix-0.30.1
vs Redox relibc SaFlags incompatibility in uutils.
2026-06-20 14:24:24 +03:00
vasilito d53d9d7aff redbear-power: v1.2 — config file, AMD CCD, tab system, D-Bus methods
Completes the remaining plan §24 deferred items:

- Config file (TOML): new config.rs module loaded from
  /etc/redbear-power.toml and ~/.config/redbear-power.toml (with
  --config <path> override). Sections: display, theme, keybindings,
  benchmark. --help documents the full schema.

- AMD Zen CCD topology: cpuid.rs detect_hybrid now parses leaf
  0x8000001E NC field (cores per CCX) and Zen 4+ leaf 0x80000026
  (CCD count + cores per CCD). Linux host with 24 AMD cores now
  shows CCD0..CCD5 grouping instead of all-Unknown.

- Multi-view tab system: Per-CPU / System / Info tabs via ratatui
  Tabs widget. Hotkeys 1/2/3 jump directly; T cycles. System tab
  shows aggregate CPU stats (avg freq, max temp, total pkg power,
  aggregate flags, bench status). Info tab shows detailed CPU
  identification (family/model/stepping hex, full flags list,
  per-level cache hierarchy with KB+way+line size). New
  render_tab_bar / render_system_panel / render_info_panel render
  functions in render.rs. TabId enum added to app.rs.

- D-Bus methods: added CycleGovernor, SetGovernor(name),
  ToggleThrottle, ForceMinPstate, ForceMaxPstate, SetPstate(target)
  methods to org.redbear.Power. PowerCommand enum + command
  channel back to main thread for MSR-bound actions. New App
  methods set_governor(Governor) and set_selected_pstate(i32)
  enable D-Bus clients to set governor/P-state without sending
  keystrokes.

- Mouse sub-panel navigation: refined hit-test so left-click on
  header/controls cycles governor, right-click toggles throttle,
  middle-click on table expands P-state. Header now has two
  distinct actions (governor + throttle) reachable via different
  mouse buttons without per-label x hit-test.

New dependencies in Cargo.toml: toml = "0.8", dirs = "5",
serde = { version = "1", features = ["derive"] }.

Verification:
- cargo build --release (host): 0 errors.
- ./redbear-power --once: shows tab bar + Per-CPU view.
- ./redbear-power --config /tmp/rp-test/config.toml: respects
  refresh_ms override (50ms minimum enforced).
- AMD CCD labels visible: '▶ CCD0' / 'CCD1' / etc.
- cook redbear-power (Redox target): 3.2 MB stripped binary at
  local/recipes/system/redbear-power/target/x86_64-unknown-redox/stage/usr/bin/redbear-power.
  SHA256: 58b7812a5f673e227753c01e93a05678bd9e8f28101d8a447d70d4943170c40a.

ISO rebuild status: still blocked by pre-existing upstream nix-0.30.1
vs Redox relibc SaFlags incompatibility in uutils. v1.2 binary
is staged and will be packaged into the next successful ISO build
once that issue is resolved.

Source size: 2758 LoC across 11 modules (was 2376/10 in v1.1).
2026-06-20 14:21:06 +03:00
vasilito ed92bce14b redbear-power: v1.1 — full Phase A→D implementation
Comprehensive implementation per local/docs/redbear-power-improvement-plan.md.

Source: 2376 LoC across 10 modules (was 1396/6 in v0.6, +980 LoC).
Cross-compile: 2.8 MB stripped Redox ELF binary.
SHA256: 1b6f9db6ce79e77957bbb1fd606c430516015d5f02f3b64cb6f395e2f63b8e04

Modules:
- main.rs     (376) — event loop, key + mouse dispatch, render orchestration
- app.rs      (421) — App, CpuRow, Governor, ThrottleMode, PackageThermal, HybridInfo
- render.rs   (498) — header/table/controls/help/snapshot rendering
- acpi.rs     (166) — CPU enumeration, ACPI _PSS, CPUID fallback
- cpuid.rs    (350) — CPUID leaf decoding (vendor, family, model, SIMD, cache, hybrid)
- bench.rs    (123) — prime-sieve stress benchmark for thermal response testing
- dbus.rs     (202) — D-Bus export via zbus 5 (org.redbear.Power, --dbus flag)
- msr.rs      (127) — MSR constants + PackageThermal decoder
- cpufreq.rs  (50)  — governor hint read/write
- theme.rs    (72)  — central color palette (const Style)

Phase A — bug fixes:
- R1: PROCHOT pulse bug — Instant::now() math always ~0, pulse never toggled.
  Replaced with Frame::count() so the bar pulses at a frame-rate-stable rate.
- R5: removed duplicate comment block in snapshot().
- C2: PackageThermal struct + 13 PKG_THERM_* bit constants; full decode of
  IA32_PACKAGE_THERM_STATUS (PL1/PL2/CRIT/TT1/TT2/HFI/temp) surfaced in header.

Phase B — quality:
- R3: input poll decoupled from refresh cadence (50ms vs 250-2000ms).
- R4: Rect::centered replaces hand-rolled centered_rect helper.
- R6: area.layout(&Layout) destructuring with compile-time size check.
- O2: theme.rs central color palette (LABEL, BORDER_*, STATUS_*).
- C9: ratatui 0.30 Stylize shorthand across all renders.

Phase C — features:
- C1/C8: cpuid.rs reads leaves 0/1/4/7/0x80000000+/0x1A/0x8000001E.
- C3: SIMD display header line.
- C5: cache hierarchy header line.
- C7: dynamic refresh interval via / key (typed input 50..60000ms + Enter).
- C6: prime-sieve benchmark via b/B keys (one thread per core, AtomicU64
  counter, run/stop/status).

Phase D remaining (was deferred per plan s23):
- C4: hybrid CPU detection (CoreType enum, Intel leaf 0x1A, AMD leaf 0x8000001E),
  per-CPU row prefixed with type label, Hybrid: 8P + 16E header.
- O1: termion MouseTerminal wrapper enables xterm mouse protocols.
  Wheel = scroll, Left-click = select/toggle, Right-click = expand P-state.
  hit_test() maps (x, y) to panel rects cached after every render.
- O3: dbus.rs publishes org.redbear.Power on session bus (opt-in via --dbus).
  Properties: cpu_count, avg_freq_khz, max_temp_c, avg_load_pct, governor,
  throttle_mode, prochot_asserted. Background thread owns the tokio runtime
  + zbus Connection; main thread sends snapshots via mpsc channel. Graceful
  degradation if redbear-sessiond is unreachable.

Verification:
- cargo build --release (host): 0 errors, 21 warnings.
- ./redbear-power --once (Linux host, AMD 24-core): renders all features.
- ./redbear-power --dbus (via script(1)): registers on session bus,
  emits xterm mouse capture sequences.
- cook redbear-power (Redox target): 2.8 MB stripped binary at
  local/recipes/system/redbear-power/target/x86_64-unknown-redox/stage/usr/bin/redbear-power.

ISO rebuild status: blocked by pre-existing upstream nix-0.30.1 vs Redox
relibc SaFlags incompatibility in uutils (recipes/core/uutils). The v1.1
binary IS staged and will be packaged into the next successful ISO build
once that issue is resolved (separate scope).

Docs:
- local/docs/CONSOLE-TO-KDE-DESKTOP-PLAN.md s3.3.2 - v1.0 + v1.1 sections.
- local/docs/redbear-power-improvement-plan.md s24 - full status update.
- local/docs/RATATUI-APP-PATTERNS.md - canonical ratatui 0.30 guide
  (1161 lines), includes s13 ratatui 0.30 Best-Practices Update + s14
  Cross-Reference redbear-power as a Reference Implementation.

Cargo.toml: new dependencies zbus = "5" (tokio feature) and tokio = "1"
(rt + rt-multi-thread + macros) for the D-Bus export.
2026-06-20 13:26:24 +03:00
vasilito 46c39c8aee tlc: tighten filepos privacy — 0600 permissions + reindent tests
Filepos DB reveals canonical paths of opened files. Use 0600 instead of default umask (0644) so other users cannot read it.

Reindent the HomeGuard struct / scoped_home function inside the #[cfg(test)] mod tests block (functionally correct, just hard to read before).
2026-06-20 13:01:33 +03:00
vasilito 7d5b4088a6 tlc: fix F5/F6/F8 to MC parity — no-op on no selection
Reverts F5/F6/F8 from operating on current line (TLC extension) to MC behavior: do nothing when no selection is active. MC's eval_marks returns false when mark1==mark2, so F5/F6/F8 in MC are no-ops without a selection.

Removes the now-dead copy_line/cut_line/delete_line_no_sel helpers and their tests. Replaces with MC-parity no-op tests.

Extracts current_line_range() helper from select_current_line and duplicate_line_or_selection (also covers unindent_selection pattern). Removes ~50 lines of duplicated line-range computation.
2026-06-20 13:01:14 +03:00
vasilito e2d4da441f tlc: line-level ops — F5/F6/F8 on no-selection + select-line + duplicate
F5 (Copy), F6 (Move/Cut), F8 (Delete) now operate on the current line when no selection is active, matching MC semantics.

New bindings:

  Alt-Shift-L — select current line (incl. trailing newline)

  Ctrl-Shift-D — duplicate current line or selected block

New methods on Editor: select_current_line, copy_line, cut_line, delete_line_no_sel, duplicate_line_or_selection. 6 new tests cover both with-selection and without-selection paths.
2026-06-20 12:30:25 +03:00
vasilito f9ffe1947a tlc: update parity assessment — P4a+P4b complete (~93%)
Adds P4a (Ctrl-Insert, Shift-Delete, Ctrl-N, Shift-Tab) and P4b (filepos) rows. Updates the binding table to mark them as completed. Bumps total parity estimate from ~90% to ~93%.
2026-06-20 11:19:00 +03:00
vasilito d97e5b0f1a tlc: more editor bindings — Ctrl-Insert, Shift-Delete, Ctrl-N, Shift-Tab
Ctrl-Insert — Copy selection (MC Store, parity with F5).

Shift-Delete — Cut selection (MC Cut, parity with F6).

Ctrl-N — EditNew: clear buffer after save prompt if dirty.

Shift-Tab — Unindent selection by one tab width (MC parity).

Editor::unindent_selection() handles tab/space removal. Tests cover each binding's positive and negative paths.
2026-06-20 11:18:46 +03:00
vasilito d6aaf4e8af tlc: cursor position save/restore (filepos)
Adds per-file cursor position persistence (MC ~/.mc/filepos parity).

Storage: ~/.config/tlc/filepos as a tab-separated canonical-path database. Wired into editor/viewer open+close in both standalone binaries and the in-TLC file manager. CursorPos struct, save/load functions, restore_cursor_position() and save_cursor_position() methods on Editor and Viewer.

buttonbar.rs: add module-level doc to satisfy missing_docs lint.
2026-06-20 11:18:28 +03:00
vasilito 98b3ade744 tlc: update parity assessment — P3.5 complete (~90%)
Adds P3.5 row (start_line + buttonbar) and bumps total parity estimate from ~85% to ~90%.
2026-06-20 10:27:03 +03:00
vasilito 92ff00b6cc tlc: CLI +N argument for tlcedit/tlcview (MC parity)
Both binaries support MC-style +N positional: 'tlcedit +42 file.txt' opens at line 42. tlcview gains line support for the first time. main.rs updated for new open_file(file, start_line) signature.
2026-06-20 10:26:45 +03:00
vasilito 4e4863e122 tlc: FM→editor/viewer handoff with line numbers
FindOutcome::View/Edit now carry Option<u64> line number from FindHit. FileManager gains open_editor_at_line() and open_viewer_at_line() that jump to the target line after opening.
2026-06-20 10:26:28 +03:00
vasilito ca7f22ae34 tlc: start_line plumbing + buttonbar in editor/viewer
Editor gains goto_line(), viewer gains jump_to_line() + open_file(start_line). Both editor and viewer now render the F-key buttonbar at the bottom (1Help 2Save... / 1Help 2Wrap...).
2026-06-20 10:26:04 +03:00
vasilito a351544731 tlc: add shared buttonbar widget — F-key bar renderer
Shared render_buttonbar() function used by both editor and viewer to draw the MC-style function-key bar at the bottom of the screen.
2026-06-20 10:25:43 +03:00
vasilito 3d80ed0a40 tlc: MC parity P1+P2+P3 — 40+ keybindings, viewer parity, feature gaps (1094 tests) 2026-06-20 09:16:38 +03:00
vasilito c55fb91e8f tlc: tlcedit/tlcview full MC parity — E1-E5 (21 features, +2525 lines)
E1 — Wire broken features:
- Auto-indent on Enter (insert_newline_with_indent)
- Shift-Arrow selection bindings (6 keys)
- Ctrl-Home/Ctrl-End document navigation
- Nroff rendering in viewer (man page bold/underline)
- Viewer search (/) and goto-line (g) prompts
- Macro recording/playback (Ctrl-R/Ctrl-P)
- Search history dedup fix + n/N navigation

E2 — Editor visual premium:
- Vertical scrollbar (direct buffer manipulation)
- Accent-bar gutter (brand red stripe)
- Relative line numbers (Ctrl-L toggle)
- Cursor shape modes (Block/Bar/Underline)
- Completion popup with accent highlight

E3 — Functional parity:
- Word-wrap toggle (Alt-W)
- Viewer syntax highlighting (syntect integration)
- OSC 52 clipboard (SSH clipboard sharing)
- Save As prompt (Shift-F2)

E4 — Advanced features:
- Code folding (folding.rs, Ctrl-F1 toggle, gutter markers)
- Tags jump (tags.rs, Ctrl-]/Ctrl-T, TagTable parser)
- Replace per-match state infrastructure

E5 — Premium transitions:
- Dialog slide-in animation ( FileManager dialog_anim)
- Large-file loading indicator (spinner for >1MiB)
- Smooth scroll interpolation (PageUp/PageDown, 25%/tick)

New modules: cursor_shape.rs, folding.rs, tags.rs, clipboard_osc52.rs
Tests: 1093 passed (up from 1062)
2026-06-20 02:13:17 +03:00
vasilito b4a0d68f66 tlc: status bar clock + dialog scrollbars on help/jobs/find
Status bar now shows wall clock (HH:MM UTC) and spinner character
right-aligned. Native ratatui scrollbars added to Help, Jobs, and Find
dialogs when content overflows visible area.
2026-06-20 00:07:30 +03:00
vasilito 135439d763 tlc: editor visual polish — current-line highlight, bracket match, modified gutter mark
Current-line highlight (bg lightened by 12 per channel on cursor line),
bracket-match tracking (forward/backward search for ()[]{}<> pairs),
modified-line gutter mark (▌ in warning color when buffer is dirty).
bracket_flash field + find_matching_forward/backward methods on Editor.
2026-06-20 00:07:26 +03:00
vasilito 445edc39db tlc: panel visual polish — rounded borders, scrollbars, alt rows, 3D buttons
Rounded panel borders (BorderType::Rounded), native ratatui scrollbars
on file lists, alternating row colors (even rows lightened), file-size
inline bar in panel footer (█ proportional to largest file), 3D button
effect (▔ top + ▁ bottom rows when focused), and panel switch border
flash (cyan info color for 4 frames on Tab).
2026-06-20 00:07:05 +03:00
vasilito d79dc12af3 tlc: add animation tick loop, popup shadows, and FileManager animation state
100ms poll timeout with frame counter driving spinner/toast ticks.
Popup rendering gains drop shadows (▓), backdrop dim (Modifier::DIM),
and rounded borders. FileManager struct gets spinner, toasts,
frame_count, panel_switch_anim fields plus sync_animations() method.
2026-06-19 23:58:50 +03:00
vasilito 3164d82227 tlc: add spinner + toast widgets and visual Theme methods
Phase 1 animation foundation: braille spinner widget (10 frames),
toast notifications with slide-in animation (25% per frame), and 6 new
derived Theme methods (shadow, current_line_bg, alt_row_bg,
button_highlight, button_shadow, spinner_fg) for all subsequent visual
polish phases. 1041 tests pass.
2026-06-19 23:58:28 +03:00
vasilito d25a19b0cd Fix terminal resize hang: poll stdin with 200ms timeout
Blocking events.next() caused the app to hang indefinitely when the
terminal was resized without any key press — no data arrived on stdin
to wake the blocking read.

Fix: use rustix::event::poll() with 200ms timeout on stdin fd. On
timeout, check terminal size and redraw if changed. On data available,
read events as before.

Added rustix 'stdio' feature for rustix::stdio::stdin() BorrowedFd.
2026-06-19 21:03:58 +03:00
vasilito 48d2b41924 Add subshell.rs tests (9 tests for ShellManager, shell_path, run_command)
Covers: ShellManager::new() empty state, shell_path() env var
resolution and fallback, run_command success/failure/nonzero-exit/
filesystem-write/multiline, pty_login_helper_path resolution.
1031 tests total (was 1022).
2026-06-19 20:38:33 +03:00
vasilito 3d4fe13001 Split editor module: mod.rs 2646→434 non-test lines
Extract impl Editor blocks into submodules following the filemanager
split pattern:
- handlers.rs (551 lines): all key handling methods
- render.rs (571 lines): render method + rendering helpers
- bracket.rs (84 lines): bracket matching free functions

mod.rs retains: struct definition, basic impl, open_file, all tests.
Pure code-move refactoring — no logic changes.
1022 tests pass, 0 new warnings.
2026-06-19 20:35:47 +03:00
vasilito 477b7efc33 Wire 4 orphaned dialogs: chattr (C-x e), filter (Alt-f), encoding (Alt-e), connection (Alt-n)
4 dialog modules existed with full implementations and tests but were
completely unreachable — no Cmd variants, no DialogState variants, no
dispatch arms, no keymap bindings. This commit wires them in:

- ChattrDialog: C-x e — file attribute viewer for cursor file
- FilterDialog: Alt-f — persistent panel glob filter
- EncodingDialog: Alt-e — display encoding selector
- ConnectionDialog: Alt-n — network connection (FTP/SFTP/Shell)

All 4 now have: Cmd variants, DialogState variants, dispatch arms,
handle_dialog_key arms, render routing, apply_finished_dialog no-ops.
1022 tests pass, 0 new warnings.
2026-06-19 20:10:26 +03:00
vasilito 272f098884 tlc: cleanup — remove dead code, debug logging, fix import placement
- Remove two dead pub fn render free functions (render.rs + mod.rs)
- Remove debug_raw_event/should_log_raw_event (always-on /tmp logging)
- Move use std::sync::Arc to top of dispatch.rs
- Fix unused imports from dead code removal
2026-06-19 19:57:36 +03:00
vasilito 4edc3ddd5b tlc: revert to blocking-read event loop — fix terminal resize on Redox
The poll-based event loop (rustix::event::poll with 200ms timeout) broke
terminal size detection on Redox. When tui.size() returned (0,0) via
unwrap_or_default() after a failed dup(1,"winsize"), the size-change
check would clear the screen and render nothing.

Ratatui's draw() already calls autoresize() on every frame, which queries
backend.size() and resizes buffers automatically. The manual size check
and poll-based wake-up were redundant and harmful.

Reverted to the original blocking-read approach that worked on Redox:
  stdin.lock().events_and_raw().next()  →  process key  →  render()
Resize is detected on the next keypress via ratatui's built-in autoresize.
2026-06-19 19:06:02 +03:00
vasilito 612732dc39 tlc: clean up unused imports from module split + resize fix
- dispatch.rs: remove 8 unused module imports, 4 unused dialog type imports
- mod.rs: remove unused LinkKind import
- app.rs: remove unused AsFd import and stdin_fd variable
- Clippy back to 2 pre-existing warnings only (mc_ext + compare)
2026-06-19 18:06:31 +03:00
vasilito ac12f9e398 tlc: fix terminal resize detection with poll-based event loop
MC uses SIGWINCH→self-pipe→select(stdin+pipe) for resize detection.
In safe Rust (#![deny(unsafe_code)]), the equivalent is polling stdin
with a 200ms timeout via rustix::event::poll. This wakes the main loop
every 200ms even without key input, allowing terminal size check and
full redraw on resize. Same result as MC's signal-driven approach
without requiring unsafe signal handlers.

Previously the event loop blocked indefinitely on events.next() —
terminal resize was only detected on the next keypress.
2026-06-19 17:49:56 +03:00
vasilito 940e5f55c5 tlc: split filemanager/mod.rs into submodules + comment out mc in configs
- Split filemanager/mod.rs into dispatch.rs, render.rs, dialog_ops.rs,
  format_utils.rs (3567→~1200 lines in mod.rs)
- Comment out mc in redbear-mini.toml and redbear-full.toml per user request
- Enable tlc in redbear-full.toml (was temporarily disabled)
- 1022 tests pass, zero behavior changes
2026-06-19 17:30:28 +03:00
vasilito 035304f15b tlc: implement actual TUI event loops for tlcedit and tlcview
Both open_file() functions were stubs that opened the file but never
launched the terminal interface. tlcedit/tlcview would silently exit
without displaying anything.

- editor::open_file(): create Tui, render editor, run key event loop,
  handle Save/Close/SaveThenClose/DiscardThenClose results
- viewer::open_file(): create Tui, render viewer, run key event loop,
  exit when handle_key returns true
2026-06-19 13:00:22 +03:00
vasilito ab5172c7e0 base: add fbcond to BINS, installs, and /usr/bin copy path — fixes missing console binary 2026-06-19 12:58:33 +03:00
vasilito f555ead47c tlc: fix CTRL+O crash + terminal resize + wire LOW dialog modules
- recipe.toml: stage tlc-pty-login binary alongside tlc/tlcedit/tlcview
  (was missing from ISO, causing CTRL+O subshell spawn failure on Redox)
- app.rs: run_external() catches spawn errors instead of propagating via ?
  (prevents app exit when subshell/command fails to spawn)
- app.rs: add terminal resize detection to event loop
  (tracks last_size, calls terminal.clear() + render() on size change)
- mod.rs: add missing module declarations for chattr_dialog, connection_dialog,
  encoding_dialog, filter_dialog (enables 36 new dialog tests, 1022 total)
2026-06-19 12:45:12 +03:00
vasilito dc68054305 restore lost packages from 0.2.3 + fix overwritten 0.2.4 files
- Restore 29 recipe symlinks (libdrm, qtbase, dbus, sddm, pipewire, etc.)
- Restore 33 patches (KDE, libdrm, mesa, pipewire, sddm, wireplumber)
- Restore 20+ local/scripts (audit, lint, test, build helpers)
- Restore src/cook/scheduler.rs, status.rs, gnu-config/
- Restore scripts/patch-inclusion-gate.sh, run_mini1.sh, validate-collision-log.sh
- Recover TLC source from HEAD (was overwritten by 0.2.3 checkout)
- Recover 11 local/docs plans from HEAD (were overwritten)
- Recover qt6-wayland-smoke symlink from HEAD
- Fix MOTD: remove garbled ASCII art, use clean text
- Update version: 0.2.0 -> 0.2.4 in os-release, motd, config
- Reduce filesystem_size: 1536 -> 512 MiB
- Add ABSOLUTE RULE to AGENTS.md: never delete/ignore packages
- Reduce pcid scheme log verbosity: info -> debug
2026-06-19 12:39:14 +03:00
vasilito ffbe098ef8 config: add tlc to redbear-mini and redbear-full; create recipe symlink
TLC (Twilight Commander) was missing from both ISO configs. Added
tlc = {} to [packages] in redbear-mini.toml and redbear-full.toml.
Created missing symlink: recipes/tui/tlc -> ../../local/recipes/tui/tlc.
2026-06-19 11:47:25 +03:00
vasilito 06b316076f restore driver-manager + pcid service + lost configs from 0.2.3→0.2.4 sync
Root cause: the 0.2.4 upstream sync silently removed driver-manager (our
in-house PCI driver orchestrator) and never added a pcid init service,
leaving /scheme/pci uncreated and breaking all PCI device enumeration.

Changes:
- base-initfs/recipe.toml: restore driver-manager dep, binary copy,
  drivers.d/ config dir, set -eo pipefail
- redbear-device-services.toml: add driver-manager = {} to packages
- redbear-boot-stages.toml: restore from 0.2.3 (109 lines)
- protected-recipes.toml: restore from 0.2.3 (99 lines)
- redbear-mini.toml: add boot-stages to include chain
- driver-manager Cargo.toml: fix pcid path from symlink to physical
- base fork pointer: acdcb183 (adds 35_pcid.service to initfs)
- UPSTREAM-SYNC-PROCEDURE.md: document sync flaw, never-delete rule,
  driver-manager rationale
- PACKAGE-BUILD-QUIRKS.md: document pcid/pcid-spawner architecture,
  Redox flag values, kernel kcall on AcpiScheme

Verified: redbear-mini boots to login prompt in QEMU UEFI with working
PCI enumeration (6 devices), e1000d network driver, DHCP, driver-manager.
2026-06-19 11:39:24 +03:00
vasilito 49f383b386 tlc: README + PLAN — 986 tests, 95% binding parity, compare files done 2026-06-19 10:40:07 +03:00
vasilito 6ade75f02b tlc: compare files (Ctrl-d) — LCS-based diff viewer dialog
New compare.rs module with CompareDialog showing line-by-line diff
of two files (active panel cursor vs other panel cursor). Uses
LCS dynamic programming algorithm for optimal diff.

Color-coded output: context lines (foreground), removed lines
(error/red, bold), added lines (info/green, bold). Supports
scrolling (arrows, PageUp/Down, g/G for Home/End).

Error handling for unreadable files. MAX_LINES=10000 OOM guard.
10 new tests covering diff algorithm edge cases and dialog lifecycle.
986 tests total, 0 failures.
2026-06-19 10:39:25 +03:00
vasilito cc90bb1337 tlc: PLAN.md — 94% binding parity, split ratio + menubar expansion done 2026-06-19 10:27:39 +03:00
vasilito 5a8e33b387 tlc: expand F9 menubar with all implemented commands
Left/Right menus: Quick view, Info, External panelize, Reload added.
File menu: Filtered view, Relative symlink, Edit symlink, Directory
size added.
Command menu: Compare directories, Directory hotlist, Screen list,
View/edit history, External panelize, Active VFS list, Background
jobs added.

Menubar now exposes all 20+ implemented Cmd variants across 5 menus.
2026-06-19 10:26:35 +03:00
vasilito 2bcaba5340 tlc: implement split ratio adjustment (SplitMore/SplitLess)
Alt-Shift-Right grows left panel 5%, Alt-Shift-Left shrinks 5%.
Alt-= resets to 50/50. Range clamped to 10-90%.
panel_areas() uses split_ratio when equal_split is false.
3 new tests. 976 tests total, 0 failures.
2026-06-19 10:23:38 +03:00
vasilito 8aa02e1ed0 tlc: fix QuitQuiet (Shift-F10) to actually quit without confirmation 2026-06-19 10:18:38 +03:00
vasilito 71be82258a tlc: build linux release — 5.0 MB tlc, 973 tests, clippy clean 2026-06-19 10:15:14 +03:00
vasilito 35273ccaca Update base submodule pointer for acpid openat fix 2026-06-19 09:55:31 +03:00
vasilito ba03fa9fc3 Update kernel + base submodule pointers for ACPI kcall + O_RDONLY fixes
Author: vasilito <adminpupkin@gmail.com>
2026-06-19 09:47:38 +03:00
vasilito f44cf75930 tlc: update README + PLAN — 973 tests, 90% binding parity, all MEDIUM gaps closed 2026-06-19 09:06:14 +03:00