Skip to content

feat: add Turn into skill and Turn into automation to the Session menu - #2099

Open
Douglasymlai wants to merge 2 commits into
mainfrom
feat/session-turn-into
Open

Douglasymlai wants to merge 2 commits into
mainfrom
feat/session-turn-into

Conversation

@Douglasymlai

@Douglasymlai Douglasymlai commented Oct 23, 2026 •

Copy link
Copy Markdown
Contributor

Split out of #1958 so it can be reviewed on its own.

Problem

When a Task in a Session goes well, there is no quick way to reuse it. To turn it into a skill you have to write the skill-creator request yourself and paste in the original request and the result. To run it on a schedule you have to open Automations and retype the prompt. Both start from a blank page even though the Session already has everything needed.

Cause

The Session header menu only had Session actions (Pin, Rename, End, Delete). Nothing read the latest completed Task, and the Automation editor could only be prefilled with a plain prompt from the Session that was active when you saved.

Fix

  • The Session menu now starts with Turn into skill (wand icon) and Turn into automation (the Automation ⚡ icon), then a separator, then Pin / Rename / End / Delete as before.
  • Both items use the latest completed Task in the Session: its request and its final result. They stay in the menu but are disabled until a Task has finished with a result. This works in both the default chat view and the event timeline view.
  • Turn into skill puts an editable request for the bundled skill-creator skill into the message box: the original request and the result summary, asking for a reusable skill to review before saving. Nothing is sent. If the message box already has an unsent draft or attached files, the draft is kept and a "There is already an unsent draft." notice appears. If skill-creator is turned off, a notice says it is unavailable.
  • Turn into automation opens the Automation editor prefilled with the Task's request. If the result contains an automation-draft block, its name, description, prompt, schedule notes, required inputs and open questions are used too. The draft is only shown in the editor; nothing is created until you save.
  • The editor shows which Session the automation comes from and reminds you to check the schedule, because the editor picks a default schedule even when none was requested. Create stays disabled until you tick "I reviewed the schedule and required inputs."
  • The automation is saved for the Session you started from, even if you switch to another Session while the editor is open. Double-clicking Create no longer sends two requests.
  • Closing the menu to open the editor no longer moves focus back to the menu button behind the dialog.
  • New strings in chat.json, added at the end of all 11 locales: automation-draft-with-skill, create-automation-from-task, automation-skill-unavailable, automation-source-session, automation-schedule-review-hint, automation-review-confirm, automation-review-required.

The Narrative/Trajectory toggle stays where it is in the header for now.

Testing

In the app (macOS, in both the default chat view and the experimental timeline view):

  • With a finished Task, the Session menu shows Turn into skill and Turn into automation first, with the wand and ⚡ icons. Before the first Task has a result, both are disabled.
  • Turn into skill:
    • Fills the message box with an editable skill-creator request (original request + result) and sends nothing.
    • With an unsent draft already there, the draft is kept and the notice appears.
    • With skill-creator turned off, the "unavailable" notice appears.
  • Turn into automation:
    • Opens the editor with the request prefilled, the source Session named and the schedule hint shown. When the result contains an automation-draft block, its name, prompt, schedule notes, inputs and questions are filled in too.
    • Create stays disabled until the review box is ticked. A double-click on Create made exactly one automation, which was then deleted.
  • Keyboard: Enter / arrow keys / Enter opens the editor from the menu. Escape closes it and returns focus to the Session title (this was broken at first and is fixed in this PR).
  • Light and dark themes and German were checked; text fits and is translated.
  • Not checked in the app: switching to another Session while the editor is open, because the dialog blocks the sidebar. This is covered by an automated test.

Automated:

  • Vitest on Session, Trigger, ChatBox, automationDraft, pageTabStore and useSessionPageTabStore: all pass. New tests cover:
    • menu order and the disabled state;
    • the skill request contents and keeping an existing draft;
    • choosing the latest completed Task in both views;
    • automation-draft parsing and rejection;
    • the editor prefill and staying on the source Session;
    • the review gate and the single Create;
    • focus returning on Escape.
  • npm run type-check, npm run check:i18n, npm run check:design-tokens, ESLint and Prettier on changed files: pass.

Testing Evidence

  • I have included human-verified testing evidence in this PR.
  • This PR includes frontend/UI changes, and I attached screenshot(s) or screen recording(s). (screenshots to be attached)
  • No frontend/UI changes in this PR.

@Douglasymlai Douglasymlai self-assigned this Oct 24, 2026
@Douglasymlai
Douglasymlai marked this pull request as ready for review October 24, 2026 14:41

@claude claude Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Claude Code Review

Claude Code Review is paused for this repository because its GitHub organization is not linked to your Claude organization.

To turn it back on, one person needs both roles: owner of the GitHub organization (or the account owner, for a personal repository) and admin or owner of your Claude organization. If that is not you, pass this on to someone who is.

Open Organization settings, Git providers and click Link next to the GitHub organization's name. If it is not listed, click Enable GitHub integration or Connect your GitHub first, whichever the page shows.

New pull requests are then reviewed as before. To get a review on one that is already open, someone with write access can comment @claude review.

Tip: disable this comment in your organization's Code Review settings.

This branch has not been deployed

No deployments
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