Skip to content

refactor: tighten config ownership and reduce daemon/TUI overhead#16

Merged
jleni merged 4 commits intodevfrom
codex/dev-nix-followups
Mar 21, 2026
Merged

refactor: tighten config ownership and reduce daemon/TUI overhead#16
jleni merged 4 commits intodevfrom
codex/dev-nix-followups

Conversation

@jleni
Copy link
Copy Markdown
Member

@jleni jleni commented Mar 20, 2026

Summary

This follow-up started as a Nix/module fix, then expanded into a small architecture cleanup for configuration ownership and long-lived daemon/TUI overhead.

  • make services.kache self-contained by defaulting the package from the module itself instead of requiring the overlay to be applied separately
  • export KACHE_CONFIG globally so wrapper-mode builds and the daemon share one generated config path
  • make raw config load/save and the config TUI honor the resolved config path so editing and runtime use the same authority
  • restore coherent clean_incremental behavior with a SQLite-backed registry of tracked incremental dirs instead of walking from daemon cwd
  • keep tracing logs out of alternate-screen terminal UIs while preserving file logging
  • let the daemon reuse a persistent Store handle instead of reopening SQLite on each request path
  • avoid fetching and serializing full store entry lists in the monitor unless the Store tab is active

Architecture Notes

The main design change is tightening ownership boundaries:

  • the module now owns package/config wiring instead of depending on external overlay or per-process drift
  • the daemon now behaves like a long-lived process with reused store state instead of a stateless SQLite client
  • the monitor now requests heavy entry data only when the active view needs it

Testing

  • cargo fmt
  • cargo test

@jleni jleni changed the title fix(nix): make module self-contained and restore tracked incremental GC refactor: tighten config ownership and reduce daemon/TUI overhead Mar 21, 2026
@jleni jleni merged commit 0cdde73 into dev Mar 21, 2026
2 checks passed
@jleni jleni deleted the codex/dev-nix-followups branch March 21, 2026 09:49
@jleni jleni mentioned this pull request Mar 30, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant