Skip to content

feat(automations): allow project-less session automations - #6280

Merged
Kitenite merged 2 commits into
optional-project-nestingfrom
automation-sessions
Aug 9, 2026
Merged

Kitenite merged 2 commits into
optional-project-nestingfrom
automation-sessions

Conversation

@Kitenite

@Kitenite Kitenite commented Aug 9, 2026 •

Copy link
Copy Markdown
Member

Summary

Stacked on #6274 (sessions). Automations can now run without a project, completing the "no project = session" convention across every creation surface (desktop, CLI, MCP, SDK — and now scheduled runs).

Session automation = no project and no workspace pin. Each run creates a project-less session workspace on the target host via workspaces.createSession (managed folder under ~/.superset/sessions), then launches the agent exactly as before — agents.run was already project-agnostic. Pinning an existing session workspace also works now.

Changes

Cloud

  • automations.v2_project_id → nullable (migration 0064, single DROP NOT NULL; the FK was already dropped in 0062)
  • automation.create: the denormalized pin path requires only v2WorkspaceId + targetHostId — a null project means a session pin; the "v2ProjectId required" throw is gone (omit both = session mode)
  • automation.update: explicit v2ProjectId: null switches to session mode (and clears any pin); undefined keeps the project
  • dispatch.ts: null project relays workspaces.createSession (host dedupes the folder name per run) instead of workspaces.create; no branch computation. Stale-pin recovery falls back to the same path.

Desktop

  • Automation ProjectPicker: "No project (session)" option
  • WorkspacePicker: with no project selected it lists the host's session workspaces; "New workspace" copy becomes "New session"
  • Create dialog: tri-state selection (unchosen → auto-default first project; explicit "No project" respected); prompt file-search degrades gracefully (no project to search)
  • List rows + sort show "Session" instead of "—"

CLI / MCP / SDK

  • automations create: --project optional — omit both --project and --workspace for session mode; session workspaces accepted as --workspace targets (previous hard rejection removed)
  • automations update: new --session flag (clears project + pin)
  • MCP tool schemas + SDK types widened with session-mode docs

Notes

  • Old pre-denormalization clients pinning cloud workspaces still resolve via the legacy verifyWorkspaceInOrg branch, unchanged.
  • Deploy ordering: cloud/API must deploy before this desktop build goes out (standard).

Testing


Summary by cubic

Enable session automations: automations can now run with no project and no workspace pin. Each run creates a project-less session workspace on the target host.

  • New Features

    • Cloud/API: automations.v2_project_id is nullable (migration 0064); automation.create/update accept v2ProjectId: null; denormalized pins no longer require a project.
    • Dispatch: when v2ProjectId is null, runs call workspaces.createSession; session workspaces can be pinned.
    • Desktop: ProjectPicker adds “No project (session)”; WorkspacePicker lists session workspaces and shows “New session”; create dialog supports tri-state; automation lists show “Session”.
    • CLI: automations create makes --project optional (omit with no --workspace for session mode); automations update adds --session; session workspaces are valid --workspace targets.
    • MCP/SDK: schemas/types allow nullable v2ProjectId; docs clarify session pins require targetHostId and unpinning to session mode sends v2WorkspaceId: null.
  • Bug Fixes

    • Update flow skips legacy cloud-table resolution for retained pins to avoid “Workspace not found” on session-pinned automations.
    • CLI: validate --session conflicts before toggling enabled, preventing partial updates.
    • Desktop: WorkspacePicker shows neutral copy while no project is chosen (pre-default), not session mode.

Written for commit 34bf7f3. Summary will update on new commits.

Review in cubic

No project and no workspace pin = session mode: each run creates a
project-less session workspace via workspaces.createSession (same
convention as workspaces.create). Session workspaces can also be pinned.

- cloud: automations.v2_project_id nullable (migration 0064), create/update
  router accepts null project, denormalized pin no longer requires one
- dispatch: null project relays workspaces.createSession instead of
  workspaces.create (no branch computation)
- desktop: 'No project (session)' option in automation ProjectPicker,
  session workspaces pickable in WorkspacePicker, 'Session' fallback in
  list rows
- cli: --project optional on automations create, --session flag on update,
  session workspaces accepted as --workspace targets
- mcp/sdk: nullable v2ProjectId with session-mode docs
@coderabbitai

coderabbitai Bot commented Aug 9, 2026 •

Copy link
Copy Markdown
Contributor

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: ec00af87-3bc8-483f-9895-3f40c293d103

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@github-actions

github-actions Bot commented Aug 9, 2026 •

Copy link
Copy Markdown
Contributor

🧹 Preview Cleanup Complete

The following preview resources have been cleaned up:

  • ✅ Neon database branch

Thank you for your contribution! 🎉

@cubic-dev-ai cubic-dev-ai 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.

All reported issues were addressed across 19 files

Reply with feedback, questions, or to request a fix.

Re-trigger cubic

…lidation order, picker tri-state

- update: skip legacy cloud-table resolution for retained pins (renaming a
  session-pinned automation returned 'Workspace not found'); only resolve
  when the caller changes the pin
