Repository navigation
feat(cli): show view hierarchy and hide empty views in view list - #194
Merged
Merged
Conversation
graywolf336
approved these changes
Sep 17, 2026
geekgonecrazy
added a commit
that referenced
this pull request
Oct 8, 2026
The #194 tree renderer only covered the local path; when a service session is active, view list went through the RPC path's flat renderer (no hierarchy, no counts, no state, no empty-view hiding). Map the wire ViewInfo into ViewEntry and reuse compute_visibility/tree_order/ render_line so both paths render identically. -s and -a are now honored over RPC too.
geekgonecrazy
added a commit
that referenced
this pull request
Oct 8, 2026
* fix(cli): render view list hierarchy over RPC The #194 tree renderer only covered the local path; when a service session is active, view list went through the RPC path's flat renderer (no hierarchy, no counts, no state, no empty-view hiding). Map the wire ViewInfo into ViewEntry and reuse compute_visibility/tree_order/ render_line so both paths render identically. -s and -a are now honored over RPC too. * fix(cli): restore pre-libatomic rendering for diff and log over RPC Since #239 every command routes through the service area (local in-process by default), and several bridges rendered thinner output than the local code they replaced: diff printed bare patch text with no headers/colors/stat-graph/name-status, and log dropped the styled hash/author/date, the (tag) marker, entry separators, and the versioned JSON document. DiffChunk now carries the file status and the recorded/working-copy contents (add-only wire fields, populated by both the working-copy and view-pair arms), so the CLI rebuilds the same FileDiffs the local path built and renders through the SAME formatters — print_unified, print_stat (graph bars + summary), print_name_only, print_name_status, the word-diff pairing, and the versioned JSON document. /dev/null sides keep their bare form in headers. log maps the wire entries onto JsonLogEntry and reuses format_hash_with_length/format_timestamp and the output styles, including the (tag) marker and blank-line entry separators. * fix(daemon): give every redb open the cross-process grace period The #230 merged-database discipline opens the store per operation, but the provenance journal's opens (DirectJournalSink::store, the hook path) and the daemon's change_store/repository accessors called redb directly with no wait — a short-lived CLI/agent process holding atomic.redb failed the hook's journal write on the first contested open while repository opens rode out the hold. - RedbChangeStore::open_existing_wait: bounded retry on DatabaseAlreadyOpen, other errors immediate — the same policy Repository::wait_for_database applies - The open budget is now one shared, env-overridable knob: atomic_repository::database_lock_wait() (ATOMIC_DB_LOCK_WAIT_MS, 30s default) — the hook-side budget wait_budget::database_wait() already used; libatomic's daemon opens delegate to it too - RepoHandle::{repository,repository_readonly,change_store} and DirectJournalSink::store all wait; compact keeps its own retry loop - Tests: held-handle-then-release succeeds; held-past-deadline returns busy in bounded time * fix(test): format daemon/cli sources and pin contention budgets in tests - cargo fmt over the rendering/grace-period changes (CI Format check) - ordinary_read_timeout pins ATOMIC_DB_LOCK_WAIT_MS so the test measures the bound rather than the 30s default budget - corruption-failure deadline raised for slow process startup on loaded machines (a contention wait would be 30s, so 20s still proves no wait happened) * fix(identity): resolve the default store under ATOMIC_CONFIG_DIR The intent-attest external-signer tests redirect the config area via ATOMIC_CONFIG_DIR and fail on Windows with 'identity not found' — dirs::home_dir() there resolves the profile known-folder, not HOME, so env redirection never applied. Resolve the identity store the same way atomic-config resolves config.toml (ATOMIC_CONFIG_DIR wins, then ~/.atomic), making the documented knob cover the whole config area.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
atomic view listnow renders views as an indented hierarchy following parent chains, and hides views with no changes of their own to keep the listing focused on active work.Details
- nameindented two spaces per level beneath its parent; roots at column 0; roots/siblings sorted alphabetically. The*current-view marker is preserved on its line.own_change_count) and no shown descendant and it is not the current view. Ancestors of shown views are pulled in so the hierarchy stays connected; the current view is always shown.N view(s) not shown because contained no changes. -a to view them.line.-a/--all: disables the filter; hierarchy layout applies in both default and--shortmodes.compute_visibility,tree_order,render_line,summary_line) with cycle-safe parent walking (visited set + leftover sweep, covered by tests).--remotelisting is intentionally unchanged (server-composed inventory, different change-count semantics).Testing
cargo test -p atomic-cli: 1863 passed, 0 failed (13 new tests covering tree layout, filtering, summary counts,-a, current-view exemption, missing-parent and parent-cycle safety).cargo clippy -p atomic-cliclean;cargo fmtapplied.