Desktop app that records your on-screen work session and uses the GitHub Copilot SDK to reconstruct it as an intent + ordered steps, then builds a reusable Skill or Automation for Microsoft Autopilots like Scout, Microsoft Copilot Cowork, or Copilot Studio.
TypeScript agent-skillsai-agentsautomationcopilotcopilot-clicopilot-coworkcopilot-studioelectronmicrosoft-scoutscreen-recording
Make session status legible: flag un-analyzed, open skills as skills
adileib81ee431c451
diff --git a/src/App.css b/src/App.cssindex 85af0e8..4ed13da 100644--- a/src/App.css+++ b/src/App.css@@ -257,6 +257,15 @@ button:focus-visible,animation: pulse 1.4s ease-in-out infinite;}+.tag.new {+ color: var(--rec); /* new recording, waiting to be analyzed — the one thing to act on */+}++.tag.new::before {+ background: var(--rec);+ box-shadow: 0 0 6px rgba(var(--rec-rgb), 0.55);+}+/* =========================================================================Recorder HUD (compact window)========================================================================= */@@ -537,6 +546,45 @@ button:focus-visible,transform: translateX(2px);}+/* A recording is waiting to be analyzed: draw the eye to the one next step. */+.sessions-open.has-new {+ background: rgba(var(--rec-rgb), 0.05);+ box-shadow: inset 0 0 0 1px rgba(var(--rec-rgb), 0.32);+}++.sessions-open.has-new:hover {+ background: rgba(var(--rec-rgb), 0.08);+ box-shadow: inset 0 0 0 1px rgba(var(--rec-rgb), 0.32), 0 7px 18px -6px rgba(var(--rec-rgb), 0.28);+}++.sessions-open.has-new .sessions-open-icon {+ color: var(--rec);+}++.sessions-open-label {+ display: inline-flex;+ align-items: center;+ gap: 7px;+}++.sessions-open-flag {+ font-family: var(--mono);+ font-size: 8.5px;+ font-weight: 700;+ letter-spacing: 0.09em;+ text-transform: uppercase;+ color: #fff;+ background: var(--rec);+ border-radius: 999px;+ padding: 2px 6px 1px;+ line-height: 1;+}++.sessions-open-sub.is-new {+ color: var(--rec);+ font-weight: 600;+}+.doctor {display: flex;flex-direction: column;diff --git a/src/Library.tsx b/src/Library.tsxindex fd4065c..5e29dd6 100644--- a/src/Library.tsx+++ b/src/Library.tsx@@ -144,7 +144,9 @@ function SessionsList({<span className="tag an">analyzed</span>) : !s.processed ? (<span className="tag warn">processing</span>- ) : null}+ ) : (+ <span className="tag new">new</span>+ )}</div><div className="sess-intent">{s.analysis@@ -208,7 +210,9 @@ function AnalysisWorkspace({const [editing, setEditing] = useState(false);const [draftTitle, setDraftTitle] = useState("");const [draftIntent, setDraftIntent] = useState("");- const [building, setBuilding] = useState(false);+ // A recording that's already a skill opens straight to the skill; otherwise+ // it opens to the analysis, where "Create skill" starts the builder.+ const [building, setBuilding] = useState(summary.hasSkill);// Set while the user is deliberately canceling, so the aborted run's rejection// doesn't surface as an error toast.const canceled = useRef(false);@@ -307,11 +311,12 @@ function AnalysisWorkspace({setNotes((prev) => ({ ...prev, [stepId]: note }));}, []);- if (building && analysis) {+ if (building) {return (<SkillBuilderViewsessionId={sessionId}startedAt={summary.startedAt}+ hasSkill={summary.hasSkill}onClose={() => {setBuilding(false);void onChanged();@@ -484,7 +489,7 @@ function AnalysisWorkspace({/* --- Skill builder ------------------------------------------------------- */-type BuildPhase = "arch" | "planning" | "plan" | "creating" | "done";+type BuildPhase = "loading" | "arch" | "planning" | "plan" | "creating" | "done";const SOURCE_LABEL: Record<SkillPlan["inputs"][number]["source"], string> = {ask: "You provide it",@@ -495,13 +500,17 @@ const SOURCE_LABEL: Record<SkillPlan["inputs"][number]["source"], string> = {function SkillBuilderView({sessionId,startedAt,+ hasSkill,onClose,}: {sessionId: string;startedAt: number | null;+ hasSkill: boolean;onClose: () => void;}) {- const [phase, setPhase] = useState<BuildPhase>("arch");+ // If this recording is already a skill, hold on a spinner until we've loaded+ // it, so we never flash the architecture picker before jumping to the skill.+ const [phase, setPhase] = useState<BuildPhase>(hasSkill ? "loading" : "arch");const [architecture, setArchitecture] = useState<SkillArchitecture>("scout");const [plan, setPlan] = useState<SkillPlan | null>(null);const [statusLine, setStatusLine] = useState("");@@ -524,18 +533,22 @@ function SkillBuilderView({useEffect(() => {let live = true;void window.skillRecorder.getSkill(sessionId).then((s: BuiltSkill | null) => {- if (live && s?.exportedPath) {+ if (!live) return;+ if (s?.exportedPath) {setBuiltName(s.name);setExportedPath(s.exportedPath);setArchitecture(s.architecture);if (s.plan) setPlan(s.plan);setPhase("done");+ } else if (hasSkill) {+ // We expected a skill but couldn't load it; fall back to the picker.+ setPhase("arch");}});return () => {live = false;};- }, [sessionId]);+ }, [sessionId, hasSkill]);useEffect(() => {return window.skillRecorder.onSkillProgress((p: SkillBuildProgress) => {@@ -596,17 +609,29 @@ function SkillBuilderView({<section className="ws"><div className="ws-head"><div className="ws-titles">- <span className="eyebrow">Create skill</span>+ <span className="eyebrow">{phase === "done" ? "Skill" : "Create skill"}</span><span className="ws-when">{formatWhen(startedAt)}</span></div>- <button className="ghost" onClick={onClose} disabled={busy} title="Back to the analysis">- Close+ <button+ className="ghost"+ onClick={onClose}+ disabled={busy}+ title={phase === "done" ? "View this recording's analysis" : "Back to the analysis"}+ >+ {phase === "done" ? "Analysis" : "Close"}</button></div><div className="ws-body">{error && <div className="analysis-error">{error}</div>}+ {phase === "loading" && (+ <div className="status-line">+ <span className="spinner" />+ <span className="status-text">Opening the skill…</span>+ </div>+ )}+{phase === "arch" && (<div className="sb-arch"><p className="sb-lead">Which agent should run this skill?</p>@@ -722,9 +747,9 @@ function SkillBuilderView({<div className="sb-check" aria-hidden>✓</div>- <h2 className="sb-title">Skill exported</h2>+ <h2 className="sb-title">Skill ready</h2><p>- <code className="sb-slug">{builtName}</code> is ready for {archLabel(architecture)}.+ <code className="sb-slug">{builtName}</code> is built for {archLabel(architecture)}.</p>{exportedPath && <p className="sb-path">{exportedPath}</p>}</div>@@ -756,16 +781,13 @@ function SkillBuilderView({{phase === "done" && (<div className="ws-foot">- <span className="foot-status">Saved</span>+ <span className="foot-status">Skill created</span><div className="ws-foot-actions">{exportedPath && (- <button className="secondary" onClick={() => void window.skillRecorder.revealSkill(sessionId)}>+ <button className="record-cta" onClick={() => void window.skillRecorder.revealSkill(sessionId)}>Reveal file</button>)}- <button className="record-cta" onClick={onClose}>- Done- </button></div></div>)}diff --git a/src/Recorder.tsx b/src/Recorder.tsxindex 302eb98..1aec8da 100644--- a/src/Recorder.tsx+++ b/src/Recorder.tsx@@ -14,10 +14,12 @@ export function Recorder() {const [capture, setCapture] = useState<CaptureState | null>(null);const [elapsed, setElapsed] = useState(0);const [sessionCount, setSessionCount] = useState(0);+ const [pendingCount, setPendingCount] = useState(0);const refreshCount = useCallback(async () => {const list = await window.skillRecorder.listSessions();setSessionCount(list.length);+ setPendingCount(list.filter((s) => !s.analysis).length);}, []);useEffect(() => {@@ -28,6 +30,14 @@ export function Recorder() {return window.skillRecorder.onStatusChanged(setStatus);}, [refreshCount]);+ // The analyze step happens in the library window, so re-check how many+ // recordings still need analysis whenever the recorder regains focus.+ useEffect(() => {+ const onFocus = () => void refreshCount();+ window.addEventListener("focus", onFocus);+ return () => window.removeEventListener("focus", onFocus);+ }, [refreshCount]);+const recording = status?.state === "recording";const startedAt = status?.startedAt ?? null;const justSaved = !recording && status?.lastSession != null;@@ -95,7 +105,7 @@ export function Recorder() {{recording? `${status?.eventCount ?? 0} events captured`: justSaved- ? "Capture saved. Open Sessions to review"+ ? "Capture saved. Open Sessions to analyze": "Ready to capture"}</div></div>@@ -109,12 +119,14 @@ export function Recorder() {)}<button- className="sessions-open"+ className={`sessions-open ${pendingCount > 0 ? "has-new" : ""}`}onClick={openLibrary}aria-label={- sessionCount === 0- ? "Review sessions, nothing recorded yet"- : `Review sessions, ${sessionCount} recorded`+ pendingCount > 0+ ? `Review sessions, ${pendingCount} ready to analyze`+ : sessionCount === 0+ ? "Review sessions, nothing recorded yet"+ : `Review sessions, ${sessionCount} recorded`}><span className="sessions-open-icon" aria-hidden>@@ -142,11 +154,16 @@ export function Recorder() {</svg></span><span className="sessions-open-text">- <span className="sessions-open-label">Review sessions</span>- <span className="sessions-open-sub">- {sessionCount === 0- ? "No recordings yet"- : `${sessionCount} recording${sessionCount === 1 ? "" : "s"}`}+ <span className="sessions-open-label">+ Review sessions+ {pendingCount > 0 && <span className="sessions-open-flag">New</span>}+ </span>+ <span className={`sessions-open-sub ${pendingCount > 0 ? "is-new" : ""}`}>+ {pendingCount > 0+ ? `${pendingCount} ready to analyze`+ : sessionCount === 0+ ? "No recordings yet"+ : `${sessionCount} recording${sessionCount === 1 ? "" : "s"}`}</span></span><span className="sessions-open-chevron" aria-hidden>