- cli: validate --session conflicts before setEnabled mutates state
- WorkspacePicker: undefined projectId (pre-default loading) renders neutral
  copy instead of session mode
- dispatch: drop dead branchName from createWorkspaceOnHost return
- mcp/sdk: document that session pins need targetHostId and unpinning to
  session mode needs v2WorkspaceId: null
@Kitenite
Kitenite merged commit 50dd992 into optional-project-nesting Aug 9, 2026
19 checks passed
Kitenite added a commit that referenced this pull request Aug 9, 2026
* feat(host-service): project-less session workspaces (nullable projectId, createSession, guarded destroy)

* feat(desktop): Sessions sidebar section, session create/delete UX, nullable projectId plumbing

* feat(cli,mcp,sdk): omit projectId to create a project-less session workspace

* feat(desktop): nestable sidebar groups with session-scope trees and cycle-safe re-parenting

* fix(desktop): honor session mode in new-workspace page route and hide repo-only affordances

* fix: address review findings — migration FK hazard, session idempotency, tree depth enforcement, shortcut coverage

* fix(desktop): expand full collapsed ancestor chain on hotkey reveal; clear repo draft state on session preselect

* fix: session hotkey reveal for session groups, CI git identity for session tests, review polish

* fix(host-service): inline git identity in session test commit for CI runners

* feat(desktop): move Sessions section above Projects with an always-visible new-session button

* fix(desktop): workspaces-list collapse hides session rows while the Sessions header stays

* fix(desktop,host-service): bulk-select nested-group workspaces; clean up session folder on insert race

* fix(host-service): best-effort session folder cleanup must not mask insert errors

* fix(host-service): async rm in session insert-failure cleanup (main-loop guardrail)

* refactor(desktop): extract nested grouping tree to a stacked PR, restore flat sections

* feat(desktop): show jump-shortcut badges on session sidebar rows

* feat(automations): allow project-less session automations (#6280)

* feat(automations): allow project-less session automations

No project and no workspace pin = session mode: each run creates a
project-less session workspace via workspaces.createSession (same
convention as workspaces.create). Session workspaces can also be pinned.

- cloud: automations.v2_project_id nullable (migration 0064), create/update
  router accepts null project, denormalized pin no longer requires one
- dispatch: null project relays workspaces.createSession instead of
  workspaces.create (no branch computation)
- desktop: 'No project (session)' option in automation ProjectPicker,
  session workspaces pickable in WorkspacePicker, 'Session' fallback in
  list rows
- cli: --project optional on automations create, --session flag on update,
  session workspaces accepted as --workspace targets
- mcp/sdk: nullable v2ProjectId with session-mode docs

* fix(automations): address cubic review — retained-pin updates, CLI validation order, picker tri-state

- update: skip legacy cloud-table resolution for retained pins (renaming a
  session-pinned automation returned 'Workspace not found'); only resolve
  when the caller changes the pin
- cli: validate --session conflicts before setEnabled mutates state
- WorkspacePicker: undefined projectId (pre-default loading) renders neutral
  copy instead of session mode
- dispatch: drop dead branchName from createWorkspaceOnHost return
- mcp/sdk: document that session pins need targetHostId and unpinning to
  session mode needs v2WorkspaceId: null
Kitenite added a commit that referenced this pull request Aug 12, 2026
* docs: weekly update for PRs merged 2026-08-05 to 2026-08-12

- workspaces: sessions (project-less workspaces, #6274), pin + drag-and-drop
  pinning (#6364), list/board views with Merged & Deleted history columns
  (#6296), per-project naming instructions (#6250), multi-PR links per
  branch with remove/restore (#5924)
- automations: session automations (#6280), list health stats + Up next
  grouping + read-only team automations (#6291, #6276), detail page
  Settings/Run History tabs, inline run errors, would-run preview, RRule
  validation (#6305)
- editor: image pane pan/pinch/zoom (#6285)
- tasks: multi-repo filters, expanded task states, PR author/review
  filters, PR checks (#6201)
- monorepos: per-project sparse checkout (#6034)
- customization: project icon + color picker, v1 color carry-over (#6249)
- terminal presets: built-in Superset CLI preset (#6270)
- agents: resume interrupted sessions + Resume Args setting (#6253, #6265),
  Superset hooks toggle + scoping (#6072)
- cli: interactive command browser + branded help (#6273); reference
  updated for session mode, --task, --skip-branch-prefix, --session
  (verified against packages/cli/src/commands)

* docs: tighten wording and drop em dashes

Shorten this week's additions per the writing guide: one thought per
sentence, plainest word, no em dashes as prose punctuation. Also sweeps
the three pre-existing em dashes in recipes.

* docs: add screenshots from the 08-09 changelog batch

cli command browser, agent resume banner, PR view with checks, and the
project icon/color picker. Copied into apps/docs/public/images per the
SOP rather than referenced across apps.

This branch was previously deployed

1 inactive deployment
preview — 34bf7f37 Deployed Aug 9, 2026 by Kitenite via Deploy API #7300
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