add enabled field on projects to disable without losing config#23
Merged
Conversation
Optional `"enabled": boolean` on `projects[]` entries (default true, mirroring `tools.<name>.enabled`). When false, reconcile tears down the materialized infrastructure — bare mirror for distroProject, per-project bin dir for hostProject, every session of the project, plus any host fstab entries those sessions contributed — but the profile entry stays intact so `tabColor`, `defaultBranch`, `hostShadows`, etc. survive. Re-enable later and the next reconcile recreates everything. - modules/Profile.psm1: Test-ProjectEnabled helper (mirrors Test-ToolEntryEnabled), enabled-aware Get-ProjectsDiff that splits desired into enabled/disabled before computing add/remove, validation that `enabled` is a boolean. - modules/Projects.psm1: Set-ProjectEnabledInProfile helper for the dashboard toggle action; preserves %ENV% tokens via Read-Profile -Raw. - claudearium.ps1: project dashboard gains a `t <n>` toggle action. Invoke-ProjectsApply's `remove` branch now runs per-session Remove-HostSession when the disabled entry is still in the profile (so Windows-side worktrees aren't orphaned) and refreshes fstab via Invoke-MergedMountsApply when any host teardown happened. - claudearium.ps1: Invoke-Reconcile honors -Force to bypass the apply prompt, making scripted reconcile runs (CI / tests / power users) practical. The rendered diff still prints first. - Tests: 4 new pure diff cases, 2 validation cases, 1 Test-ProjectEnabled unit test, plus a distro round-trip that adds → disables → reconciles → asserts mirror gone + profile entry survives → re-enables → reconciles → asserts mirror back. - Docs: usage.md (dashboard `t`, disable semantics), cookbook.md (recipe), design-decisions.md §23 (why disable preserves config, why it removes sessions, why reconcile still prompts). Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
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.
Summary
"enabled": booleanonprojects[]entries (defaulttrue, mirroringtools.<name>.enabled). Whenfalse,reconciletears down the materialized infrastructure (bare mirror or per-project bin dir + every session + any host fstab entries) but the profile entry survives sotabColor/defaultBranch/hostShadowsetc. are preserved. Re-enable and reconcile to recreate.projectdashboard gainst <n>toggle.Invoke-Reconcilehonors-Forceso scripted reconciles can apply without the interactive prompt.Invoke-ProjectsApplyproperly tears down per-session host worktrees in the disable case (where the profile entry is still around withhostCheckout), so Windows-side worktrees aren''t orphaned.Test plan
.\test-claudearium.ps1 -ParseCheck(67 files clean).\test-claudearium.ps1 -Auto -Only pure -CI(350/350, +9 new)projectdashboardt <n>flips the Enabled column and prompts to run reconcile🤖 Generated with Claude Code