Allow new-client setup in any folder without a .lily file #69

Merged
parkerhdavis merged 1 commit from allow-client-in-nonempty-folder into main 2026-06-16 14:27:37 -06:00
parkerhdavis commented 2026-06-16 14:27:32 -06:00 (Migrated from github.com)

Problem

A client could only be set up in a folder with no subfolders. The library tree routed any folder-with-children to an expand-only node, so a folder that already held, e.g., an onboarding-documents subfolder couldn't be selected to create a .lily. The backend never enforced an empty-folder rule — this was purely an artifact of the tree rendering.

Changes

  • Tree picker: every non-client folder is now selectable for setup, mirroring the dual affordance client rows already use — clicking the row opens the Create Client panel, and the chevron (shown only when there are subfolders) expands/collapses. The only gate is the existing is_client check, i.e. no .lily already present in that folder.
  • "Open Folder…" header button (renamed from "Open Client Folder"): now create-aware. An OS-picked folder can live outside the library and be absent from the loaded tree, so it checks has_lily_file directly — opening the folder if it's already a client, or routing into the same Create Client flow if not, instead of silently showing an empty content pane.
  • The pending-setup selection state is lifted to ClientsHub so both entry points feed one create flow.

No backend changes; has_lily_file and create_lily_file already existed.

Verification

make typecheck, make lint (Biome + clippy), and make test (96 passed) all green.

## Problem A client could only be set up in a folder with no subfolders. The library tree routed any folder-with-children to an expand-only node, so a folder that already held, e.g., an onboarding-documents subfolder couldn't be selected to create a `.lily`. The backend never enforced an empty-folder rule — this was purely an artifact of the tree rendering. ## Changes - **Tree picker:** every non-client folder is now selectable for setup, mirroring the dual affordance client rows already use — clicking the row opens the Create Client panel, and the chevron (shown only when there are subfolders) expands/collapses. The only gate is the existing `is_client` check, i.e. no `.lily` already present in that folder. - **"Open Folder…" header button** (renamed from "Open Client Folder"): now create-aware. An OS-picked folder can live outside the library and be absent from the loaded tree, so it checks `has_lily_file` directly — opening the folder if it's already a client, or routing into the same Create Client flow if not, instead of silently showing an empty content pane. - The pending-setup selection state is lifted to `ClientsHub` so both entry points feed one create flow. No backend changes; `has_lily_file` and `create_lily_file` already existed. ## Verification `make typecheck`, `make lint` (Biome + clippy), and `make test` (96 passed) all green.
Sign in to join this conversation.
No reviewers
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
parker/lily!69
No description provided.