Skip to content

fix(flock): close the gaps the out-of-the-box stack left open - #32

Closed
abeljim8am wants to merge 1 commit into
feat/setup-check-flock-configfrom
fix/setup-stack-review-fixes
Closed

fix(flock): close the gaps the out-of-the-box stack left open#32
abeljim8am wants to merge 1 commit into
feat/setup-check-flock-configfrom
fix/setup-stack-review-fixes

Conversation

@abeljim8am

Copy link
Copy Markdown
Owner

Review fixes on top of the out-of-the-box setup stack (#27#31). Five issues, found by a review pass over the stack; the first two are release blockers.

Selector-created sessions actually get the flock layout (high, #27)

The selector opens a project with LayoutInfo::File("flock"). The server pinned that name to the client's layout dir unconditionally, producing <layout_dir>/flock — a path that does not exist on a fresh install. The built-in-asset fallback only matches bare names, so resolution failed, and CliAssets::load_config_and_layout swallowed the error and silently fell back to the plain upstream layout: no sidebar, no way back to the selector, on exactly the fresh-install flow the stack exists to fix. It looked fine before #27 only because the old default "default" made the erroneous fallback coincide with the intended layout.

ConnectToSession::apply_layout_dir now pins a name to the layout dir only when the file is really there. A bare built-in name survives to the new session and resolves to the bundled asset; a user's own layouts/flock.kdl still wins. Unit-tested both ways.

flock pick loses its p alias (high, #29)

p already meant flock plugin. clap 3 does not reject the duplicate — the first-declared variant wins — so flock p -- <url> stopped loading plugins and --help advertised the same alias on two subcommands. pick has no short alias now.

Bare flock inside the picker session answers instead of panicking (medium, #29)

From a pane inside the flock-selector session itself, the selector rewrite became an attach-to-self, which is a panic! deeper in the attach branch. The default entrypoint now explains you are already in the picker and exits cleanly.

setup --check reads the config the selector actually receives (medium, #31)

The folders/providers/session-layout report read only the flock { } section, but the runtime merges that section underneath the flock-selector alias body, where anything the body states wins. A selector configured the pre-section way — args on the alias — was reported as unconfigured, complete with a false "your project list is empty" warning, and ssh_enabled on the alias could be reported backwards. The check now reads the same merged projection the plugin thread is handed, parsed exactly the way the plugin parses it.

The empty-state hint gives advice that works (medium, #30)

"then reopen the selector" was the one thing that does not work: plugin configuration is read when a session starts, so inside a running session, editing config.kdl and reopening the picker shows the identical empty state. The hint now says to start flock afresh and why. While in there: render_row claimed to truncate overflowing spans but emitted them whole, letting long hint/wizard lines wrap into the row below and scroll short panes out of place — it truncates to the pane width now (with tests), and the wizard narrow-pane test assertions are updated to the truncated reality.

CHANGELOG: adds an entry for these fixes, corrects the #27 entry that contradicted itself about default_layout (it stays unset; flock is a fallback), and notes that selector-created sessions previously followed your own layouts/default.kdl — with flock { session_layout "default" } as the way to keep that.

The flock-selector.wasm asset is rebuilt for the plugin changes.

🤖 Generated with Claude Code

- pin a selector session layout to the layout dir only when the file is
  really there, so a bare built-in name like "flock" survives to the new
  session and resolves to the bundled asset instead of silently falling
  back to the plain default layout on fresh installs
- drop `pick`'s `p` alias, which collided with `plugin`'s pre-existing one
  and broke `flock p -- <url>`
- answer instead of panicking when bare `flock` runs inside the picker
  session itself
- make `setup --check` read folders, providers and session layout from the
  merged alias projection the selector actually receives, not the
  `flock { }` section alone
- correct the empty-state hint ("start flock again", not "reopen the
  selector") and truncate overflowing rows to the pane width instead of
  wrapping into the row below

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@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