Skip to content

feat(setup): report the resolved Flock config in setup --check - #31

Closed
abeljim8am wants to merge 1 commit into
feat/selector-empty-statefrom
feat/setup-check-flock-config
Closed

feat(setup): report the resolved Flock config in setup --check#31
abeljim8am wants to merge 1 commit into
feat/selector-empty-statefrom
feat/setup-check-flock-config

Conversation

@abeljim8am

Copy link
Copy Markdown
Owner

Stacked on #30#29#28#27. Review those first; this PR's diff is only the Phase 4 commit.

This completes the out-of-the-box plan.

Why

setup --check listed the directories Flock searches but not what it resolved. So the questions that actually go wrong needed a live session and a dump-layout to answer — which is precisely what made verifying #27 and #29 by hand awkward:

  • which layout won?
  • did the flock { } section reach the plugins?
  • will bare flock open the selector?

It now reports all three:

[STARTUP LAYOUT]: built-in "flock"
[SELECTOR ON STARTUP]: yes
[PROJECT ROOT DIRS]: "~/src", "~/work"
[PROJECT INDIVIDUAL DIRS]: none
[REMOTE PROVIDERS]: devcontainers, ssh
[FLOCK PLUGIN ALIASES]: flock-selector, flock-sidebar

[STARTUP LAYOUT] distinguishes a built-in from one of your own layout files by path, so "why am I not getting my default.kdl" is answerable without starting a session.

Deliberately loud, not terse

Configuration that silently does nothing is the recurring failure mode in this area, so three cases get an explanation rather than a value:

[PROJECT ROOT DIRS]: none
[PROJECT INDIVIDUAL DIRS]: none
 No project folders are configured, so the selector's project list is empty.
 Flock does not search your filesystem for them. Set them in the 'flock' section
 of your config file, eg: flock { root_dirs "~/src" }

Likewise the selector being opted out (naming flock pick as the way back), and a missing flock plugin alias — which would make the whole flock { } section inert for that plugin.

On that last case: it cannot be reached by editing config.kdl, because alias merging can override an entry but never remove one. I kept it anyway because plugin_aliases_with_flock_defaults is public API and a Config in that state silently ignores the section — but I unit-tested it rather than leaving unreachable, untested code in place.

The other two Phase 4 items

Both had already landed in the earlier phases, and I verified that rather than assuming it:

  • the README no longer teaches the old arg-pasting shape (0 matches for flock-selector location= / codespaces_enabled "true");
  • setup --dump-config does emit the documented flock { } block.

The README now also points at setup --check, and the plan doc records the two as done.

Verification

  • cargo xtask test — 2376 passing, 0 failures. cargo xtask format --check clean. No snapshot churn and no plugin-asset changes (nothing in a plugin changed).
  • 5 new unit tests over the report: layout reported as built-in vs. by path, the loud empty-folders guidance, configured folders/providers (including that a provider set to false is not listed as enabled, and that the nag disappears once folders are set), the selector opt-out naming flock pick, and the missing-alias warning.
  • Ran against the built binary for both shapes — unconfigured, and a config dir with folders + providers + selector_on_startup false + its own layouts/default.kdl, confirming [STARTUP LAYOUT] reports that file by path.

🤖 Generated with Claude Code

`setup --check` listed the directories Flock searches but not what it resolved,
so the questions that actually go wrong needed a live session and a dump-layout to
answer: which layout won, whether the flock { } section reached the plugins, and
whether bare flock will open the selector. It now reports:

    [STARTUP LAYOUT]: built-in "flock"
    [SELECTOR ON STARTUP]: yes
    [PROJECT ROOT DIRS]: "~/src", "~/work"
    [PROJECT INDIVIDUAL DIRS]: none
    [REMOTE PROVIDERS]: devcontainers, ssh
    [FLOCK PLUGIN ALIASES]: flock-selector, flock-sidebar

[STARTUP LAYOUT] distinguishes a built-in from one of the user's own layout files
by path, so "why am I not getting my default.kdl" is answerable without starting
a session — the exact thing that made verifying the layout-fallback work awkward.

Configuration that silently does nothing is the recurring failure mode in this
area, so the report is deliberately loud rather than terse in three cases: no
project folders configured (with the consequence and the fix), the selector opted
out of startup (naming `flock pick` as the way back), and a missing flock plugin
alias, which makes the whole flock { } section inert for that plugin.

That last case cannot be reached by editing config.kdl — alias merging can
override an entry but never remove one — but it is reachable through the public
plugin_aliases_with_flock_defaults, so it is reported rather than left to be
discovered, and unit-tested rather than left as dead code.

Completes the out-of-the-box plan: the README rewrite and the documented
flock { } block in default.kdl landed in the earlier phases, verified here rather
than assumed.
@abeljim8am
abeljim8am force-pushed the feat/setup-check-flock-config branch from b15b4fa to 51580c0 Compare August 4, 2026 15:34
@abeljim

abeljim commented Aug 22, 2026

Copy link
Copy Markdown
Collaborator

Superseded by mega PR #35

@abeljim abeljim closed this Aug 22, 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.

2 participants