Skip to content

feat: add alera workspace section cli commands - #804

Merged
leynier merged 2 commits into
mainfrom
feat/cli-workspace-sections
Sep 17, 2026
Merged

leynier merged 2 commits into
mainfrom
feat/cli-workspace-sections

Conversation

@leynier

@leynier leynier commented Sep 17, 2026

Copy link
Copy Markdown
Owner

Summary

Add alera workspace section so the CLI can list, create, assign, clear, and remove workspace sections through the existing workspaceSectionsV1 host verbs. Optional --section / --section-id on workspace add and workspace start land a new worktree in a section in one step (default unset).

--section resolves by case-insensitive unique name from section list and fails closed when the name is missing or ambiguous. Commands prefer a live host RPC and fall back to RuntimeStore when no host is connected, matching workspace pin. The in-repo alera-cli skill documents the commands. Protocol version is unchanged.

Validation

  • cargo fmt -p alera-cli
  • cargo clippy -p alera-cli --all-targets -- -D warnings
  • cargo test -p alera-cli workspace_section (clap/help, name resolution, null sectionId on clear, host vs store fallback)
  • Local smoke check against the live runtime host (not CI): alera workspace --json section list returned kind workspaceSections, and alera workspace section set --section Alera assigned these workspaces by name: Mobile Prompted Agent Launch, Mobile PR Agent Actions, Mobile Diff Agent Comments, Mobile PR Remove Workspace, Mobile Ship Clean Tree, Watch Dispatch No Focus Steal, and this CLI workspace. Mobile New Tab Agent Icons is not present in this runtime.

Risks

  • If workspace add / start resolve a section then fail while assigning after create, the worktree already exists and stays unsectioned with a non-zero exit.
  • Store fallback can update sections while the UI is disconnected; connected clients refresh on the next host mutation broadcast.

Expose workspaceSectionsV1 through alera workspace section list/create/set/clear/remove, with optional --section flags on add and start. Prefer a live host RPC and fall back to the runtime store, matching pin.

@pullfrog pullfrog Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ℹ️ No critical issues — minor suggestions inline.

Reviewed changes CLI coverage for the existing workspaceSectionsV1 host verbs, plus optional section assignment on workspace add / start.

  • Section subcommands. list / create / set / clear / remove talk to a live host when one is connected and otherwise write RuntimeStore, matching workspace pin. Clear sends "sectionId": null, which the host requires.
  • Add and start flags. --section resolves a unique case-insensitive name before create and fails closed when the name is missing or ambiguous. --section-id is currently passed through without that lookup.
  • Docs and tests. Skill + docs/workspace-storage.md cover the new verbs; clap, name resolution, null clear payload, and host-vs-store backend are tested. Protocol version is unchanged.

ℹ️ Nitpicks

  • workspace add --json still prints the pre-assign create payload, so a successful --section assignment does not show up in JSON (unlike workspace start, which adds sectionId to the envelope).

Pullfrog  | Fix all ➔Fix 👍s ➔View workflow run | Using Grok𝕏

Comment thread rust/alera-cli/src/workspace_sections.rs Outdated
Check --section-id against workspaceSection.list on add and start so an unknown id or a host that cannot list sections fails before the worktree exists.

@pullfrog pullfrog Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ No new issues found.

Reviewed changes --section-id on workspace add / start now fails closed against workspaceSection.list before create, matching --section names.

  • Id pre-check. Unknown ids and hosts that cannot list sections abort before the worktree exists. workspace section set --section-id still assigns at setForWorkspace.
  • Tests. require_section_id and a live-list RPC test cover the fail-closed path; section tests moved to workspace_sections_tests.rs.

Pullfrog  | View workflow run | Using Grok𝕏

@leynier
leynier merged commit efc5d30 into main Sep 17, 2026
20 checks passed
@leynier
leynier deleted the feat/cli-workspace-sections branch September 17, 2026 07:35
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