feat: add alera workspace section cli commands - #804
Merged
Merged
Conversation
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.
Contributor
There was a problem hiding this comment.
ℹ️ 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/removetalk to a live host when one is connected and otherwise writeRuntimeStore, matchingworkspace pin. Clear sends"sectionId": null, which the host requires. - Add and start flags.
--sectionresolves a unique case-insensitive name before create and fails closed when the name is missing or ambiguous.--section-idis currently passed through without that lookup. - Docs and tests. Skill +
docs/workspace-storage.mdcover the new verbs; clap, name resolution, null clear payload, and host-vs-store backend are tested. Protocol version is unchanged.
ℹ️ Nitpicks
workspace add --jsonstill prints the pre-assign create payload, so a successful--sectionassignment does not show up in JSON (unlikeworkspace start, which addssectionIdto the envelope).
Grok | 𝕏
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.
Contributor
There was a problem hiding this comment.
✅ 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-idstill assigns atsetForWorkspace. - Tests.
require_section_idand a live-list RPC test cover the fail-closed path; section tests moved toworkspace_sections_tests.rs.
Grok | 𝕏
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
Add
alera workspace sectionso the CLI can list, create, assign, clear, and remove workspace sections through the existingworkspaceSectionsV1host verbs. Optional--section/--section-idonworkspace addandworkspace startland a new worktree in a section in one step (default unset).--sectionresolves by case-insensitive unique name fromsection listand fails closed when the name is missing or ambiguous. Commands prefer a live host RPC and fall back toRuntimeStorewhen no host is connected, matchingworkspace pin. The in-repoalera-cliskill documents the commands. Protocol version is unchanged.Validation
cargo fmt -p alera-clicargo clippy -p alera-cli --all-targets -- -D warningscargo test -p alera-cli workspace_section(clap/help, name resolution, nullsectionIdon clear, host vs store fallback)alera workspace --json section listreturned kindworkspaceSections, andalera workspace section set --section Aleraassigned 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 Iconsis not present in this runtime.Risks
workspace add/startresolve a section then fail while assigning after create, the worktree already exists and stays unsectioned with a non-zero exit.