Repository navigation
feat(tui): btop-style Resources tab, app-wide black background, and docs - #26
Conversation
Co-authored-by: Medulla <medulla@tinyhumans.ai>
Add a `[theme] background` key, defaulting to #000000, and fill every cell still on the terminal default at the end of each frame, so tabs, overlays and a harness's default-coloured output all sit on it. An empty value keeps the terminal's own. The Resources tab's `mainBg` now follows it unless set. Saving Appearance used to replace the whole [theme] section, dropping `background` and [theme.resources]; it now merges only its own keys. Co-authored-by: Medulla <medulla@tinyhumans.ai>
Agents: rows now come from the SDK classifier instead of a substring match over exe paths and argv, which tagged Cursor helpers as "External", the medulla binary as "OpenHuman", and anything with "claude" in its args as Claude. The classifier also names a harness by argv[0] (Claude's native build runs from versions/2.1.310), by the script an interpreter runs (gemini, aider), and folds a harness that re-execs itself (Codex's app-server daemon) into one row carrying its tree's usage. Gemini, Aider, Goose and Cursor Agent are new kinds. macOS now samples each process's cwd and thread count, which read "—" and 0 before. Disks: macOS reads the kernel mount table, so VM, Preboot, Update, xarts and the rest appear as they do in btop, with each volume's IO taken from its physical disk. Each disk gets btop's divider header, IO above the used meter, swap second and without an IO row; spare height goes to IO rows root first. Co-authored-by: Medulla <medulla@tinyhumans.ai>
Expanded the resources guide to describe the btop-style rounded panels, their clickable border tags, and the menu toggle, and added the new main, title, highlight, and selection color options to the theme table. Auto-committed-on: macbook Co-authored-by: Medulla <medulla@tinyhumans.ai>
The Resources tab now samples this machine and each connected remote host, and sampling runs only while the tab is on screen, pausing on every other tab. The page was updated to describe this behaviour. Auto-committed-on: macbook Co-authored-by: Medulla <medulla@tinyhumans.ai>
Added the `background` option to the theme configuration docs and clarified that it is set only in the config file, with Appearance saving leaving it and `[theme.resources]` untouched. Also noted that the background fills behind session output where the harness leaves its default colour, and updated the resources table so `mainBg` reflects that it inherits the app-wide background. Auto-committed-on: macbook Co-authored-by: Medulla <medulla@tinyhumans.ai>
The Mem panel row now documents that every local volume is listed under its own divider with swap second, including the macOS system volumes Finder hides. The Agents pane section was rewritten to explain how harnesses are identified by executable, launch name, or interpreter script, and to note that self-respawning harnesses collapse into a single row whose metrics cover the whole process tree. Auto-committed-on: macbook Co-authored-by: Medulla <medulla@tinyhumans.ai>
Tiny Sweeper reviewFindings
Resolved this pass
Verdict: Incomplete · Priority: critical Diagnostics and supporting detailsFull summaryPull request purpose (title): feat(tui): btop-style Resources tab, app-wide black background, and docs. Tiny Sweeper completed its review; deterministic results follow. Unreviewed paths
Partial review reasons
Review snapshot
Completeness: Incomplete What changedAdds 119 files (about 13.6k additions, 63 deletions): new TUI plot widgets and resource sampler with CPU, memory, disk, network, process and history sources per platform; new Resources tab modules for layout, chrome, CPU, mem, net, disks, keys, mouse input and an Agents table with detail and signal-confirmation views; new SDK resources modules for agent classification and the launch registry; protocol additions for AgentUsage and SessionsChunk with client reassembly and server chunking/trimming; ResourcesConfig and theme background/resources keys with per-key persistence; a Settings › Resources editor; PTY launches registered in the registry; and gitbooks plus unit and integration tests. Features
Tests
Before merge
Agent review detailscritique
security
tests
commits
description
Evidence and run details
|
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
Warning Review limit reached
This review includes 118 billable files and costs up to $29.50. View limit details
Comment |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 4d574a1f04
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Plan documents now refer to issues and pull requests by number instead of full repository URLs, and the implementation checkout path was dropped. This keeps the plans portable and avoids leaking local filesystem paths. Auto-committed-on: macbook Co-authored-by: Medulla <medulla@tinyhumans.ai>
Reworded the implemented status note so it reads as a single coherent sentence instead of a duplicated fragment. Auto-committed-on: macbook Co-authored-by: Medulla <medulla@tinyhumans.ai>
…values modules The resources settings editor was a single large module holding the row table, the row types and the value read/format logic. Those pieces now live in their own submodules, with mod.rs keeping only the editing and drawing wiring, so each concern is easier to find and extend. Auto-committed-on: macbook Co-authored-by: Medulla <medulla@tinyhumans.ai>
…ites The ResourcesConfig and update-interval imports were dropped from the module root and pulled in directly by the rows table and the tests that actually use them, keeping the wiring module free of unused imports. Auto-committed-on: macbook Co-authored-by: Medulla <medulla@tinyhumans.ai>
…d test import The resources settings module now imports the min and max update interval constants from the config crate, and the test module no longer imports the unused Row type. Auto-committed-on: macbook Co-authored-by: Medulla <medulla@tinyhumans.ai>
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: f00af6477b
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
The inline test modules for the disk, network, CPU and Linux sampler resources were extracted into dedicated `*_tests.rs` files and wired up with `#[path]` module declarations. This keeps the resource modules focused on production code without changing any test behaviour. Auto-committed-on: macbook Co-authored-by: Medulla <medulla@tinyhumans.ai>
Extract the launch registry's public types into a new types module and re-export them from the launch module so the registry file only holds behaviour. The sampler's DiskOptions struct moves into its types module for the same reason, with doc comments added to its fields. Auto-committed-on: macbook Co-authored-by: Medulla <medulla@tinyhumans.ai>
Removed the unused Weak, ProcessIdentity, and RegistryEntries imports from the launch registry module to keep the import list free of dead references. Auto-committed-on: macbook Co-authored-by: Medulla <medulla@tinyhumans.ai>
Extracted the AgentRow struct and its identity helper out of rows.rs into a dedicated types module and re-exported it from the agents module, so the row type is no longer defined alongside the rendering logic that builds it. Auto-committed-on: macbook Co-authored-by: Medulla <medulla@tinyhumans.ai>
Dropped the unused AgentIdentity import from the agents resources render module to keep the imports clean. Auto-committed-on: macbook Co-authored-by: Medulla <medulla@tinyhumans.ai>
Added `//!` module documentation comments to the SDK and TUI resources modules and their test files, describing what each module covers so the code is easier to navigate. Auto-committed-on: macbook Co-authored-by: Medulla <medulla@tinyhumans.ai>
Added doc comments to the agent discovery enums and structs so each variant and field explains what it represents. This makes the public API easier to understand without reading the implementation. Auto-committed-on: macbook Co-authored-by: Medulla <medulla@tinyhumans.ai>
Added doc comments to the fields of the AgentOrigin variants and to the started_at_secs fields on KnownProcessRoot and AgentProcess, clarifying what each value represents. Auto-committed-on: macbook Co-authored-by: Medulla <medulla@tinyhumans.ai>
Add a test asserting that an npm-installed Claude Code is recognized by its @anthropic-ai/claude-code package entry point, while an unrelated script named cli.js is not. Auto-committed-on: macbook Co-authored-by: Medulla <medulla@tinyhumans.ai>
Claude Code installed via npm runs as `node …/@anthropic-ai/claude-code/cli.js`, and matching only the script's file name (`cli.js`) failed to identify it. The classifier now checks the full script argument for the package entry point before falling back to harness name matching. Auto-committed-on: macbook Co-authored-by: Medulla <medulla@tinyhumans.ai>
Sessions now register their child process in the agent launch registry when opened, so process discovery reports them as Medulla-owned rather than external. The registration is released on reap, and the harness session id is propagated to it once known. Auto-committed-on: macbook Co-authored-by: Medulla <medulla@tinyhumans.ai>
Auto-committed-on: macbook Co-authored-by: Medulla <medulla@tinyhumans.ai>
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: ae69cf10ca
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Rename the test to describe the npm-installed Claude Code case more clearly, keeping the same coverage of package entry point recognition. Auto-committed-on: macbook Co-authored-by: Medulla <medulla@tinyhumans.ai>
The launch registration now carries the manager's own session id instead of the harness transcript id, so the Agents table can jump to the matching row in the Sessions rail. The session id is no longer pushed into the registration when the harness reports it, and the registry test asserts the entry is keyed by the manager id. Auto-committed-on: macbook Co-authored-by: Medulla <medulla@tinyhumans.ai>
On short terminals the cpu panel could request more rows than were left after the agents box, pushing the memory and network panels outside the drawing area. The computed height is now capped at the remaining space, and a test covers heights from 8 to 14 rows. Auto-committed-on: macbook Co-authored-by: Medulla <medulla@tinyhumans.ai>
Inverted graphs grow downward from the top edge, so their first row holds the lowest percentage band rather than the highest. The band index is now flipped when the graph is inverted, which also fixes the bottom-row detection used for the zero label. Auto-committed-on: macbook Co-authored-by: Medulla <medulla@tinyhumans.ai>
The inverted percentage test asserted glyphs for the wrong rows, so the expectations now match the actual top-down fill: the sample starts at the first row and the rows below it stay empty. Auto-committed-on: macbook Co-authored-by: Medulla <medulla@tinyhumans.ai>
Resources tab bindings were swallowing chorded keys such as Ctrl+T before the global handlers could see them, so the session picker never opened. Bare keys are now required for the resources handler, letting modified keys fall through to the global shortcuts. Auto-committed-on: macbook Co-authored-by: Medulla <medulla@tinyhumans.ai>
The agent detail pane could not resolve which agent to show because the selected row was only recorded when a cursor key moved it. The resolved row is now stored when the pane opens so the detail view can find the agent it is meant to display. Auto-committed-on: macbook Co-authored-by: Medulla <medulla@tinyhumans.ai>
Add a test asserting that pressing Enter on a freshly opened agents tab opens the detail pane and records the first row as the selection, so the pane knows which agent it is showing without any prior cursor movement. Auto-committed-on: macbook Co-authored-by: Medulla <medulla@tinyhumans.ai>
Add a test asserting that ⌃T on the Resources tab opens the session picker rather than arming a terminate signal on the agent table, guarding the global control-chord handling against regressions. Auto-committed-on: macbook Co-authored-by: Medulla <medulla@tinyhumans.ai>
The test's doc comment and assertions now describe only the ⌃T terminate-signal behaviour, dropping the session-picker assertion and the ⌃O mouse-toggle mention so the test matches what the code actually guarantees. Auto-committed-on: macbook Co-authored-by: Medulla <medulla@tinyhumans.ai>
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 7f4788044c
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
…s correctly Escaping the resources menu now clears any armed agent signal so a later confirmation key cannot kill an agent the operator backed out of. The network scalers also follow the swapped directions, so each graph is sized by the samples it actually draws. Auto-committed-on: macbook Co-authored-by: Medulla <medulla@tinyhumans.ai>
The test constructing an armed signal confirmation now sets the stage field to First, keeping it in sync with the updated struct so the escape-cancel behaviour is still exercised correctly. Auto-committed-on: macbook Co-authored-by: Medulla <medulla@tinyhumans.ai>
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: fdf4a09165
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Brings the Resources tab to the current codebase (Hosts era), in the btop style, and documents it.
mainwas force-pushed totinyhumansai/medulla-src's v0.14.1 plus one commit carrying over LICENSE, README,docs/,gitbooks/, the installers and the release workflow. The oldcrates/main is kept onarchive/main-before-medulla-src(7329a340).Code
7eb93489): CPU, Mem/disks, Net and Agents boxes drawn like btop, with header tags, themmenu, presets and Settings › Resources. Sampling runs only while the tab is on screen. Remote hosts send per-session agent usage, splitting a session list too large for one message.8ef48f24): a new[theme] backgroundkey, default#000000(""keeps the terminal's own). Each frame paints it under every cell still on the terminal default. Saving Settings › Appearance now merges its own keys instead of replacing all of[theme], which used to dropbackgroundand[theme.resources].44dcb1e3):medullaitself "OpenHuman", and MCP servers "Claude".argv[0](Claude's nativeversions/2.1.310) or by the script an interpreter runs, and one that re-execs itself (Codex's app-server daemon) is one row.—and0before.Docs
gitbooks/features/resources.mdandgitbooks/developers/configuration.md.Regression tests
every_tab_paints_the_theme_background_by_defaultpersist_theme_keeps_theme_keys_it_does_not_ownresources_paint_a_solid_black_background_by_defaulta_harness_on_a_versioned_executable_is_named_by_its_argv,a_harness_that_re_execs_itself_is_one_row,interpreted_harnesses_are_named_by_their_scriptonly_harnesses_are_rows_and_each_is_named_for_what_it_isa_sample_carries_this_processs_working_directory_and_threadsdisks_are_listed_btop_style_with_swap_after_rootEach of these failed against the unfixed code.
Validation
cargo fmt --all -- --checkandcargo clippy --locked -p medulla-tui --all-targets -- -D warningsare clean.cargo nextest run --locked --workspace: 4488 tests, 25 failing. They are all daemon/e2e provider, PTY-session and picker tests that also fail on unmodified v0.14.1 on this machine (/bin/true,/private/var, daemon timeouts).DiskRatesparameter on Linux, whichcfgnow compiles out.